mirror of
https://github.com/facebook/sapling.git
synced 2024-10-11 09:17:30 +03:00
hiddenoverride: in memory/disc out of sync fix
Before, out of syncness of in memory state and on disc state caused certain commands to (appear to) perform repo changes after they had returned. This broke hg undo. This change fixes this by using the in memory state. Differential Revision: https://phab.mercurial-scm.org/D150
This commit is contained in:
parent
6a5431e1a3
commit
c18c86359b
@ -29,8 +29,10 @@ def uisetup(ui):
|
||||
def pinnedrevs(orig, repo):
|
||||
revs = orig(repo)
|
||||
nodemap = repo.changelog.nodemap
|
||||
pinned = list(nodemap[n] for n in loadpinnednodes(repo) if n in nodemap)
|
||||
revs.update(pinned)
|
||||
pinnednodes = set(loadpinnednodes(repo))
|
||||
tounpin = getattr(repo, '_tounpinnodes', set())
|
||||
pinnednodes -= tounpin
|
||||
revs.update(nodemap[n] for n in pinnednodes)
|
||||
return revs
|
||||
|
||||
def loadpinnednodes(repo):
|
||||
|
Loading…
Reference in New Issue
Block a user