changeset 523:fa7aab230f1d

wrappers: calculate and return exact count of changesets added.
author Dan Villiom Podlaski Christiansen <danchr@gmail.com>
date Mon, 11 Jan 2010 17:12:30 +0100
parents 60bf433647e7
children 30e885106dab
files hgsubversion/wrappers.py
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/hgsubversion/wrappers.py
+++ b/hgsubversion/wrappers.py
@@ -255,7 +255,7 @@ def pull(repo, source, heads=[], force=F
         raise hgutil.Abort('Revision skipping at repository initialization '
                            'remains unimplemented.')
 
-    revisions = 0
+    oldrevisions = len(meta.revmap)
     try:
         try:
             # start converting revisions
@@ -302,12 +302,13 @@ def pull(repo, source, heads=[], force=F
                             ui.status('Got a 502, retrying (%s)\n' % tries)
                         else:
                             raise hgutil.Abort(*e.args)
-                revisions += 1
         except KeyboardInterrupt:
             pass
     finally:
         util.swap_out_encoding(old_encoding)
 
+    revisions = len(meta.revmap) - oldrevisions
+
     if revisions == 0:
         ui.status(i18n._("no changes found\n"))
         return 0