Mercurial > public > mercurial-scm > hg
comparison mercurial/localrepo.py @ 21465:2edb8648c500
localrepo: always set the variable r in status method
This is a small patch to help streamline keeping tracking of the list of files
for status in a variable already called 'r' ('s' is for subrepos in this
method). We now move the setting of it out of an 'if' block so that we can
later refactor more code into the context objects.
author | Sean Farley <sean.michael.farley@gmail.com> |
---|---|
date | Tue, 11 Mar 2014 18:35:39 -0500 |
parents | 242637139efb |
children | 6c90a18dd926 |
comparison
equal
deleted
inserted
replaced
21464:d19164a018a1 | 21465:2edb8648c500 |
---|---|
1556 # so 'f not in ctx1' is not enough | 1556 # so 'f not in ctx1' is not enough |
1557 if f not in ctx1 and f not in ctx1.dirs(): | 1557 if f not in ctx1 and f not in ctx1.dirs(): |
1558 self.ui.warn('%s: %s\n' % (self.dirstate.pathto(f), msg)) | 1558 self.ui.warn('%s: %s\n' % (self.dirstate.pathto(f), msg)) |
1559 match.bad = bad | 1559 match.bad = bad |
1560 | 1560 |
1561 r = [[], [], [], [], [], [], []] | |
1561 if working: # we need to scan the working dir | 1562 if working: # we need to scan the working dir |
1562 r = ctx2._dirstatestatus(match=match, ignored=listignored, | 1563 r = ctx2._dirstatestatus(match=match, ignored=listignored, |
1563 clean=listclean, unknown=listunknown) | 1564 clean=listclean, unknown=listunknown) |
1564 modified, added, removed, deleted, unknown, ignored, clean = r | 1565 |
1566 modified, added, removed, deleted, unknown, ignored, clean = r | |
1565 | 1567 |
1566 if not parentworking: | 1568 if not parentworking: |
1567 mf1 = mfmatches(ctx1) | 1569 mf1 = mfmatches(ctx1) |
1568 if working: | 1570 if working: |
1569 # we are comparing working dir against non-parent | 1571 # we are comparing working dir against non-parent |