Mercurial > evolve
comparison tests/test-amend.t @ 974:5808aad40aca
amend: in tests, do not rely on defaults -- always use explicit -d
Having a default -d option will make it hard to test
-D/--current-date, which is coming shortly: presence of -d overrides
-D, just like with mq's qrefresh.
author | Greg Ward <greg@gerg.ca> |
---|---|
date | Thu, 05 Jun 2014 21:27:06 -0400 |
parents | 760d01a549a6 |
children | 09d6036ad596 |
comparison
equal
deleted
inserted
replaced
972:f889409bdcc3 | 974:5808aad40aca |
---|---|
1 $ cat >> $HGRCPATH <<EOF | 1 $ cat >> $HGRCPATH <<EOF |
2 > [defaults] | |
3 > amend=-d "0 0" | |
4 > [extensions] | 2 > [extensions] |
5 > hgext.rebase= | 3 > hgext.rebase= |
6 > hgext.graphlog= | 4 > hgext.graphlog= |
7 > EOF | 5 > EOF |
8 $ echo "evolve=$(echo $(dirname $TESTDIR))/hgext/evolve.py" >> $HGRCPATH | 6 $ echo "evolve=$(echo $(dirname $TESTDIR))/hgext/evolve.py" >> $HGRCPATH |
20 Test amend captures branches | 18 Test amend captures branches |
21 | 19 |
22 $ hg branch foo | 20 $ hg branch foo |
23 marked working directory as branch foo | 21 marked working directory as branch foo |
24 (branches are permanent and global, did you want a bookmark?) | 22 (branches are permanent and global, did you want a bookmark?) |
25 $ hg amend | 23 $ hg amend -d '0 0' |
26 $ hg debugobsolete | 24 $ hg debugobsolete |
27 07f4944404050f47db2e5c5071e0e84e7a27bba9 6a022cbb61d5ba0f03f98ff2d36319dfea1034ae 0 {'date': '* *', 'user': 'test'} (glob) | 25 07f4944404050f47db2e5c5071e0e84e7a27bba9 6a022cbb61d5ba0f03f98ff2d36319dfea1034ae 0 {'date': '* *', 'user': 'test'} (glob) |
28 b2e32ffb533cbe1d5759638c0cd4e8abc43b2738 0 {'date': '* *', 'user': 'test'} (glob) | 26 b2e32ffb533cbe1d5759638c0cd4e8abc43b2738 0 {'date': '* *', 'user': 'test'} (glob) |
29 $ hg branch | 27 $ hg branch |
30 foo | 28 foo |
33 $ glog | 31 $ glog |
34 @ 2@foo(draft) adda | 32 @ 2@foo(draft) adda |
35 | 33 |
36 Test no-op | 34 Test no-op |
37 | 35 |
38 $ hg amend | 36 $ hg amend -d '0 0' |
39 nothing changed | 37 nothing changed |
40 [1] | 38 [1] |
41 $ glog | 39 $ glog |
42 @ 2@foo(draft) adda | 40 @ 2@foo(draft) adda |
43 | 41 |
44 | 42 |
45 Test forcing the message to the same value, no intermediate revision. | 43 Test forcing the message to the same value, no intermediate revision. |
46 | 44 |
47 $ hg amend -m 'adda' | 45 $ hg amend -d '0 0' -m 'adda' |
48 nothing changed | 46 nothing changed |
49 [1] | 47 [1] |
50 $ glog | 48 $ glog |
51 @ 2@foo(draft) adda | 49 @ 2@foo(draft) adda |
52 | 50 |