Show More
@@ -1301,7 +1301,11 b' def amend(ui, repo, commitfunc, old, ext' | |||||
1301 | try: |
|
1301 | try: | |
1302 | # First, do a regular commit to record all changes in the working |
|
1302 | # First, do a regular commit to record all changes in the working | |
1303 | # directory (if there are any) |
|
1303 | # directory (if there are any) | |
1304 | node = commit(ui, repo, commitfunc, pats, opts) |
|
1304 | ui.callhooks = False | |
|
1305 | try: | |||
|
1306 | node = commit(ui, repo, commitfunc, pats, opts) | |||
|
1307 | finally: | |||
|
1308 | ui.callhooks = True | |||
1305 | ctx = repo[node] |
|
1309 | ctx = repo[node] | |
1306 |
|
1310 | |||
1307 | # Participating changesets: |
|
1311 | # Participating changesets: |
@@ -25,11 +25,17 b' Nothing to amend:' | |||||
25 | nothing changed |
|
25 | nothing changed | |
26 | [1] |
|
26 | [1] | |
27 |
|
27 | |||
|
28 | $ echo '[hooks]' >> $HGRCPATH | |||
|
29 | $ echo 'pretxncommit.foo = echo "pretxncommit $HG_NODE"; hg id -r $HG_NODE' >> $HGRCPATH | |||
|
30 | ||||
28 | Amending changeset with changes in working dir: |
|
31 | Amending changeset with changes in working dir: | |
29 |
|
32 | |||
30 | $ echo a >> a |
|
33 | $ echo a >> a | |
31 | $ hg ci --amend -m 'amend base1' |
|
34 | $ hg ci --amend -m 'amend base1' | |
|
35 | pretxncommit 9cd25b479c51be2f4ed2c38e7abdf7ce67d8e0dc | |||
|
36 | 9cd25b479c51 tip | |||
32 | saved backup bundle to $TESTTMP/.hg/strip-backup/489edb5b847d-amend-backup.hg |
|
37 | saved backup bundle to $TESTTMP/.hg/strip-backup/489edb5b847d-amend-backup.hg | |
|
38 | $ echo 'pretxncommit.foo = ' >> $HGRCPATH | |||
33 | $ hg diff -c . |
|
39 | $ hg diff -c . | |
34 | diff -r ad120869acf0 -r 9cd25b479c51 a |
|
40 | diff -r ad120869acf0 -r 9cd25b479c51 a | |
35 | --- a/a Thu Jan 01 00:00:00 1970 +0000 |
|
41 | --- a/a Thu Jan 01 00:00:00 1970 +0000 |
General Comments 0
You need to be logged in to leave comments.
Login now