##// END OF EJS Templates
Merge with crew-stable.
Augie Fackler -
r17932:c8ffde27 merge default
parent child Browse files
Show More
@@ -1715,7 +1715,9 b' def amend(ui, repo, commitfunc, old, ext'
1715 1715
1716 1716 user = opts.get('user') or old.user()
1717 1717 date = opts.get('date') or old.date()
1718 editmsg = False
1718 1719 if not message:
1720 editmsg = True
1719 1721 message = old.description()
1720 1722
1721 1723 pureextra = extra.copy()
@@ -1729,6 +1731,7 b' def amend(ui, repo, commitfunc, old, ext'
1729 1731 user=user,
1730 1732 date=date,
1731 1733 extra=extra)
1734 if editmsg:
1732 1735 new._text = commitforceeditor(repo, new, [])
1733 1736
1734 1737 newdesc = changelog.stripdesc(new.description())
@@ -29,9 +29,10 b' Nothing to amend:'
29 29 > EOF
30 30
31 31 Amending changeset with changes in working dir:
32 (and check that --message does not trigger an editor)
32 33
33 34 $ echo a >> a
34 $ hg ci --amend -m 'amend base1'
35 $ HGEDITOR="\"sh\" \"`pwd`/editor.sh\"" hg commit --amend -m 'amend base1'
35 36 pretxncommit 43f1ba15f28a50abf0aae529cf8a16bfced7b149
36 37 43f1ba15f28a tip
37 38 saved backup bundle to $TESTTMP/.hg/strip-backup/489edb5b847d-amend-backup.hg (glob)
@@ -66,10 +67,11 b' Add new file:'
66 67
67 68 Remove file that was added in amended commit:
68 69 (and test logfile option)
70 (and test that logfile option do not trigger an editor)
69 71
70 72 $ hg rm b
71 73 $ echo 'amend base1 remove new file' > ../logfile
72 $ hg ci --amend -l ../logfile
74 $ HGEDITOR="\"sh\" \"`pwd`/editor.sh\"" hg ci --amend --logfile ../logfile
73 75 saved backup bundle to $TESTTMP/.hg/strip-backup/b8e3cb2b3882-amend-backup.hg (glob)
74 76
75 77 $ hg cat b
General Comments 0
You need to be logged in to leave comments. Login now