Commits

Anonymous committed bce5a97

Minor improvement while iterating revisions

  • Participants
  • Parent commits c6ac838

Comments (0)

Files changed (1)

hghooks/__init__.py

         current_rev = self.repo[self.node].rev()
         total_revs = len(self.repo.changelog)
         while current_rev < total_revs:
+            rev_warnings = 0
+            directory = tempfile.mkdtemp(suffix='-r%d' % current_rev,
+                                         prefix='hghooks')
             current_rev += 1
-            rev_warnings = 0
-            directory = tempfile.mkdtemp(suffix='-r%d' % (current_rev - 1),
-                                         prefix='hghooks')
 
             self.ui.debug("Checking revision %d\n" % current_rev)
             ctx = self.repo[current_rev - 1]