Mercurial > hg
annotate tests/test-merge-revert.t @ 45084:07b3166e94ca
commit: check branch change on to-be-committed changeset
This makes a difference when a branch name is passed via the `extra` argument,
which will be used as the branch name for the created changeset. The empty
commit check should use that branch name instead of whatever was set on the
working directory.
Besides fixing the bug for which a test case was extended, it enables to remove
a workaround in the rebase extension, which will be done in a follow-up patch
(D8725).
Differential Revision: https://phab.mercurial-scm.org/D8724
author | Manuel Jacob <me@manueljacob.de> |
---|---|
date | Fri, 10 Jul 2020 00:44:18 +0200 |
parents | 28e2e3804f2e |
children | 55c6ebd11cb9 |
rev | line source |
---|---|
12279 | 1 $ hg init |
2 | |
3 $ echo "added file1" > file1 | |
4 $ echo "added file2" > file2 | |
5 $ hg add file1 file2 | |
6 $ hg commit -m "added file1 and file2" | |
7 | |
8 $ echo "changed file1" >> file1 | |
9 $ hg commit -m "changed file1" | |
10 | |
11 $ hg -q log | |
12 1:08a16e8e4408 | |
13 0:d29c767a4b52 | |
14 $ hg id | |
15 08a16e8e4408 tip | |
16 | |
17 $ hg update -C 0 | |
18 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
19 $ hg id | |
20 d29c767a4b52 | |
21 $ echo "changed file1" >> file1 | |
22 $ hg id | |
23 d29c767a4b52+ | |
24 | |
25 $ hg revert --all | |
26 reverting file1 | |
27 $ hg diff | |
28 $ hg status | |
29 ? file1.orig | |
30 $ hg id | |
31 d29c767a4b52 | |
792
49ec802b4a16
Added tests for bug with three-way-merging of old tip, tip and cwd.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff
changeset
|
32 |
12279 | 33 $ hg update |
34 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
35 $ hg diff | |
36 $ hg status | |
37 ? file1.orig | |
38 $ hg id | |
39 08a16e8e4408 tip | |
40 | |
41 $ hg update -C 0 | |
42 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
43 $ echo "changed file1" >> file1 | |
44 | |
45 $ hg update | |
46 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
47 $ hg diff | |
48 $ hg status | |
49 ? file1.orig | |
50 $ hg id | |
51 08a16e8e4408 tip | |
792
49ec802b4a16
Added tests for bug with three-way-merging of old tip, tip and cwd.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff
changeset
|
52 |
12279 | 53 $ hg revert --all |
54 $ hg diff | |
55 $ hg status | |
56 ? file1.orig | |
57 $ hg id | |
58 08a16e8e4408 tip | |
59 | |
60 $ hg revert -r tip --all | |
61 $ hg diff | |
62 $ hg status | |
63 ? file1.orig | |
64 $ hg id | |
65 08a16e8e4408 tip | |
66 | |
67 $ hg update -C | |
68 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
69 $ hg diff | |
70 $ hg status | |
71 ? file1.orig | |
72 $ hg id | |
73 08a16e8e4408 tip | |
74 |