Mercurial > public > mercurial-scm > hg-stable
diff mercurial/localrepo.py @ 20773:efbf15979538
merge with stable
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Tue, 18 Mar 2014 14:25:28 -0500 |
parents | a4d587c6e3dd f042d4b263f4 |
children | d00c731f4637 |
line wrap: on
line diff
--- a/mercurial/localrepo.py Sat Mar 15 15:44:51 2014 +0100 +++ b/mercurial/localrepo.py Tue Mar 18 14:25:28 2014 -0500 @@ -1280,6 +1280,11 @@ cctx._text = editor(self, cctx, subs) edited = (text != cctx._text) + # Save commit message in case this transaction gets rolled back + # (e.g. by a pretxncommit hook). Leave the content alone on + # the assumption that the user will use the same editor again. + msgfn = self.savecommitmessage(cctx._text) + # commit subs and write new state if subs: for s in sorted(commitsubs): @@ -1290,11 +1295,6 @@ newstate[s] = (newstate[s][0], sr) subrepo.writestate(self, newstate) - # Save commit message in case this transaction gets rolled back - # (e.g. by a pretxncommit hook). Leave the content alone on - # the assumption that the user will use the same editor again. - msgfn = self.savecommitmessage(cctx._text) - p1, p2 = self.dirstate.parents() hookp1, hookp2 = hex(p1), (p2 != nullid and hex(p2) or '') try: