changeset 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 74d9aa42b28f
children b5b1fce26f1f
files hgsubversion/svncommands.py
diffstat 1 files changed, 12 insertions(+), 2 deletions(-) [+]
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