diff hgsubversion/svncommands.py @ 1019:d0f3a5c2cb56 stable 1.5.1

updatemeta/rebuildmeta: handle hidden changesets
author Dan Villiom Podlaski Christiansen <dan@cabo.dk>
date Mon, 13 May 2013 11:49:49 +0200
parents 6b7ac659c855
children f67f9d28b0ac
line wrap: on
line diff
--- a/hgsubversion/svncommands.py
+++ b/hgsubversion/svncommands.py
@@ -112,7 +112,12 @@ def _buildmeta(ui, repo, args, partial=F
     # changesets that close a branch, and store their first parent
     for rev in xrange(startrev, len(repo)):
         util.progress(ui, 'prepare', rev - startrev, total=numrevs)
-        ctx = repo[rev]
+        try:
+            ctx = repo[rev]
+        except error.RepoError:
+            # this revision is hidden
+            continue
+
         convinfo = util.getsvnrev(ctx, None)
         if not convinfo:
             continue
@@ -140,7 +145,12 @@ def _buildmeta(ui, repo, args, partial=F
 
     for rev in xrange(startrev, len(repo)):
         util.progress(ui, 'rebuild', rev-startrev, total=numrevs)
-        ctx = repo[rev]
+        try:
+            ctx = repo[rev]
+        except error.RepoError:
+            # this revision is hidden
+            continue
+
         convinfo = util.getsvnrev(ctx, None)
         if not convinfo:
             continue