comparison mercurial/localrepo.py @ 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 e994b034e91e
children 71570f310417
comparison
equal deleted inserted replaced
22906:75d0edb68b41 22907:a337f4b9b99d
1376 """Add a new revision to current repository. 1376 """Add a new revision to current repository.
1377 Revision information is passed via the context argument. 1377 Revision information is passed via the context argument.
1378 """ 1378 """
1379 1379
1380 tr = lock = None 1380 tr = lock = None
1381 removed = list(ctx.removed())
1382 p1, p2 = ctx.p1(), ctx.p2() 1381 p1, p2 = ctx.p1(), ctx.p2()
1383 user = ctx.user() 1382 user = ctx.user()
1384 1383
1385 lock = self.lock() 1384 lock = self.lock()
1386 try: 1385 try:
1392 m2 = p2.manifest() 1391 m2 = p2.manifest()
1393 1392
1394 # check in files 1393 # check in files
1395 new = {} 1394 new = {}
1396 changed = [] 1395 changed = []
1396 removed = list(ctx.removed())
1397 linkrev = len(self) 1397 linkrev = len(self)
1398 for f in sorted(ctx.modified() + ctx.added()): 1398 for f in sorted(ctx.modified() + ctx.added()):
1399 self.ui.note(f + "\n") 1399 self.ui.note(f + "\n")
1400 try: 1400 try:
1401 fctx = ctx[f] 1401 fctx = ctx[f]