Mercurial > hg
changeset 21469:65cdc6bab91e
localrepo: move the order of local variables
This movement is a small step in getting rid of the 'if ... else' logic for
testing the current working directory with its parent. Previously, the deleted,
unknown, and ignored variables were set in a combination of before an 'if
... else' block and within the block. This moves the variables to be set
outside the loop in one common place.
author | Sean Farley <sean.michael.farley@gmail.com> |
---|---|
date | Mon, 21 Apr 2014 20:23:47 -0500 |
parents | 870ddcf24291 |
children | 1af854808a3c |
files | mercurial/localrepo.py |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/localrepo.py Tue Apr 15 15:43:30 2014 -0500 +++ b/mercurial/localrepo.py Mon Apr 21 20:23:47 2014 -0500 @@ -1570,10 +1570,10 @@ del mf2[f] else: # we are comparing two revisions - deleted, unknown, ignored = [], [], [] mf2 = ctx2._manifestmatches(match, r) modified, added, clean = [], [], [] + deleted, unknown, ignored = r[3], [], [] withflags = mf1.withflags() | mf2.withflags() for fn, mf2node in mf2.iteritems(): if fn in mf1: