mirror of
https://github.com/facebook/sapling.git
synced 2024-10-06 23:07:18 +03:00
dirstate: properly clean-up some more merge state on setparents
This commit is contained in:
parent
030db2699f
commit
a44416ab0f
@ -266,12 +266,17 @@ class dirstate(object):
|
||||
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):
|
||||
|
@ -181,7 +181,7 @@ abort editing session, after first forcibly updating away
|
||||
parent: 0:cb9a9f314b8b
|
||||
a
|
||||
branch: default
|
||||
commit: 1 modified, 1 unknown (new branch head)
|
||||
commit: 1 added, 1 unknown (new branch head)
|
||||
update: 6 new changesets (update)
|
||||
hist: 2 remaining (histedit --continue)
|
||||
|
||||
@ -190,7 +190,7 @@ abort editing session, after first forcibly updating away
|
||||
|
||||
modified files should survive the abort when we've moved away already
|
||||
$ hg st
|
||||
M e
|
||||
A e
|
||||
? edit.sh
|
||||
|
||||
$ graphlog "log after abort"
|
||||
|
@ -71,9 +71,9 @@ Rebasing B onto H and collapsing changesets with different phases:
|
||||
HG: --
|
||||
HG: user: Nicolas Dumazet <nicdumz.commits@gmail.com>
|
||||
HG: branch 'default'
|
||||
HG: changed B
|
||||
HG: changed C
|
||||
HG: changed D
|
||||
HG: added B
|
||||
HG: added C
|
||||
HG: added D
|
||||
====
|
||||
saved backup bundle to $TESTTMP/a1/.hg/strip-backup/*-backup.hg (glob)
|
||||
|
||||
|
@ -59,7 +59,7 @@ D onto H - simple rebase:
|
||||
HG: --
|
||||
HG: user: Nicolas Dumazet <nicdumz.commits@gmail.com>
|
||||
HG: branch 'default'
|
||||
HG: changed D
|
||||
HG: added D
|
||||
saved backup bundle to $TESTTMP/a1/.hg/strip-backup/*-backup.hg (glob)
|
||||
|
||||
$ hg tglog
|
||||
|
Loading…
Reference in New Issue
Block a user