Mercurial > public > mercurial-scm > hg-stable
diff mercurial/dirstate.py @ 22895:dfa44e25bb53
dirstate: properly clean-up some more merge state on setparents
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Fri, 10 Oct 2014 13:05:50 -0500 |
parents | a1eb21f5caea |
children | 7e9cbb9c6053 |
line wrap: on
line diff
--- a/mercurial/dirstate.py Tue Oct 07 11:42:37 2014 -0700 +++ b/mercurial/dirstate.py Fri Oct 10 13:05:50 2014 -0500 @@ -266,12 +266,17 @@ self._pl = p1, p2 copies = {} if oldp2 != nullid and p2 == nullid: - # Discard 'm' markers when moving away from a merge state for f, s in self._map.iteritems(): + # Discard 'm' markers when moving away from a merge state if s[0] == 'm': if f in self._copymap: copies[f] = self._copymap[f] self.normallookup(f) + # Also fix up otherparent markers + elif s[0] == 'n' and s[2] == -2: + if f in self._copymap: + copies[f] = self._copymap[f] + self.add(f) return copies def setbranch(self, branch):