Mercurial > hg > hg-fastimport
comparison hgfastimport/hgimport.py @ 57:e827bffa5fc5
Rename local variable committish to commitref.
| author | Greg Ward <gward@intelerad.com> |
|---|---|
| date | Mon, 01 Aug 2011 18:18:24 -0400 |
| parents | a88f0dd05e92 |
| children | c370e587f483 |
comparison
equal
deleted
inserted
replaced
| 56:9275d497b7ea | 57:e827bffa5fc5 |
|---|---|
| 198 | 198 |
| 199 def checkpoint_handler(self, cmd): | 199 def checkpoint_handler(self, cmd): |
| 200 # This command means nothing to us | 200 # This command means nothing to us |
| 201 pass | 201 pass |
| 202 | 202 |
| 203 def _getcommit(self, committish): | 203 def _getcommit(self, commitref): |
| 204 """Given a mark reference or a branch name, return the | 204 """Given a mark reference or a branch name, return the |
| 205 appropriate commit object. Return None if committish is a | 205 appropriate commit object. Return None if committish is a |
| 206 branch with no commits. Raises KeyError if anything else is out | 206 branch with no commits. Raises KeyError if anything else is out |
| 207 of whack. | 207 of whack. |
| 208 """ | 208 """ |
| 209 if committish.startswith(":"): | 209 if commitref.startswith(":"): |
| 210 # KeyError here indicates the input stream is broken. | 210 # KeyError here indicates the input stream is broken. |
| 211 return self.commitmap[committish] | 211 return self.commitmap[commitref] |
| 212 else: | 212 else: |
| 213 branch = self._getbranch(committish) | 213 branch = self._getbranch(commitref) |
| 214 if branch is None: | 214 if branch is None: |
| 215 raise ValueError("invalid committish: %r" % committish) | 215 raise ValueError("invalid commit ref: %r" % commitref) |
| 216 | 216 |
| 217 heads = self.branchmap.get(branch) | 217 heads = self.branchmap.get(branch) |
| 218 if heads is None: | 218 if heads is None: |
| 219 return None | 219 return None |
| 220 else: | 220 else: |
