##// END OF EJS Templates
histedit: hold wlock and lock while in progress...
Siddharth Agarwal -
r20071:4778f398 stable
parent child Browse files
Show More
@@ -159,6 +159,7 b' from mercurial import scmutil'
159 from mercurial import util
159 from mercurial import util
160 from mercurial import obsolete
160 from mercurial import obsolete
161 from mercurial import merge as mergemod
161 from mercurial import merge as mergemod
162 from mercurial.lock import release
162 from mercurial.i18n import _
163 from mercurial.i18n import _
163
164
164 cmdtable = {}
165 cmdtable = {}
@@ -476,6 +477,15 b' def histedit(ui, repo, *freeargs, **opts'
476 for intentional "edit" command, but also for resolving unexpected
477 for intentional "edit" command, but also for resolving unexpected
477 conflicts).
478 conflicts).
478 """
479 """
480 lock = wlock = None
481 try:
482 wlock = repo.wlock()
483 lock = repo.lock()
484 _histedit(ui, repo, *freeargs, **opts)
485 finally:
486 release(lock, wlock)
487
488 def _histedit(ui, repo, *freeargs, **opts):
479 # TODO only abort if we try and histedit mq patches, not just
489 # TODO only abort if we try and histedit mq patches, not just
480 # blanket if mq patches are applied somewhere
490 # blanket if mq patches are applied somewhere
481 mq = getattr(repo, 'mq', None)
491 mq = getattr(repo, 'mq', None)
@@ -97,6 +97,7 b' log after edit'
97 Check histedit_source
97 Check histedit_source
98
98
99 $ hg log --debug --rev f518305ce889
99 $ hg log --debug --rev f518305ce889
100 invalid branchheads cache (visible): tip differs
100 changeset: 4:f518305ce889c07cb5bd05522176d75590ef3324
101 changeset: 4:f518305ce889c07cb5bd05522176d75590ef3324
101 tag: tip
102 tag: tip
102 phase: draft
103 phase: draft
General Comments 0
You need to be logged in to leave comments. Login now