Mercurial > hg
changeset 16464:0e1329d905df stable
convert/svn: clarify svn_source.latest() stop arg default value
stop=0 could pass for a valid default value at first sight.
author | Patrick Mezard <patrick@mezard.eu> |
---|---|
date | Wed, 18 Apr 2012 14:04:57 +0200 |
parents | cef755f86d5c |
children | ad38b96c88f9 |
files | hgext/convert/subversion.py |
diffstat | 1 files changed, 8 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/convert/subversion.py Tue Apr 17 21:12:37 2012 -0700 +++ b/hgext/convert/subversion.py Wed Apr 18 14:04:57 2012 +0200 @@ -555,18 +555,20 @@ def revnum(self, rev): return int(rev.split('@')[-1]) - def latest(self, path, stop=0): - """Find the latest revid affecting path, up to stop. It may return - a revision in a different module, since a branch may be moved without - a change being reported. Return None if computed module does not - belong to rootmodule subtree. + def latest(self, path, stop=None): + """Find the latest revid affecting path, up to stop revision + number. If stop is None, default to repository latest + revision. It may return a revision in a different module, + since a branch may be moved without a change being + reported. Return None if computed module does not belong to + rootmodule subtree. """ if not path.startswith(self.rootmodule): # Requests on foreign branches may be forbidden at server level self.ui.debug('ignoring foreign branch %r\n' % path) return None - if not stop: + if stop is None: stop = svn.ra.get_latest_revnum(self.ra) try: prevmodule = self.reparent('')