Mercurial > public > mercurial-scm > hg
comparison mercurial/context.py @ 16094:0776a6cababe
merge: don't use unknown()
This removes use of unknown files for building the synthetic working
directory manifest used by manifestmerge. Instead, we adopt the
strategy used by _checkunknown.
Side-effect: unknown files are no longer moved by remote directory
renames, and now are left alone like ignored files.
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Thu, 09 Feb 2012 17:04:17 -0600 |
parents | 2bd54ffaa27e |
children | 004982e5d782 |
comparison
equal
deleted
inserted
replaced
16093:7e30f5f2285f | 16094:0776a6cababe |
---|---|
696 | 696 |
697 @propertycache | 697 @propertycache |
698 def _manifest(self): | 698 def _manifest(self): |
699 """generate a manifest corresponding to the working directory""" | 699 """generate a manifest corresponding to the working directory""" |
700 | 700 |
701 if self._unknown is None: | |
702 self.status(unknown=True) | |
703 | |
704 man = self._parents[0].manifest().copy() | 701 man = self._parents[0].manifest().copy() |
705 if len(self._parents) > 1: | 702 if len(self._parents) > 1: |
706 man2 = self.p2().manifest() | 703 man2 = self.p2().manifest() |
707 def getman(f): | 704 def getman(f): |
708 if f in man: | 705 if f in man: |
712 getman = lambda f: man | 709 getman = lambda f: man |
713 | 710 |
714 copied = self._repo.dirstate.copies() | 711 copied = self._repo.dirstate.copies() |
715 ff = self._flagfunc | 712 ff = self._flagfunc |
716 modified, added, removed, deleted = self._status | 713 modified, added, removed, deleted = self._status |
717 unknown = self._unknown | 714 for i, l in (("a", added), ("m", modified)): |
718 for i, l in (("a", added), ("m", modified), ("u", unknown)): | |
719 for f in l: | 715 for f in l: |
720 orig = copied.get(f, f) | 716 orig = copied.get(f, f) |
721 man[f] = getman(orig).get(orig, nullid) + i | 717 man[f] = getman(orig).get(orig, nullid) + i |
722 try: | 718 try: |
723 man.set(f, ff(f)) | 719 man.set(f, ff(f)) |