Mercurial > public > mercurial-scm > hg
comparison mercurial/localrepo.py @ 3322:a1aad25ccc3e
fix localrepo.status when dealing with x-bit changes
author | Benoit Boissinot <benoit.boissinot@ens-lyon.org> |
---|---|
date | Tue, 10 Oct 2006 00:02:30 +0200 |
parents | 4546a5e31cb8 |
children | b7a46cbf3f59 |
comparison
equal
deleted
inserted
replaced
3321:455109df3669 | 3322:a1aad25ccc3e |
---|---|
704 t1 = self.wread(fn) | 704 t1 = self.wread(fn) |
705 return self.file(fn).cmp(mf.get(fn, nullid), t1) | 705 return self.file(fn).cmp(mf.get(fn, nullid), t1) |
706 | 706 |
707 def mfmatches(node): | 707 def mfmatches(node): |
708 change = self.changelog.read(node) | 708 change = self.changelog.read(node) |
709 mf = dict(self.manifest.read(change[0])) | 709 mf = self.manifest.read(change[0]).copy() |
710 for fn in mf.keys(): | 710 for fn in mf.keys(): |
711 if not match(fn): | 711 if not match(fn): |
712 del mf[fn] | 712 del mf[fn] |
713 return mf | 713 return mf |
714 | 714 |
749 if wlock is not None: | 749 if wlock is not None: |
750 self.dirstate.update([f], "n") | 750 self.dirstate.update([f], "n") |
751 else: | 751 else: |
752 # we are comparing working dir against non-parent | 752 # we are comparing working dir against non-parent |
753 # generate a pseudo-manifest for the working dir | 753 # generate a pseudo-manifest for the working dir |
754 # XXX: create it in dirstate.py ? | |
754 mf2 = mfmatches(self.dirstate.parents()[0]) | 755 mf2 = mfmatches(self.dirstate.parents()[0]) |
755 for f in lookup + modified + added: | 756 for f in lookup + modified + added: |
756 mf2[f] = "" | 757 mf2[f] = "" |
758 mf2.set(f, execf=util.is_exec(self.wjoin(f), mf2.execf(f))) | |
757 for f in removed: | 759 for f in removed: |
758 if f in mf2: | 760 if f in mf2: |
759 del mf2[f] | 761 del mf2[f] |
760 else: | 762 else: |
761 # we are comparing two revisions | 763 # we are comparing two revisions |
769 # reasonable order | 771 # reasonable order |
770 mf2keys = mf2.keys() | 772 mf2keys = mf2.keys() |
771 mf2keys.sort() | 773 mf2keys.sort() |
772 for fn in mf2keys: | 774 for fn in mf2keys: |
773 if mf1.has_key(fn): | 775 if mf1.has_key(fn): |
774 if mf1[fn] != mf2[fn] and (mf2[fn] != "" or fcmp(fn, mf1)): | 776 if mf1.flags(fn) != mf2.flags(fn) or \ |
777 (mf1[fn] != mf2[fn] and (mf2[fn] != "" or fcmp(fn, mf1))): | |
775 modified.append(fn) | 778 modified.append(fn) |
776 elif list_clean: | 779 elif list_clean: |
777 clean.append(fn) | 780 clean.append(fn) |
778 del mf1[fn] | 781 del mf1[fn] |
779 else: | 782 else: |