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