comparison mercurial/localrepo.py @ 49164:a932cad26d37

branching: merge stable into default
author Raphaël Gomès <rgomes@octobus.net>
date Wed, 04 May 2022 18:17:44 +0200
parents 642e31cb55f0 db3f8e5cc965
children 2ab79873786e
comparison
equal deleted inserted replaced
49147:10b9f11daf15 49164:a932cad26d37
3173 edited = text != cctx._text 3173 edited = text != cctx._text
3174 3174
3175 # Save commit message in case this transaction gets rolled back 3175 # Save commit message in case this transaction gets rolled back
3176 # (e.g. by a pretxncommit hook). Leave the content alone on 3176 # (e.g. by a pretxncommit hook). Leave the content alone on
3177 # the assumption that the user will use the same editor again. 3177 # the assumption that the user will use the same editor again.
3178 msgfn = self.savecommitmessage(cctx._text) 3178 msg_path = self.savecommitmessage(cctx._text)
3179 3179
3180 # commit subs and write new state 3180 # commit subs and write new state
3181 if subs: 3181 if subs:
3182 uipathfn = scmutil.getuipathfn(self) 3182 uipathfn = scmutil.getuipathfn(self)
3183 for s in sorted(commitsubs): 3183 for s in sorted(commitsubs):
3203 cctx.markcommitted(ret) 3203 cctx.markcommitted(ret)
3204 ms.reset() 3204 ms.reset()
3205 except: # re-raises 3205 except: # re-raises
3206 if edited: 3206 if edited:
3207 self.ui.write( 3207 self.ui.write(
3208 _(b'note: commit message saved in %s\n') % msgfn 3208 _(b'note: commit message saved in %s\n') % msg_path
3209 ) 3209 )
3210 self.ui.write( 3210 self.ui.write(
3211 _( 3211 _(
3212 b"note: use 'hg commit --logfile " 3212 b"note: use 'hg commit --logfile "
3213 b".hg/last-message.txt --edit' to reuse it\n" 3213 b"%s --edit' to reuse it\n"
3214 ) 3214 )
3215 % msg_path
3215 ) 3216 )
3216 raise 3217 raise
3217 3218
3218 def commithook(unused_success): 3219 def commithook(unused_success):
3219 # hack for command that use a temporary commit (eg: histedit) 3220 # hack for command that use a temporary commit (eg: histedit)