mercurial/context.py
changeset 46843 728d89f6f9b1
parent 46842 ad878e3f282b
child 47012 d55b71393907
equal deleted inserted replaced
46842:ad878e3f282b 46843:728d89f6f9b1
  2883         man1 = self.p1().manifest()
  2883         man1 = self.p1().manifest()
  2884         p2 = self._parents[1]
  2884         p2 = self._parents[1]
  2885         # "1 < len(self._parents)" can't be used for checking
  2885         # "1 < len(self._parents)" can't be used for checking
  2886         # existence of the 2nd parent, because "memctx._parents" is
  2886         # existence of the 2nd parent, because "memctx._parents" is
  2887         # explicitly initialized by the list, of which length is 2.
  2887         # explicitly initialized by the list, of which length is 2.
  2888         if p2.node() != nullid:
  2888         if p2.rev() != nullrev:
  2889             man2 = p2.manifest()
  2889             man2 = p2.manifest()
  2890             managing = lambda f: f in man1 or f in man2
  2890             managing = lambda f: f in man1 or f in man2
  2891         else:
  2891         else:
  2892             managing = lambda f: f in man1
  2892             managing = lambda f: f in man1
  2893 
  2893 
  2901                 removed.append(f)
  2901                 removed.append(f)
  2902 
  2902 
  2903         return scmutil.status(modified, added, removed, [], [], [], [])
  2903         return scmutil.status(modified, added, removed, [], [], [], [])
  2904 
  2904 
  2905     def parents(self):
  2905     def parents(self):
  2906         if self._parents[1].node() == nullid:
  2906         if self._parents[1].rev() == nullrev:
  2907             return [self._parents[0]]
  2907             return [self._parents[0]]
  2908         return self._parents
  2908         return self._parents
  2909 
  2909 
  2910 
  2910 
  2911 class memfilectx(committablefilectx):
  2911 class memfilectx(committablefilectx):
  3050         man1 = self.p1().manifest()
  3050         man1 = self.p1().manifest()
  3051         p2 = self._parents[1]
  3051         p2 = self._parents[1]
  3052         # "1 < len(self._parents)" can't be used for checking
  3052         # "1 < len(self._parents)" can't be used for checking
  3053         # existence of the 2nd parent, because "metadataonlyctx._parents" is
  3053         # existence of the 2nd parent, because "metadataonlyctx._parents" is
  3054         # explicitly initialized by the list, of which length is 2.
  3054         # explicitly initialized by the list, of which length is 2.
  3055         if p2.node() != nullid:
  3055         if p2.rev() != nullrev:
  3056             man2 = p2.manifest()
  3056             man2 = p2.manifest()
  3057             managing = lambda f: f in man1 or f in man2
  3057             managing = lambda f: f in man1 or f in man2
  3058         else:
  3058         else:
  3059             managing = lambda f: f in man1
  3059             managing = lambda f: f in man1
  3060 
  3060