changeset 9688:dd5a16ad420e

record: get the right position (account for skipped files)
author Benoit Boissinot <benoit.boissinot@ens-lyon.org>
date Sun, 01 Nov 2009 02:57:11 +0100
parents c6da1cb3b255
children 57cee011ffcb
files hgext/record.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/record.py	Sun Nov 01 02:54:32 2009 +0100
+++ b/hgext/record.py	Sun Nov 01 02:57:11 2009 +0100
@@ -315,6 +315,7 @@
             return ret
     pos, total = 0, len(chunks) - 1
     while chunks:
+        pos = total - len(chunks) + 1
         chunk = chunks.pop()
         if isinstance(chunk, header):
             # new-file mark
@@ -350,7 +351,6 @@
                 applied[chunk.filename()].append(chunk)
             else:
                 fixoffset += chunk.removed - chunk.added
-        pos = pos + 1
     return reduce(operator.add, [h for h in applied.itervalues()
                                  if h[0].special() or len(h) > 1], [])