##// END OF EJS Templates
amend: support "history-editing-backup" config option...
Sushil khanchi -
r38853:32ece991 default
parent child Browse files
Show More
@@ -2556,8 +2556,10 b' def amend(ui, repo, old, extra, pats, op'
2556 obsmetadata = None
2556 obsmetadata = None
2557 if opts.get('note'):
2557 if opts.get('note'):
2558 obsmetadata = {'note': encoding.fromlocal(opts['note'])}
2558 obsmetadata = {'note': encoding.fromlocal(opts['note'])}
2559 backup = ui.configbool('ui', 'history-editing-backup')
2559 scmutil.cleanupnodes(repo, mapping, 'amend', metadata=obsmetadata,
2560 scmutil.cleanupnodes(repo, mapping, 'amend', metadata=obsmetadata,
2560 fixphase=True, targetphase=commitphase)
2561 fixphase=True, targetphase=commitphase,
2562 backup=backup)
2561
2563
2562 # Fixing the dirstate because localrepo.commitctx does not update
2564 # Fixing the dirstate because localrepo.commitctx does not update
2563 # it. This is rather convenient because we did not need to update
2565 # it. This is rather convenient because we did not need to update
@@ -331,3 +331,37 b' working directory should be all clean (w'
331 ? missing_content2_content2-untracked
331 ? missing_content2_content2-untracked
332 ? missing_content2_content3-untracked
332 ? missing_content2_content3-untracked
333 ? missing_missing_content3-untracked
333 ? missing_missing_content3-untracked
334
335 ==========================================
336 Test history-editing-backup config option|
337 ==========================================
338 $ hg init $TESTTMP/repo4
339 $ cd $TESTTMP/repo4
340 $ echo a>a
341 $ hg ci -Aqma
342 $ echo oops>b
343 $ hg ci -Aqm "b"
344 $ echo partiallyfixed > b
345
346 #if obsstore-off
347 $ hg amend
348 saved backup bundle to $TESTTMP/repo4/.hg/strip-backup/95e899acf2ce-f11cb050-amend.hg
349 When history-editing-backup config option is set:
350 $ cat << EOF >> $HGRCPATH
351 > [ui]
352 > history-editing-backup = False
353 > EOF
354 $ echo fixed > b
355 $ hg amend
356
357 #else
358 $ hg amend
359 When history-editing-backup config option is set:
360 $ cat << EOF >> $HGRCPATH
361 > [ui]
362 > history-editing-backup = False
363 > EOF
364 $ echo fixed > b
365 $ hg amend
366
367 #endif
General Comments 0
You need to be logged in to leave comments. Login now