diff options
Diffstat (limited to 'project.py')
| -rw-r--r-- | project.py | 9 |
1 files changed, 8 insertions, 1 deletions
| @@ -1167,6 +1167,13 @@ class Project(object): | |||
| 1167 | 1167 | ||
| 1168 | def CheckoutBranch(self, name): | 1168 | def CheckoutBranch(self, name): |
| 1169 | """Checkout a local topic branch. | 1169 | """Checkout a local topic branch. |
| 1170 | |||
| 1171 | Args: | ||
| 1172 | name: The name of the branch to checkout. | ||
| 1173 | |||
| 1174 | Returns: | ||
| 1175 | True if the checkout succeeded; False if it didn't; None if the branch | ||
| 1176 | didn't exist. | ||
| 1170 | """ | 1177 | """ |
| 1171 | rev = R_HEADS + name | 1178 | rev = R_HEADS + name |
| 1172 | head = self.work_git.GetHead() | 1179 | head = self.work_git.GetHead() |
| @@ -1181,7 +1188,7 @@ class Project(object): | |||
| 1181 | except KeyError: | 1188 | except KeyError: |
| 1182 | # Branch does not exist in this project | 1189 | # Branch does not exist in this project |
| 1183 | # | 1190 | # |
| 1184 | return False | 1191 | return None |
| 1185 | 1192 | ||
| 1186 | if head.startswith(R_HEADS): | 1193 | if head.startswith(R_HEADS): |
| 1187 | try: | 1194 | try: |
