Mercurial > public > mercurial-scm > hg
comparison mercurial/localrepo.py @ 6817:cf319797d61c
minor status fixups
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Tue, 22 Jul 2008 13:00:22 -0500 |
parents | 8f7a2915170a |
children | c978d6752dbb |
comparison
equal
deleted
inserted
replaced
6816:d8159dd15db3 | 6817:cf319797d61c |
---|---|
966 listignored, listclean, listunknown = ignored, clean, unknown | 966 listignored, listclean, listunknown = ignored, clean, unknown |
967 | 967 |
968 if working: # we need to scan the working dir | 968 if working: # we need to scan the working dir |
969 s = self.dirstate.status(match, listignored, listclean, listunknown) | 969 s = self.dirstate.status(match, listignored, listclean, listunknown) |
970 cmp, modified, added, removed, deleted, unknown, ignored, clean = s | 970 cmp, modified, added, removed, deleted, unknown, ignored, clean = s |
971 removed.sort() | |
972 deleted.sort() | |
971 | 973 |
972 # check for any possibly clean files | 974 # check for any possibly clean files |
973 if parentworking and cmp: | 975 if parentworking and cmp: |
974 fixup = [] | 976 fixup = [] |
975 # do a full compare of any files that might have changed | 977 # do a full compare of any files that might have changed |
1001 mf1 = mfmatches(ctx1) | 1003 mf1 = mfmatches(ctx1) |
1002 if working: | 1004 if working: |
1003 # we are comparing working dir against non-parent | 1005 # we are comparing working dir against non-parent |
1004 # generate a pseudo-manifest for the working dir | 1006 # generate a pseudo-manifest for the working dir |
1005 mf2 = mfmatches(self['.']) | 1007 mf2 = mfmatches(self['.']) |
1006 mf2.flags = ctx2.flags # delay flag lookup | |
1007 for f in cmp + modified + added: | 1008 for f in cmp + modified + added: |
1008 mf2[f] = None | 1009 mf2[f] = None |
1010 mf2.set(f, ctx2.flags(f)) | |
1009 for f in removed: | 1011 for f in removed: |
1010 if f in mf2: | 1012 if f in mf2: |
1011 del mf2[f] | 1013 del mf2[f] |
1012 else: | 1014 else: |
1013 # we are comparing two revisions | 1015 # we are comparing two revisions |
1015 mf2 = mfmatches(ctx2) | 1017 mf2 = mfmatches(ctx2) |
1016 | 1018 |
1017 modified, added, clean = [], [], [] | 1019 modified, added, clean = [], [], [] |
1018 for fn in util.sort(mf2): | 1020 for fn in util.sort(mf2): |
1019 if fn in mf1: | 1021 if fn in mf1: |
1020 if ((mf1[fn] != mf2[fn] and | 1022 if (mf1.flags(fn) != mf2.flags(fn) or |
1021 (mf2[fn] or ctx1[fn].cmp(ctx2[fn].data()))) | 1023 (mf1[fn] != mf2[fn] and |
1022 or mf1.flags(fn) != mf2.flags(fn)): | 1024 (mf2[fn] or ctx1[fn].cmp(ctx2[fn].data())))): |
1023 modified.append(fn) | 1025 modified.append(fn) |
1024 elif listclean: | 1026 elif listclean: |
1025 clean.append(fn) | 1027 clean.append(fn) |
1026 del mf1[fn] | 1028 del mf1[fn] |
1027 else: | 1029 else: |