Show More
@@ -589,12 +589,23 b' class workingctx(changectx):' | |||
|
589 | 589 | |
|
590 | 590 | man = self._parents[0].manifest().copy() |
|
591 | 591 | copied = self._repo.dirstate.copies() |
|
592 | cf = lambda x: man.flags(copied.get(x, x)) | |
|
592 | if len(self._parents) > 1: | |
|
593 | man2 = self.p2().manifest() | |
|
594 | def getman(f): | |
|
595 | if f in man: | |
|
596 | return man | |
|
597 | return man2 | |
|
598 | else: | |
|
599 | getman = lambda f: man | |
|
600 | def cf(f): | |
|
601 | f = copied.get(f, f) | |
|
602 | return getman(f).flags(f) | |
|
593 | 603 | ff = self._repo.dirstate.flagfunc(cf) |
|
594 | 604 | modified, added, removed, deleted, unknown = self._status[:5] |
|
595 | 605 | for i, l in (("a", added), ("m", modified), ("u", unknown)): |
|
596 | 606 | for f in l: |
|
597 |
|
|
|
607 | orig = copied.get(f, f) | |
|
608 | man[f] = getman(orig).get(orig, nullid) + i | |
|
598 | 609 | try: |
|
599 | 610 | man.set(f, ff(f)) |
|
600 | 611 | except OSError: |
@@ -669,16 +680,21 b' class workingctx(changectx):' | |||
|
669 | 680 | except KeyError: |
|
670 | 681 | return '' |
|
671 | 682 | |
|
672 | pnode = self._parents[0].changeset()[0] | |
|
673 | 683 | orig = self._repo.dirstate.copies().get(path, path) |
|
674 | node, flag = self._repo.manifest.find(pnode, orig) | |
|
675 | try: | |
|
676 | ff = self._repo.dirstate.flagfunc(lambda x: flag or '') | |
|
677 | return ff(path) | |
|
678 | except OSError: | |
|
679 | pass | |
|
680 | 684 | |
|
681 | if not node or path in self.deleted() or path in self.removed(): | |
|
685 | def findflag(ctx): | |
|
686 | mnode = ctx.changeset()[0] | |
|
687 | node, flag = self._repo.manifest.find(mnode, orig) | |
|
688 | ff = self._repo.dirstate.flagfunc(lambda x: flag or None) | |
|
689 | try: | |
|
690 | return ff(orig) | |
|
691 | except OSError: | |
|
692 | pass | |
|
693 | ||
|
694 | flag = findflag(self._parents[0]) | |
|
695 | if flag is None and len(self.parents()) > 1: | |
|
696 | flag = findflag(self._parents[1]) | |
|
697 | if flag is None or self._repo.dirstate[path] == 'r': | |
|
682 | 698 | return '' |
|
683 | 699 | return flag |
|
684 | 700 |
General Comments 0
You need to be logged in to leave comments.
Login now