diff options
Diffstat (limited to 'project.py')
-rw-r--r-- | project.py | 12 |
1 files changed, 9 insertions, 3 deletions
@@ -1204,13 +1204,19 @@ class Project(object): | |||
1204 | 1204 | ||
1205 | def AbandonBranch(self, name): | 1205 | def AbandonBranch(self, name): |
1206 | """Destroy a local topic branch. | 1206 | """Destroy a local topic branch. |
1207 | |||
1208 | Args: | ||
1209 | name: The name of the branch to abandon. | ||
1210 | |||
1211 | Returns: | ||
1212 | True if the abandon succeeded; False if it didn't; None if the branch | ||
1213 | didn't exist. | ||
1207 | """ | 1214 | """ |
1208 | rev = R_HEADS + name | 1215 | rev = R_HEADS + name |
1209 | all = self.bare_ref.all | 1216 | all = self.bare_ref.all |
1210 | if rev not in all: | 1217 | if rev not in all: |
1211 | # Doesn't exist; assume already abandoned. | 1218 | # Doesn't exist |
1212 | # | 1219 | return None |
1213 | return True | ||
1214 | 1220 | ||
1215 | head = self.work_git.GetHead() | 1221 | head = self.work_git.GetHead() |
1216 | if head == rev: | 1222 | if head == rev: |