changeset 22907:a337f4b9b99d

commit: reduce scope of 'removed' variable The variable is closely related to 'added' and 'changed', so it makes sense to have it declared next to them.
author Martin von Zweigbergk <martinvonz@gmail.com>
date Mon, 13 Oct 2014 16:43:37 -0700
parents 75d0edb68b41
children 71570f310417
files mercurial/localrepo.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/localrepo.py	Mon Oct 13 18:00:39 2014 -0500
+++ b/mercurial/localrepo.py	Mon Oct 13 16:43:37 2014 -0700
@@ -1378,7 +1378,6 @@
         """
 
         tr = lock = None
-        removed = list(ctx.removed())
         p1, p2 = ctx.p1(), ctx.p2()
         user = ctx.user()
 
@@ -1394,6 +1393,7 @@
                 # check in files
                 new = {}
                 changed = []
+                removed = list(ctx.removed())
                 linkrev = len(self)
                 for f in sorted(ctx.modified() + ctx.added()):
                     self.ui.note(f + "\n")