Comments
Patch
@@ -1998,9 +1998,10 @@
ui.note(_('amending changeset %s\n') % old)
base = old.p1()
- wlock = lock = newid = None
+ wlock = dsguard = lock = newid = None
try:
wlock = repo.wlock()
+ dsguard = dirstateguard(repo, 'amend')
lock = repo.lock()
tr = repo.transaction('amend')
try:
@@ -2167,6 +2168,7 @@
tr.close()
finally:
tr.release()
+ dsguard.close()
if (not obsolete._enabled) and newid != old.node():
# Strip the intermediate commit (if there was one) and the amended
# commit
@@ -2175,9 +2177,7 @@
ui.note(_('stripping amended changeset %s\n') % old)
repair.strip(ui, repo, old.node(), topic='amend-backup')
finally:
- if newid is None:
- repo.dirstate.invalidate()
- lockmod.release(lock, wlock)
+ lockmod.release(lock, dsguard, wlock)
return newid
def commiteditor(repo, ctx, subs):