There is some more strange code in _parse_rev, causing a bunch of unreachable statements. The return Toshio mentioned is one of them, but here are two more, adding confusion.
if len(split) != 2: raise versioncontrol.NoSuchChangeset(rev)
...
if len(split) == 2:
...
else: revid = branch.last_revision()
As the raise leaves the function when len(split) != 2, the else case will never happen. Maybe a check for empty string for one of the components was intended instead.
revid = cache.revid_from_dotted(rev_rev) if revid is None: raise repr(dotted) revid = urllib.unquote(rev_rev)
I guess that the unquoted revid is intended as a kind of fallback: a string that looks like a dotted revno but is in fact a revid. In this case, The raise seems like a leftover from some debugging, especially as it raises a string and no proper exception object.
Btw: http://bazaar.launchpad.net/~trac-bzr-team/trac-bzr/trunk/revision/28.1.104 adds the last two lines in a single commit.
There is some more strange code in _parse_rev, causing a bunch of unreachable statements. The return Toshio mentioned is one of them, but here are two more, adding confusion.
if len(split) != 2:
raise versioncontrol. NoSuchChangeset (rev)
revid = branch. last_revision( )
...
if len(split) == 2:
...
else:
As the raise leaves the function when len(split) != 2, the else case will never happen. Maybe a check for empty string for one of the components was intended instead.
I guess that the unquoted revid is intended as a kind of fallback: a string that looks like a dotted revno but is in fact a revid. In this case, The raise seems like a leftover from some debugging, especially as it raises a string and no proper exception object. bazaar. launchpad. net/~trac- bzr-team/ trac-bzr/ trunk/revision/ 28.1.104 adds the last two lines in a single commit.
Btw: http://