equal
deleted
inserted
replaced
3174 edited = text != cctx._text |
3174 edited = text != cctx._text |
3175 |
3175 |
3176 # Save commit message in case this transaction gets rolled back |
3176 # Save commit message in case this transaction gets rolled back |
3177 # (e.g. by a pretxncommit hook). Leave the content alone on |
3177 # (e.g. by a pretxncommit hook). Leave the content alone on |
3178 # the assumption that the user will use the same editor again. |
3178 # the assumption that the user will use the same editor again. |
3179 msgfn = self.savecommitmessage(cctx._text) |
3179 msg_path = self.savecommitmessage(cctx._text) |
3180 |
3180 |
3181 # commit subs and write new state |
3181 # commit subs and write new state |
3182 if subs: |
3182 if subs: |
3183 uipathfn = scmutil.getuipathfn(self) |
3183 uipathfn = scmutil.getuipathfn(self) |
3184 for s in sorted(commitsubs): |
3184 for s in sorted(commitsubs): |
3204 cctx.markcommitted(ret) |
3204 cctx.markcommitted(ret) |
3205 ms.reset() |
3205 ms.reset() |
3206 except: # re-raises |
3206 except: # re-raises |
3207 if edited: |
3207 if edited: |
3208 self.ui.write( |
3208 self.ui.write( |
3209 _(b'note: commit message saved in %s\n') % msgfn |
3209 _(b'note: commit message saved in %s\n') % msg_path |
3210 ) |
3210 ) |
3211 self.ui.write( |
3211 self.ui.write( |
3212 _( |
3212 _( |
3213 b"note: use 'hg commit --logfile " |
3213 b"note: use 'hg commit --logfile " |
3214 b".hg/last-message.txt --edit' to reuse it\n" |
3214 b"%s --edit' to reuse it\n" |
3215 ) |
3215 ) |
|
3216 % msg_path |
3216 ) |
3217 ) |
3217 raise |
3218 raise |
3218 |
3219 |
3219 def commithook(unused_success): |
3220 def commithook(unused_success): |
3220 # hack for command that use a temporary commit (eg: histedit) |
3221 # hack for command that use a temporary commit (eg: histedit) |