Comments
Patch
@@ -229,7 +229,6 @@
finally:
repo.ui.setconfig('ui', 'forcemerge', '', 'histedit')
repo.setparents(wcpar, node.nullid)
- repo.dirstate.write()
# fix up dirstate for copies and renames
cmdutil.duplicatecopies(repo, ctx.rev(), ctx.p1().rev())
return stats
@@ -3270,7 +3270,6 @@
try:
# drop the second merge parent
repo.setparents(current.node(), nullid)
- repo.dirstate.write()
# fix up dirstate for copies and renames
cmdutil.duplicatecopies(repo, ctx.rev(), ctx.p1().rev())
@@ -1323,6 +1323,8 @@
raise util.Abort(_("unresolved merge conflicts "
"(see hg help resolve)"))
+ self.dirstate.write() # for external editor and hooks
+
if editor:
cctx._text = editor(self, cctx, subs)
edited = (text != cctx._text)
@@ -99,6 +99,7 @@
Test saving last-message.txt:
$ cat > $TESTTMP/editor.sh << EOF
+ > hg parents --template "{rev}\n"
> echo "==== before editing"
> cat \$1
> echo "===="
@@ -163,7 +164,10 @@
$ rm -f .hg/last-message.txt
$ hg status --rev "second-patch^1" -arm
A file2
+ $ hg log -r ".^" --template "{rev}\n"
+ 0
$ HGEDITOR="sh $TESTTMP/editor.sh" hg qrefresh -e
+ 0
==== before editing
Fifth commit message
This is the 5th log message