Mercurial > hgsubversion
diff hgsubversion/wrappers.py @ 821:f28e0f54a6ef
svnmeta: store youngest revision pulled from subversion
This prevents re-pulling the same revision over and over, which was a
problem when the most recent revision was a tagging revision that
wouldn't exist properly in the revmap. This should also allow users to
not re-pull huge volumes of commits that have no effect on the hg
repository.
author | Augie Fackler <durin42@gmail.com> |
---|---|
date | Tue, 24 May 2011 21:07:27 -0500 |
parents | e30ff6d5feff |
children | 805ef27fbcbe 88f3cda47def |
line wrap: on
line diff
--- a/hgsubversion/wrappers.py +++ b/hgsubversion/wrappers.py @@ -310,11 +310,13 @@ def pull(repo, source, heads=[], force=F total = stopat_rev - start else: total = svn.HEAD - start + lastpulled = None try: try: # start converting revisions firstrun = True for r in svn.revisions(start=start, stop=stopat_rev): + lastpulled = r.revnum if (r.author is None and r.message == 'This is an empty revision for padding.'): continue @@ -371,6 +373,8 @@ def pull(repo, source, heads=[], force=F util.progress(ui, 'pull', None, total=total) util.swap_out_encoding(old_encoding) + if lastpulled is not None: + meta.revmap.youngest = lastpulled revisions = len(meta.revmap) - oldrevisions if revisions == 0: