Mercurial > hg
annotate tests/test-resolve.t @ 27027:a01ecbcfaf84
mergestate: handle additional record types specially
This works around a bug in older Mercurial versions' handling of the v2 merge
state.
We also add a bunch of tests that make sure that
(1) we correctly abort when the merge state has an unsupported record type
(2) aborting the merge, rebase or histedit continues to work and clears out the
merge state.
author | Siddharth Agarwal <sid0@fb.com> |
---|---|
date | Wed, 18 Nov 2015 15:46:45 -0800 |
parents | c93b44b79359 |
children | 19b52cde2b84 |
rev | line source |
---|---|
12117
a40372c1c731
tests: unify test-resolve
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11451
diff
changeset
|
1 test that a commit clears the merge state. |
7734 | 2 |
12117
a40372c1c731
tests: unify test-resolve
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11451
diff
changeset
|
3 $ hg init repo |
a40372c1c731
tests: unify test-resolve
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11451
diff
changeset
|
4 $ cd repo |
a40372c1c731
tests: unify test-resolve
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11451
diff
changeset
|
5 |
23021
41770cee3c6a
test-resolve: add test resolving one of two files
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23020
diff
changeset
|
6 $ echo foo > file1 |
41770cee3c6a
test-resolve: add test resolving one of two files
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23020
diff
changeset
|
7 $ echo foo > file2 |
41770cee3c6a
test-resolve: add test resolving one of two files
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23020
diff
changeset
|
8 $ hg commit -Am 'add files' |
41770cee3c6a
test-resolve: add test resolving one of two files
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23020
diff
changeset
|
9 adding file1 |
41770cee3c6a
test-resolve: add test resolving one of two files
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23020
diff
changeset
|
10 adding file2 |
7734 | 11 |
23021
41770cee3c6a
test-resolve: add test resolving one of two files
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23020
diff
changeset
|
12 $ echo bar >> file1 |
41770cee3c6a
test-resolve: add test resolving one of two files
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23020
diff
changeset
|
13 $ echo bar >> file2 |
41770cee3c6a
test-resolve: add test resolving one of two files
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23020
diff
changeset
|
14 $ hg commit -Am 'append bar to files' |
12117
a40372c1c731
tests: unify test-resolve
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11451
diff
changeset
|
15 |
23022
ace380a0619b
test-resolve: add more tests for in conflict-free states
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23021
diff
changeset
|
16 create a second head with conflicting edits |
7734 | 17 |
12117
a40372c1c731
tests: unify test-resolve
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11451
diff
changeset
|
18 $ hg up -C 0 |
23021
41770cee3c6a
test-resolve: add test resolving one of two files
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23020
diff
changeset
|
19 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
41770cee3c6a
test-resolve: add test resolving one of two files
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23020
diff
changeset
|
20 $ echo baz >> file1 |
41770cee3c6a
test-resolve: add test resolving one of two files
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23020
diff
changeset
|
21 $ echo baz >> file2 |
41770cee3c6a
test-resolve: add test resolving one of two files
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23020
diff
changeset
|
22 $ hg commit -Am 'append baz to files' |
12117
a40372c1c731
tests: unify test-resolve
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11451
diff
changeset
|
23 created new head |
7734 | 24 |
23022
ace380a0619b
test-resolve: add more tests for in conflict-free states
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23021
diff
changeset
|
25 create a third head with no conflicting edits |
ace380a0619b
test-resolve: add more tests for in conflict-free states
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23021
diff
changeset
|
26 $ hg up -qC 0 |
ace380a0619b
test-resolve: add more tests for in conflict-free states
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23021
diff
changeset
|
27 $ echo foo > file3 |
ace380a0619b
test-resolve: add more tests for in conflict-free states
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23021
diff
changeset
|
28 $ hg commit -Am 'add non-conflicting file' |
ace380a0619b
test-resolve: add more tests for in conflict-free states
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23021
diff
changeset
|
29 adding file3 |
ace380a0619b
test-resolve: add more tests for in conflict-free states
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23021
diff
changeset
|
30 created new head |
ace380a0619b
test-resolve: add more tests for in conflict-free states
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23021
diff
changeset
|
31 |
12117
a40372c1c731
tests: unify test-resolve
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11451
diff
changeset
|
32 failing merge |
7734 | 33 |
23022
ace380a0619b
test-resolve: add more tests for in conflict-free states
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23021
diff
changeset
|
34 $ hg up -qC 2 |
ace380a0619b
test-resolve: add more tests for in conflict-free states
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23021
diff
changeset
|
35 $ hg merge --tool=internal:fail 1 |
23021
41770cee3c6a
test-resolve: add test resolving one of two files
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23020
diff
changeset
|
36 0 files updated, 0 files merged, 0 files removed, 2 files unresolved |
12314
f2daa6ab514a
merge: suggest 'hg up -C .' for discarding changes, not 'hg up -C'
Brodie Rao <brodie@bitheap.org>
parents:
12117
diff
changeset
|
37 use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon |
12316
4134686b83e1
tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents:
12314
diff
changeset
|
38 [1] |
12117
a40372c1c731
tests: unify test-resolve
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11451
diff
changeset
|
39 |
23021
41770cee3c6a
test-resolve: add test resolving one of two files
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23020
diff
changeset
|
40 resolve -l should contain unresolved entries |
21263
f3e37409ecd3
resolve: split test
Gregory Szorc <gregory.szorc@gmail.com>
parents:
16913
diff
changeset
|
41 |
f3e37409ecd3
resolve: split test
Gregory Szorc <gregory.szorc@gmail.com>
parents:
16913
diff
changeset
|
42 $ hg resolve -l |
23021
41770cee3c6a
test-resolve: add test resolving one of two files
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23020
diff
changeset
|
43 U file1 |
41770cee3c6a
test-resolve: add test resolving one of two files
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23020
diff
changeset
|
44 U file2 |
21263
f3e37409ecd3
resolve: split test
Gregory Szorc <gregory.szorc@gmail.com>
parents:
16913
diff
changeset
|
45 |
24127
4cb8002658d6
resolve: port to generic templater
Yuya Nishihara <yuya@tcha.org>
parents:
24125
diff
changeset
|
46 $ hg resolve -l --no-status |
4cb8002658d6
resolve: port to generic templater
Yuya Nishihara <yuya@tcha.org>
parents:
24125
diff
changeset
|
47 file1 |
4cb8002658d6
resolve: port to generic templater
Yuya Nishihara <yuya@tcha.org>
parents:
24125
diff
changeset
|
48 file2 |
4cb8002658d6
resolve: port to generic templater
Yuya Nishihara <yuya@tcha.org>
parents:
24125
diff
changeset
|
49 |
24125
18af6ebd4001
resolve: silence warning of unknown pats for -l/--list (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
23025
diff
changeset
|
50 resolving an unknown path should emit a warning, but not for -l |
23020
dfad19274d85
test-resolve: clarify test descriptions and consistently use "should"
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
21947
diff
changeset
|
51 |
21265
232de244ab6f
resolve: print warning when no work performed (issue4208)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
21264
diff
changeset
|
52 $ hg resolve -m does-not-exist |
21721
6539c4e9c874
resolve: fix grammar of no matching files message
Matt Mackall <mpm@selenic.com>
parents:
21541
diff
changeset
|
53 arguments do not match paths that need resolving |
24125
18af6ebd4001
resolve: silence warning of unknown pats for -l/--list (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
23025
diff
changeset
|
54 $ hg resolve -l does-not-exist |
21265
232de244ab6f
resolve: print warning when no work performed (issue4208)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
21264
diff
changeset
|
55 |
26784
c0aab5961876
commands.resolve: don't allow users to mark or unmark driver-resolved files
Siddharth Agarwal <sid0@fb.com>
parents:
26621
diff
changeset
|
56 don't allow marking or unmarking driver-resolved files |
c0aab5961876
commands.resolve: don't allow users to mark or unmark driver-resolved files
Siddharth Agarwal <sid0@fb.com>
parents:
26621
diff
changeset
|
57 |
c0aab5961876
commands.resolve: don't allow users to mark or unmark driver-resolved files
Siddharth Agarwal <sid0@fb.com>
parents:
26621
diff
changeset
|
58 $ cat > $TESTTMP/markdriver.py << EOF |
c0aab5961876
commands.resolve: don't allow users to mark or unmark driver-resolved files
Siddharth Agarwal <sid0@fb.com>
parents:
26621
diff
changeset
|
59 > '''mark and unmark files as driver-resolved''' |
c0aab5961876
commands.resolve: don't allow users to mark or unmark driver-resolved files
Siddharth Agarwal <sid0@fb.com>
parents:
26621
diff
changeset
|
60 > from mercurial import cmdutil, merge, scmutil |
c0aab5961876
commands.resolve: don't allow users to mark or unmark driver-resolved files
Siddharth Agarwal <sid0@fb.com>
parents:
26621
diff
changeset
|
61 > cmdtable = {} |
c0aab5961876
commands.resolve: don't allow users to mark or unmark driver-resolved files
Siddharth Agarwal <sid0@fb.com>
parents:
26621
diff
changeset
|
62 > command = cmdutil.command(cmdtable) |
c0aab5961876
commands.resolve: don't allow users to mark or unmark driver-resolved files
Siddharth Agarwal <sid0@fb.com>
parents:
26621
diff
changeset
|
63 > @command('markdriver', |
c0aab5961876
commands.resolve: don't allow users to mark or unmark driver-resolved files
Siddharth Agarwal <sid0@fb.com>
parents:
26621
diff
changeset
|
64 > [('u', 'unmark', None, '')], |
c0aab5961876
commands.resolve: don't allow users to mark or unmark driver-resolved files
Siddharth Agarwal <sid0@fb.com>
parents:
26621
diff
changeset
|
65 > 'FILE...') |
c0aab5961876
commands.resolve: don't allow users to mark or unmark driver-resolved files
Siddharth Agarwal <sid0@fb.com>
parents:
26621
diff
changeset
|
66 > def markdriver(ui, repo, *pats, **opts): |
c0aab5961876
commands.resolve: don't allow users to mark or unmark driver-resolved files
Siddharth Agarwal <sid0@fb.com>
parents:
26621
diff
changeset
|
67 > wlock = repo.wlock() |
c0aab5961876
commands.resolve: don't allow users to mark or unmark driver-resolved files
Siddharth Agarwal <sid0@fb.com>
parents:
26621
diff
changeset
|
68 > try: |
26997
1791f9aa782f
test-resolve.t: switch to mergestate.read()
Siddharth Agarwal <sid0@fb.com>
parents:
26969
diff
changeset
|
69 > ms = merge.mergestate.read(repo) |
26784
c0aab5961876
commands.resolve: don't allow users to mark or unmark driver-resolved files
Siddharth Agarwal <sid0@fb.com>
parents:
26621
diff
changeset
|
70 > m = scmutil.match(repo[None], pats, opts) |
c0aab5961876
commands.resolve: don't allow users to mark or unmark driver-resolved files
Siddharth Agarwal <sid0@fb.com>
parents:
26621
diff
changeset
|
71 > for f in ms: |
c0aab5961876
commands.resolve: don't allow users to mark or unmark driver-resolved files
Siddharth Agarwal <sid0@fb.com>
parents:
26621
diff
changeset
|
72 > if not m(f): |
c0aab5961876
commands.resolve: don't allow users to mark or unmark driver-resolved files
Siddharth Agarwal <sid0@fb.com>
parents:
26621
diff
changeset
|
73 > continue |
c0aab5961876
commands.resolve: don't allow users to mark or unmark driver-resolved files
Siddharth Agarwal <sid0@fb.com>
parents:
26621
diff
changeset
|
74 > if not opts['unmark']: |
c0aab5961876
commands.resolve: don't allow users to mark or unmark driver-resolved files
Siddharth Agarwal <sid0@fb.com>
parents:
26621
diff
changeset
|
75 > ms.mark(f, 'd') |
c0aab5961876
commands.resolve: don't allow users to mark or unmark driver-resolved files
Siddharth Agarwal <sid0@fb.com>
parents:
26621
diff
changeset
|
76 > else: |
c0aab5961876
commands.resolve: don't allow users to mark or unmark driver-resolved files
Siddharth Agarwal <sid0@fb.com>
parents:
26621
diff
changeset
|
77 > ms.mark(f, 'u') |
c0aab5961876
commands.resolve: don't allow users to mark or unmark driver-resolved files
Siddharth Agarwal <sid0@fb.com>
parents:
26621
diff
changeset
|
78 > ms.commit() |
c0aab5961876
commands.resolve: don't allow users to mark or unmark driver-resolved files
Siddharth Agarwal <sid0@fb.com>
parents:
26621
diff
changeset
|
79 > finally: |
c0aab5961876
commands.resolve: don't allow users to mark or unmark driver-resolved files
Siddharth Agarwal <sid0@fb.com>
parents:
26621
diff
changeset
|
80 > wlock.release() |
c0aab5961876
commands.resolve: don't allow users to mark or unmark driver-resolved files
Siddharth Agarwal <sid0@fb.com>
parents:
26621
diff
changeset
|
81 > EOF |
c0aab5961876
commands.resolve: don't allow users to mark or unmark driver-resolved files
Siddharth Agarwal <sid0@fb.com>
parents:
26621
diff
changeset
|
82 $ hg --config extensions.markdriver=$TESTTMP/markdriver.py markdriver file1 |
c0aab5961876
commands.resolve: don't allow users to mark or unmark driver-resolved files
Siddharth Agarwal <sid0@fb.com>
parents:
26621
diff
changeset
|
83 $ hg resolve --list |
c0aab5961876
commands.resolve: don't allow users to mark or unmark driver-resolved files
Siddharth Agarwal <sid0@fb.com>
parents:
26621
diff
changeset
|
84 D file1 |
c0aab5961876
commands.resolve: don't allow users to mark or unmark driver-resolved files
Siddharth Agarwal <sid0@fb.com>
parents:
26621
diff
changeset
|
85 U file2 |
c0aab5961876
commands.resolve: don't allow users to mark or unmark driver-resolved files
Siddharth Agarwal <sid0@fb.com>
parents:
26621
diff
changeset
|
86 $ hg resolve --mark file1 |
c0aab5961876
commands.resolve: don't allow users to mark or unmark driver-resolved files
Siddharth Agarwal <sid0@fb.com>
parents:
26621
diff
changeset
|
87 not marking file1 as it is driver-resolved |
c0aab5961876
commands.resolve: don't allow users to mark or unmark driver-resolved files
Siddharth Agarwal <sid0@fb.com>
parents:
26621
diff
changeset
|
88 this should not print out file1 |
c0aab5961876
commands.resolve: don't allow users to mark or unmark driver-resolved files
Siddharth Agarwal <sid0@fb.com>
parents:
26621
diff
changeset
|
89 $ hg resolve --mark --all |
c0aab5961876
commands.resolve: don't allow users to mark or unmark driver-resolved files
Siddharth Agarwal <sid0@fb.com>
parents:
26621
diff
changeset
|
90 (no more unresolved files -- run "hg resolve --all" to conclude) |
c0aab5961876
commands.resolve: don't allow users to mark or unmark driver-resolved files
Siddharth Agarwal <sid0@fb.com>
parents:
26621
diff
changeset
|
91 $ hg resolve --mark 'glob:file*' |
c0aab5961876
commands.resolve: don't allow users to mark or unmark driver-resolved files
Siddharth Agarwal <sid0@fb.com>
parents:
26621
diff
changeset
|
92 (no more unresolved files -- run "hg resolve --all" to conclude) |
c0aab5961876
commands.resolve: don't allow users to mark or unmark driver-resolved files
Siddharth Agarwal <sid0@fb.com>
parents:
26621
diff
changeset
|
93 $ hg resolve --list |
c0aab5961876
commands.resolve: don't allow users to mark or unmark driver-resolved files
Siddharth Agarwal <sid0@fb.com>
parents:
26621
diff
changeset
|
94 D file1 |
c0aab5961876
commands.resolve: don't allow users to mark or unmark driver-resolved files
Siddharth Agarwal <sid0@fb.com>
parents:
26621
diff
changeset
|
95 R file2 |
c0aab5961876
commands.resolve: don't allow users to mark or unmark driver-resolved files
Siddharth Agarwal <sid0@fb.com>
parents:
26621
diff
changeset
|
96 $ hg resolve --unmark file1 |
c0aab5961876
commands.resolve: don't allow users to mark or unmark driver-resolved files
Siddharth Agarwal <sid0@fb.com>
parents:
26621
diff
changeset
|
97 not unmarking file1 as it is driver-resolved |
c0aab5961876
commands.resolve: don't allow users to mark or unmark driver-resolved files
Siddharth Agarwal <sid0@fb.com>
parents:
26621
diff
changeset
|
98 (no more unresolved files -- run "hg resolve --all" to conclude) |
c0aab5961876
commands.resolve: don't allow users to mark or unmark driver-resolved files
Siddharth Agarwal <sid0@fb.com>
parents:
26621
diff
changeset
|
99 $ hg resolve --unmark --all |
c0aab5961876
commands.resolve: don't allow users to mark or unmark driver-resolved files
Siddharth Agarwal <sid0@fb.com>
parents:
26621
diff
changeset
|
100 $ hg resolve --list |
c0aab5961876
commands.resolve: don't allow users to mark or unmark driver-resolved files
Siddharth Agarwal <sid0@fb.com>
parents:
26621
diff
changeset
|
101 D file1 |
c0aab5961876
commands.resolve: don't allow users to mark or unmark driver-resolved files
Siddharth Agarwal <sid0@fb.com>
parents:
26621
diff
changeset
|
102 U file2 |
c0aab5961876
commands.resolve: don't allow users to mark or unmark driver-resolved files
Siddharth Agarwal <sid0@fb.com>
parents:
26621
diff
changeset
|
103 $ hg --config extensions.markdriver=$TESTTMP/markdriver.py markdriver --unmark file1 |
c0aab5961876
commands.resolve: don't allow users to mark or unmark driver-resolved files
Siddharth Agarwal <sid0@fb.com>
parents:
26621
diff
changeset
|
104 $ hg resolve --list |
c0aab5961876
commands.resolve: don't allow users to mark or unmark driver-resolved files
Siddharth Agarwal <sid0@fb.com>
parents:
26621
diff
changeset
|
105 U file1 |
c0aab5961876
commands.resolve: don't allow users to mark or unmark driver-resolved files
Siddharth Agarwal <sid0@fb.com>
parents:
26621
diff
changeset
|
106 U file2 |
c0aab5961876
commands.resolve: don't allow users to mark or unmark driver-resolved files
Siddharth Agarwal <sid0@fb.com>
parents:
26621
diff
changeset
|
107 |
21263
f3e37409ecd3
resolve: split test
Gregory Szorc <gregory.szorc@gmail.com>
parents:
16913
diff
changeset
|
108 resolve the failure |
f3e37409ecd3
resolve: split test
Gregory Szorc <gregory.szorc@gmail.com>
parents:
16913
diff
changeset
|
109 |
23021
41770cee3c6a
test-resolve: add test resolving one of two files
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23020
diff
changeset
|
110 $ echo resolved > file1 |
41770cee3c6a
test-resolve: add test resolving one of two files
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23020
diff
changeset
|
111 $ hg resolve -m file1 |
41770cee3c6a
test-resolve: add test resolving one of two files
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23020
diff
changeset
|
112 |
41770cee3c6a
test-resolve: add test resolving one of two files
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23020
diff
changeset
|
113 resolve -l should show resolved file as resolved |
41770cee3c6a
test-resolve: add test resolving one of two files
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23020
diff
changeset
|
114 |
41770cee3c6a
test-resolve: add test resolving one of two files
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23020
diff
changeset
|
115 $ hg resolve -l |
41770cee3c6a
test-resolve: add test resolving one of two files
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23020
diff
changeset
|
116 R file1 |
41770cee3c6a
test-resolve: add test resolving one of two files
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23020
diff
changeset
|
117 U file2 |
41770cee3c6a
test-resolve: add test resolving one of two files
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23020
diff
changeset
|
118 |
24127
4cb8002658d6
resolve: port to generic templater
Yuya Nishihara <yuya@tcha.org>
parents:
24125
diff
changeset
|
119 $ hg resolve -l -Tjson |
4cb8002658d6
resolve: port to generic templater
Yuya Nishihara <yuya@tcha.org>
parents:
24125
diff
changeset
|
120 [ |
4cb8002658d6
resolve: port to generic templater
Yuya Nishihara <yuya@tcha.org>
parents:
24125
diff
changeset
|
121 { |
4cb8002658d6
resolve: port to generic templater
Yuya Nishihara <yuya@tcha.org>
parents:
24125
diff
changeset
|
122 "path": "file1", |
4cb8002658d6
resolve: port to generic templater
Yuya Nishihara <yuya@tcha.org>
parents:
24125
diff
changeset
|
123 "status": "R" |
4cb8002658d6
resolve: port to generic templater
Yuya Nishihara <yuya@tcha.org>
parents:
24125
diff
changeset
|
124 }, |
4cb8002658d6
resolve: port to generic templater
Yuya Nishihara <yuya@tcha.org>
parents:
24125
diff
changeset
|
125 { |
4cb8002658d6
resolve: port to generic templater
Yuya Nishihara <yuya@tcha.org>
parents:
24125
diff
changeset
|
126 "path": "file2", |
4cb8002658d6
resolve: port to generic templater
Yuya Nishihara <yuya@tcha.org>
parents:
24125
diff
changeset
|
127 "status": "U" |
4cb8002658d6
resolve: port to generic templater
Yuya Nishihara <yuya@tcha.org>
parents:
24125
diff
changeset
|
128 } |
4cb8002658d6
resolve: port to generic templater
Yuya Nishihara <yuya@tcha.org>
parents:
24125
diff
changeset
|
129 ] |
4cb8002658d6
resolve: port to generic templater
Yuya Nishihara <yuya@tcha.org>
parents:
24125
diff
changeset
|
130 |
23021
41770cee3c6a
test-resolve: add test resolving one of two files
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23020
diff
changeset
|
131 resolve -m without paths should mark all resolved |
41770cee3c6a
test-resolve: add test resolving one of two files
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23020
diff
changeset
|
132 |
41770cee3c6a
test-resolve: add test resolving one of two files
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23020
diff
changeset
|
133 $ hg resolve -m |
21947
b081decd9062
resolve: add parenthesis around "no more unresolved files" message
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21721
diff
changeset
|
134 (no more unresolved files) |
12117
a40372c1c731
tests: unify test-resolve
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11451
diff
changeset
|
135 $ hg commit -m 'resolved' |
7734 | 136 |
23020
dfad19274d85
test-resolve: clarify test descriptions and consistently use "should"
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
21947
diff
changeset
|
137 resolve -l should be empty after commit |
12117
a40372c1c731
tests: unify test-resolve
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11451
diff
changeset
|
138 |
a40372c1c731
tests: unify test-resolve
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11451
diff
changeset
|
139 $ hg resolve -l |
21541
6062593d8b06
resolve: don't abort resolve -l even when no merge is in progress
Siddharth Agarwal <sid0@fb.com>
parents:
21267
diff
changeset
|
140 |
24127
4cb8002658d6
resolve: port to generic templater
Yuya Nishihara <yuya@tcha.org>
parents:
24125
diff
changeset
|
141 $ hg resolve -l -Tjson |
4cb8002658d6
resolve: port to generic templater
Yuya Nishihara <yuya@tcha.org>
parents:
24125
diff
changeset
|
142 [ |
4cb8002658d6
resolve: port to generic templater
Yuya Nishihara <yuya@tcha.org>
parents:
24125
diff
changeset
|
143 ] |
4cb8002658d6
resolve: port to generic templater
Yuya Nishihara <yuya@tcha.org>
parents:
24125
diff
changeset
|
144 |
23022
ace380a0619b
test-resolve: add more tests for in conflict-free states
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23021
diff
changeset
|
145 resolve --all should abort when no merge in progress |
ace380a0619b
test-resolve: add more tests for in conflict-free states
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23021
diff
changeset
|
146 |
ace380a0619b
test-resolve: add more tests for in conflict-free states
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23021
diff
changeset
|
147 $ hg resolve --all |
ace380a0619b
test-resolve: add more tests for in conflict-free states
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23021
diff
changeset
|
148 abort: resolve command not applicable when not merging |
ace380a0619b
test-resolve: add more tests for in conflict-free states
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23021
diff
changeset
|
149 [255] |
ace380a0619b
test-resolve: add more tests for in conflict-free states
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23021
diff
changeset
|
150 |
23020
dfad19274d85
test-resolve: clarify test descriptions and consistently use "should"
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
21947
diff
changeset
|
151 resolve -m should abort when no merge in progress |
dfad19274d85
test-resolve: clarify test descriptions and consistently use "should"
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
21947
diff
changeset
|
152 |
21541
6062593d8b06
resolve: don't abort resolve -l even when no merge is in progress
Siddharth Agarwal <sid0@fb.com>
parents:
21267
diff
changeset
|
153 $ hg resolve -m |
21264
4e932dc5c113
resolve: abort when not applicable (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
21263
diff
changeset
|
154 abort: resolve command not applicable when not merging |
4e932dc5c113
resolve: abort when not applicable (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
21263
diff
changeset
|
155 [255] |
12117
a40372c1c731
tests: unify test-resolve
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11451
diff
changeset
|
156 |
23022
ace380a0619b
test-resolve: add more tests for in conflict-free states
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23021
diff
changeset
|
157 set up conflict-free merge |
ace380a0619b
test-resolve: add more tests for in conflict-free states
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23021
diff
changeset
|
158 |
ace380a0619b
test-resolve: add more tests for in conflict-free states
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23021
diff
changeset
|
159 $ hg up -qC 3 |
ace380a0619b
test-resolve: add more tests for in conflict-free states
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23021
diff
changeset
|
160 $ hg merge 1 |
ace380a0619b
test-resolve: add more tests for in conflict-free states
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23021
diff
changeset
|
161 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
ace380a0619b
test-resolve: add more tests for in conflict-free states
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23021
diff
changeset
|
162 (branch merge, don't forget to commit) |
ace380a0619b
test-resolve: add more tests for in conflict-free states
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23021
diff
changeset
|
163 |
23024
ec36969497de
resolve: run happily after conflict-free merge
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23023
diff
changeset
|
164 resolve --all should do nothing in merge without conflicts |
23022
ace380a0619b
test-resolve: add more tests for in conflict-free states
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23021
diff
changeset
|
165 $ hg resolve --all |
23024
ec36969497de
resolve: run happily after conflict-free merge
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23023
diff
changeset
|
166 (no more unresolved files) |
23022
ace380a0619b
test-resolve: add more tests for in conflict-free states
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23021
diff
changeset
|
167 |
23024
ec36969497de
resolve: run happily after conflict-free merge
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23023
diff
changeset
|
168 resolve -m should do nothing in merge without conflicts |
23022
ace380a0619b
test-resolve: add more tests for in conflict-free states
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23021
diff
changeset
|
169 |
ace380a0619b
test-resolve: add more tests for in conflict-free states
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23021
diff
changeset
|
170 $ hg resolve -m |
23024
ec36969497de
resolve: run happily after conflict-free merge
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23023
diff
changeset
|
171 (no more unresolved files) |
23022
ace380a0619b
test-resolve: add more tests for in conflict-free states
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23021
diff
changeset
|
172 |
23023
63c9088bebad
test-resolve: add tests for re-merge
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23022
diff
changeset
|
173 get back to conflicting state |
63c9088bebad
test-resolve: add tests for re-merge
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23022
diff
changeset
|
174 |
63c9088bebad
test-resolve: add tests for re-merge
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23022
diff
changeset
|
175 $ hg up -qC 2 |
63c9088bebad
test-resolve: add tests for re-merge
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23022
diff
changeset
|
176 $ hg merge --tool=internal:fail 1 |
63c9088bebad
test-resolve: add tests for re-merge
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23022
diff
changeset
|
177 0 files updated, 0 files merged, 0 files removed, 2 files unresolved |
63c9088bebad
test-resolve: add tests for re-merge
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23022
diff
changeset
|
178 use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon |
63c9088bebad
test-resolve: add tests for re-merge
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23022
diff
changeset
|
179 [1] |
63c9088bebad
test-resolve: add tests for re-merge
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23022
diff
changeset
|
180 |
63c9088bebad
test-resolve: add tests for re-merge
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23022
diff
changeset
|
181 resolve without arguments should suggest --all |
63c9088bebad
test-resolve: add tests for re-merge
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23022
diff
changeset
|
182 $ hg resolve |
63c9088bebad
test-resolve: add tests for re-merge
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23022
diff
changeset
|
183 abort: no files or directories specified |
26352
e635bc9bb7d9
resolve: consistently describe re-merge + unresolved
timeless@mozdev.org
parents:
24127
diff
changeset
|
184 (use --all to re-merge all unresolved files) |
23023
63c9088bebad
test-resolve: add tests for re-merge
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23022
diff
changeset
|
185 [255] |
63c9088bebad
test-resolve: add tests for re-merge
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23022
diff
changeset
|
186 |
63c9088bebad
test-resolve: add tests for re-merge
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23022
diff
changeset
|
187 resolve --all should re-merge all unresolved files |
26619
3b213a904b98
test-resolve.t: add some output to show order of operations
Siddharth Agarwal <sid0@fb.com>
parents:
26614
diff
changeset
|
188 $ hg resolve --all |
3b213a904b98
test-resolve.t: add some output to show order of operations
Siddharth Agarwal <sid0@fb.com>
parents:
26614
diff
changeset
|
189 merging file1 |
26621
36383507a6f8
resolve: perform all premerges before performing any file merges (BC)
Siddharth Agarwal <sid0@fb.com>
parents:
26620
diff
changeset
|
190 merging file2 |
26614
ef1eb6df7071
simplemerge: move conflict warning message to filemerge
Siddharth Agarwal <sid0@fb.com>
parents:
26352
diff
changeset
|
191 warning: conflicts while merging file1! (edit, then use 'hg resolve --mark') |
ef1eb6df7071
simplemerge: move conflict warning message to filemerge
Siddharth Agarwal <sid0@fb.com>
parents:
26352
diff
changeset
|
192 warning: conflicts while merging file2! (edit, then use 'hg resolve --mark') |
23023
63c9088bebad
test-resolve: add tests for re-merge
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23022
diff
changeset
|
193 [1] |
26620
7955127efbcb
test-resolve.t: add some tests for .orig file contents
Siddharth Agarwal <sid0@fb.com>
parents:
26619
diff
changeset
|
194 $ cat file1.orig |
7955127efbcb
test-resolve.t: add some tests for .orig file contents
Siddharth Agarwal <sid0@fb.com>
parents:
26619
diff
changeset
|
195 foo |
7955127efbcb
test-resolve.t: add some tests for .orig file contents
Siddharth Agarwal <sid0@fb.com>
parents:
26619
diff
changeset
|
196 baz |
7955127efbcb
test-resolve.t: add some tests for .orig file contents
Siddharth Agarwal <sid0@fb.com>
parents:
26619
diff
changeset
|
197 $ cat file2.orig |
7955127efbcb
test-resolve.t: add some tests for .orig file contents
Siddharth Agarwal <sid0@fb.com>
parents:
26619
diff
changeset
|
198 foo |
7955127efbcb
test-resolve.t: add some tests for .orig file contents
Siddharth Agarwal <sid0@fb.com>
parents:
26619
diff
changeset
|
199 baz |
26939
50d2389a2e49
resolve: choose where .orig file locations are kept
Christian Delahousse <cdelahousse@fb.com>
parents:
26784
diff
changeset
|
200 |
50d2389a2e49
resolve: choose where .orig file locations are kept
Christian Delahousse <cdelahousse@fb.com>
parents:
26784
diff
changeset
|
201 .orig files should exists where specified |
50d2389a2e49
resolve: choose where .orig file locations are kept
Christian Delahousse <cdelahousse@fb.com>
parents:
26784
diff
changeset
|
202 $ hg resolve --all --verbose --config 'ui.origbackuppath=.hg/origbackups' |
50d2389a2e49
resolve: choose where .orig file locations are kept
Christian Delahousse <cdelahousse@fb.com>
parents:
26784
diff
changeset
|
203 merging file1 |
26969
b54b520a24c2
tests: fix globs for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
26939
diff
changeset
|
204 creating directory: $TESTTMP/repo/.hg/origbackups (glob) |
26939
50d2389a2e49
resolve: choose where .orig file locations are kept
Christian Delahousse <cdelahousse@fb.com>
parents:
26784
diff
changeset
|
205 merging file2 |
50d2389a2e49
resolve: choose where .orig file locations are kept
Christian Delahousse <cdelahousse@fb.com>
parents:
26784
diff
changeset
|
206 warning: conflicts while merging file1! (edit, then use 'hg resolve --mark') |
50d2389a2e49
resolve: choose where .orig file locations are kept
Christian Delahousse <cdelahousse@fb.com>
parents:
26784
diff
changeset
|
207 warning: conflicts while merging file2! (edit, then use 'hg resolve --mark') |
50d2389a2e49
resolve: choose where .orig file locations are kept
Christian Delahousse <cdelahousse@fb.com>
parents:
26784
diff
changeset
|
208 [1] |
50d2389a2e49
resolve: choose where .orig file locations are kept
Christian Delahousse <cdelahousse@fb.com>
parents:
26784
diff
changeset
|
209 $ ls .hg/origbackups |
50d2389a2e49
resolve: choose where .orig file locations are kept
Christian Delahousse <cdelahousse@fb.com>
parents:
26784
diff
changeset
|
210 file1.orig |
50d2389a2e49
resolve: choose where .orig file locations are kept
Christian Delahousse <cdelahousse@fb.com>
parents:
26784
diff
changeset
|
211 file2.orig |
23025
b8dd8432395d
test-resolve.t: use redirection to /dev/null instead of grep -q
Augie Fackler <raf@durin42.com>
parents:
23024
diff
changeset
|
212 $ grep '<<<' file1 > /dev/null |
b8dd8432395d
test-resolve.t: use redirection to /dev/null instead of grep -q
Augie Fackler <raf@durin42.com>
parents:
23024
diff
changeset
|
213 $ grep '<<<' file2 > /dev/null |
23023
63c9088bebad
test-resolve: add tests for re-merge
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23022
diff
changeset
|
214 |
63c9088bebad
test-resolve: add tests for re-merge
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23022
diff
changeset
|
215 resolve <file> should re-merge file |
63c9088bebad
test-resolve: add tests for re-merge
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23022
diff
changeset
|
216 $ echo resolved > file1 |
63c9088bebad
test-resolve: add tests for re-merge
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23022
diff
changeset
|
217 $ hg resolve -q file1 |
26614
ef1eb6df7071
simplemerge: move conflict warning message to filemerge
Siddharth Agarwal <sid0@fb.com>
parents:
26352
diff
changeset
|
218 warning: conflicts while merging file1! (edit, then use 'hg resolve --mark') |
23023
63c9088bebad
test-resolve: add tests for re-merge
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23022
diff
changeset
|
219 [1] |
23025
b8dd8432395d
test-resolve.t: use redirection to /dev/null instead of grep -q
Augie Fackler <raf@durin42.com>
parents:
23024
diff
changeset
|
220 $ grep '<<<' file1 > /dev/null |
23023
63c9088bebad
test-resolve: add tests for re-merge
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23022
diff
changeset
|
221 |
26959
ed5f20f9c22e
resolve: restore .orig only after merge is fully complete (issue4952)
Siddharth Agarwal <sid0@fb.com>
parents:
26784
diff
changeset
|
222 test .orig behavior with resolve |
ed5f20f9c22e
resolve: restore .orig only after merge is fully complete (issue4952)
Siddharth Agarwal <sid0@fb.com>
parents:
26784
diff
changeset
|
223 |
ed5f20f9c22e
resolve: restore .orig only after merge is fully complete (issue4952)
Siddharth Agarwal <sid0@fb.com>
parents:
26784
diff
changeset
|
224 $ hg resolve -q file1 --tool 'f --dump $TESTTMP/repo/file1.orig' |
ed5f20f9c22e
resolve: restore .orig only after merge is fully complete (issue4952)
Siddharth Agarwal <sid0@fb.com>
parents:
26784
diff
changeset
|
225 */file1~base*: (glob) |
ed5f20f9c22e
resolve: restore .orig only after merge is fully complete (issue4952)
Siddharth Agarwal <sid0@fb.com>
parents:
26784
diff
changeset
|
226 >>> |
ed5f20f9c22e
resolve: restore .orig only after merge is fully complete (issue4952)
Siddharth Agarwal <sid0@fb.com>
parents:
26784
diff
changeset
|
227 foo |
ed5f20f9c22e
resolve: restore .orig only after merge is fully complete (issue4952)
Siddharth Agarwal <sid0@fb.com>
parents:
26784
diff
changeset
|
228 <<< |
ed5f20f9c22e
resolve: restore .orig only after merge is fully complete (issue4952)
Siddharth Agarwal <sid0@fb.com>
parents:
26784
diff
changeset
|
229 */file1~other*: (glob) |
ed5f20f9c22e
resolve: restore .orig only after merge is fully complete (issue4952)
Siddharth Agarwal <sid0@fb.com>
parents:
26784
diff
changeset
|
230 >>> |
ed5f20f9c22e
resolve: restore .orig only after merge is fully complete (issue4952)
Siddharth Agarwal <sid0@fb.com>
parents:
26784
diff
changeset
|
231 foo |
ed5f20f9c22e
resolve: restore .orig only after merge is fully complete (issue4952)
Siddharth Agarwal <sid0@fb.com>
parents:
26784
diff
changeset
|
232 bar |
ed5f20f9c22e
resolve: restore .orig only after merge is fully complete (issue4952)
Siddharth Agarwal <sid0@fb.com>
parents:
26784
diff
changeset
|
233 <<< |
ed5f20f9c22e
resolve: restore .orig only after merge is fully complete (issue4952)
Siddharth Agarwal <sid0@fb.com>
parents:
26784
diff
changeset
|
234 $TESTTMP/repo/file1: (glob) |
ed5f20f9c22e
resolve: restore .orig only after merge is fully complete (issue4952)
Siddharth Agarwal <sid0@fb.com>
parents:
26784
diff
changeset
|
235 >>> |
ed5f20f9c22e
resolve: restore .orig only after merge is fully complete (issue4952)
Siddharth Agarwal <sid0@fb.com>
parents:
26784
diff
changeset
|
236 foo |
ed5f20f9c22e
resolve: restore .orig only after merge is fully complete (issue4952)
Siddharth Agarwal <sid0@fb.com>
parents:
26784
diff
changeset
|
237 baz |
ed5f20f9c22e
resolve: restore .orig only after merge is fully complete (issue4952)
Siddharth Agarwal <sid0@fb.com>
parents:
26784
diff
changeset
|
238 <<< |
ed5f20f9c22e
resolve: restore .orig only after merge is fully complete (issue4952)
Siddharth Agarwal <sid0@fb.com>
parents:
26784
diff
changeset
|
239 $TESTTMP/repo/file1.orig: (glob) |
ed5f20f9c22e
resolve: restore .orig only after merge is fully complete (issue4952)
Siddharth Agarwal <sid0@fb.com>
parents:
26784
diff
changeset
|
240 >>> |
ed5f20f9c22e
resolve: restore .orig only after merge is fully complete (issue4952)
Siddharth Agarwal <sid0@fb.com>
parents:
26784
diff
changeset
|
241 foo |
ed5f20f9c22e
resolve: restore .orig only after merge is fully complete (issue4952)
Siddharth Agarwal <sid0@fb.com>
parents:
26784
diff
changeset
|
242 baz |
ed5f20f9c22e
resolve: restore .orig only after merge is fully complete (issue4952)
Siddharth Agarwal <sid0@fb.com>
parents:
26784
diff
changeset
|
243 <<< |
ed5f20f9c22e
resolve: restore .orig only after merge is fully complete (issue4952)
Siddharth Agarwal <sid0@fb.com>
parents:
26784
diff
changeset
|
244 |
23023
63c9088bebad
test-resolve: add tests for re-merge
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23022
diff
changeset
|
245 resolve <file> should do nothing if 'file' was marked resolved |
63c9088bebad
test-resolve: add tests for re-merge
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23022
diff
changeset
|
246 $ echo resolved > file1 |
63c9088bebad
test-resolve: add tests for re-merge
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23022
diff
changeset
|
247 $ hg resolve -m file1 |
63c9088bebad
test-resolve: add tests for re-merge
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23022
diff
changeset
|
248 $ hg resolve -q file1 |
63c9088bebad
test-resolve: add tests for re-merge
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23022
diff
changeset
|
249 $ cat file1 |
63c9088bebad
test-resolve: add tests for re-merge
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23022
diff
changeset
|
250 resolved |
63c9088bebad
test-resolve: add tests for re-merge
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23022
diff
changeset
|
251 |
27027
a01ecbcfaf84
mergestate: handle additional record types specially
Siddharth Agarwal <sid0@fb.com>
parents:
27026
diff
changeset
|
252 insert unsupported advisory merge record |
a01ecbcfaf84
mergestate: handle additional record types specially
Siddharth Agarwal <sid0@fb.com>
parents:
27026
diff
changeset
|
253 |
a01ecbcfaf84
mergestate: handle additional record types specially
Siddharth Agarwal <sid0@fb.com>
parents:
27026
diff
changeset
|
254 $ hg --config extensions.fakemergerecord=$TESTDIR/fakemergerecord.py fakemergerecord -x |
a01ecbcfaf84
mergestate: handle additional record types specially
Siddharth Agarwal <sid0@fb.com>
parents:
27026
diff
changeset
|
255 $ hg debugmergestate |
a01ecbcfaf84
mergestate: handle additional record types specially
Siddharth Agarwal <sid0@fb.com>
parents:
27026
diff
changeset
|
256 * version 2 records |
a01ecbcfaf84
mergestate: handle additional record types specially
Siddharth Agarwal <sid0@fb.com>
parents:
27026
diff
changeset
|
257 local: 57653b9f834a4493f7240b0681efcb9ae7cab745 |
a01ecbcfaf84
mergestate: handle additional record types specially
Siddharth Agarwal <sid0@fb.com>
parents:
27026
diff
changeset
|
258 other: dc77451844e37f03f5c559e3b8529b2b48d381d1 |
a01ecbcfaf84
mergestate: handle additional record types specially
Siddharth Agarwal <sid0@fb.com>
parents:
27026
diff
changeset
|
259 unrecognized entry: x advisory record |
a01ecbcfaf84
mergestate: handle additional record types specially
Siddharth Agarwal <sid0@fb.com>
parents:
27026
diff
changeset
|
260 file: file1 (record type "F", state "r", hash 60b27f004e454aca81b0480209cce5081ec52390) |
a01ecbcfaf84
mergestate: handle additional record types specially
Siddharth Agarwal <sid0@fb.com>
parents:
27026
diff
changeset
|
261 local path: file1 (flags "") |
a01ecbcfaf84
mergestate: handle additional record types specially
Siddharth Agarwal <sid0@fb.com>
parents:
27026
diff
changeset
|
262 ancestor path: file1 (node 2ed2a3912a0b24502043eae84ee4b279c18b90dd) |
a01ecbcfaf84
mergestate: handle additional record types specially
Siddharth Agarwal <sid0@fb.com>
parents:
27026
diff
changeset
|
263 other path: file1 (node 6f4310b00b9a147241b071a60c28a650827fb03d) |
a01ecbcfaf84
mergestate: handle additional record types specially
Siddharth Agarwal <sid0@fb.com>
parents:
27026
diff
changeset
|
264 file: file2 (record type "F", state "u", hash cb99b709a1978bd205ab9dfd4c5aaa1fc91c7523) |
a01ecbcfaf84
mergestate: handle additional record types specially
Siddharth Agarwal <sid0@fb.com>
parents:
27026
diff
changeset
|
265 local path: file2 (flags "") |
a01ecbcfaf84
mergestate: handle additional record types specially
Siddharth Agarwal <sid0@fb.com>
parents:
27026
diff
changeset
|
266 ancestor path: file2 (node 2ed2a3912a0b24502043eae84ee4b279c18b90dd) |
a01ecbcfaf84
mergestate: handle additional record types specially
Siddharth Agarwal <sid0@fb.com>
parents:
27026
diff
changeset
|
267 other path: file2 (node 6f4310b00b9a147241b071a60c28a650827fb03d) |
a01ecbcfaf84
mergestate: handle additional record types specially
Siddharth Agarwal <sid0@fb.com>
parents:
27026
diff
changeset
|
268 $ hg resolve -l |
a01ecbcfaf84
mergestate: handle additional record types specially
Siddharth Agarwal <sid0@fb.com>
parents:
27026
diff
changeset
|
269 R file1 |
a01ecbcfaf84
mergestate: handle additional record types specially
Siddharth Agarwal <sid0@fb.com>
parents:
27026
diff
changeset
|
270 U file2 |
a01ecbcfaf84
mergestate: handle additional record types specially
Siddharth Agarwal <sid0@fb.com>
parents:
27026
diff
changeset
|
271 |
a01ecbcfaf84
mergestate: handle additional record types specially
Siddharth Agarwal <sid0@fb.com>
parents:
27026
diff
changeset
|
272 insert unsupported mandatory merge record |
a01ecbcfaf84
mergestate: handle additional record types specially
Siddharth Agarwal <sid0@fb.com>
parents:
27026
diff
changeset
|
273 |
a01ecbcfaf84
mergestate: handle additional record types specially
Siddharth Agarwal <sid0@fb.com>
parents:
27026
diff
changeset
|
274 $ hg --config extensions.fakemergerecord=$TESTDIR/fakemergerecord.py fakemergerecord -X |
a01ecbcfaf84
mergestate: handle additional record types specially
Siddharth Agarwal <sid0@fb.com>
parents:
27026
diff
changeset
|
275 $ hg debugmergestate |
a01ecbcfaf84
mergestate: handle additional record types specially
Siddharth Agarwal <sid0@fb.com>
parents:
27026
diff
changeset
|
276 * version 2 records |
a01ecbcfaf84
mergestate: handle additional record types specially
Siddharth Agarwal <sid0@fb.com>
parents:
27026
diff
changeset
|
277 local: 57653b9f834a4493f7240b0681efcb9ae7cab745 |
a01ecbcfaf84
mergestate: handle additional record types specially
Siddharth Agarwal <sid0@fb.com>
parents:
27026
diff
changeset
|
278 other: dc77451844e37f03f5c559e3b8529b2b48d381d1 |
a01ecbcfaf84
mergestate: handle additional record types specially
Siddharth Agarwal <sid0@fb.com>
parents:
27026
diff
changeset
|
279 file: file1 (record type "F", state "r", hash 60b27f004e454aca81b0480209cce5081ec52390) |
a01ecbcfaf84
mergestate: handle additional record types specially
Siddharth Agarwal <sid0@fb.com>
parents:
27026
diff
changeset
|
280 local path: file1 (flags "") |
a01ecbcfaf84
mergestate: handle additional record types specially
Siddharth Agarwal <sid0@fb.com>
parents:
27026
diff
changeset
|
281 ancestor path: file1 (node 2ed2a3912a0b24502043eae84ee4b279c18b90dd) |
a01ecbcfaf84
mergestate: handle additional record types specially
Siddharth Agarwal <sid0@fb.com>
parents:
27026
diff
changeset
|
282 other path: file1 (node 6f4310b00b9a147241b071a60c28a650827fb03d) |
a01ecbcfaf84
mergestate: handle additional record types specially
Siddharth Agarwal <sid0@fb.com>
parents:
27026
diff
changeset
|
283 file: file2 (record type "F", state "u", hash cb99b709a1978bd205ab9dfd4c5aaa1fc91c7523) |
a01ecbcfaf84
mergestate: handle additional record types specially
Siddharth Agarwal <sid0@fb.com>
parents:
27026
diff
changeset
|
284 local path: file2 (flags "") |
a01ecbcfaf84
mergestate: handle additional record types specially
Siddharth Agarwal <sid0@fb.com>
parents:
27026
diff
changeset
|
285 ancestor path: file2 (node 2ed2a3912a0b24502043eae84ee4b279c18b90dd) |
a01ecbcfaf84
mergestate: handle additional record types specially
Siddharth Agarwal <sid0@fb.com>
parents:
27026
diff
changeset
|
286 other path: file2 (node 6f4310b00b9a147241b071a60c28a650827fb03d) |
a01ecbcfaf84
mergestate: handle additional record types specially
Siddharth Agarwal <sid0@fb.com>
parents:
27026
diff
changeset
|
287 unrecognized entry: X mandatory record |
a01ecbcfaf84
mergestate: handle additional record types specially
Siddharth Agarwal <sid0@fb.com>
parents:
27026
diff
changeset
|
288 $ hg resolve -l |
a01ecbcfaf84
mergestate: handle additional record types specially
Siddharth Agarwal <sid0@fb.com>
parents:
27026
diff
changeset
|
289 abort: unsupported merge state records: X |
a01ecbcfaf84
mergestate: handle additional record types specially
Siddharth Agarwal <sid0@fb.com>
parents:
27026
diff
changeset
|
290 (see https://mercurial-scm.org/wiki/MergeStateRecords for more information) |
a01ecbcfaf84
mergestate: handle additional record types specially
Siddharth Agarwal <sid0@fb.com>
parents:
27026
diff
changeset
|
291 [255] |
a01ecbcfaf84
mergestate: handle additional record types specially
Siddharth Agarwal <sid0@fb.com>
parents:
27026
diff
changeset
|
292 $ hg resolve -ma |
a01ecbcfaf84
mergestate: handle additional record types specially
Siddharth Agarwal <sid0@fb.com>
parents:
27026
diff
changeset
|
293 abort: unsupported merge state records: X |
a01ecbcfaf84
mergestate: handle additional record types specially
Siddharth Agarwal <sid0@fb.com>
parents:
27026
diff
changeset
|
294 (see https://mercurial-scm.org/wiki/MergeStateRecords for more information) |
a01ecbcfaf84
mergestate: handle additional record types specially
Siddharth Agarwal <sid0@fb.com>
parents:
27026
diff
changeset
|
295 [255] |
a01ecbcfaf84
mergestate: handle additional record types specially
Siddharth Agarwal <sid0@fb.com>
parents:
27026
diff
changeset
|
296 $ hg summary |
a01ecbcfaf84
mergestate: handle additional record types specially
Siddharth Agarwal <sid0@fb.com>
parents:
27026
diff
changeset
|
297 parent: 2:57653b9f834a |
a01ecbcfaf84
mergestate: handle additional record types specially
Siddharth Agarwal <sid0@fb.com>
parents:
27026
diff
changeset
|
298 append baz to files |
a01ecbcfaf84
mergestate: handle additional record types specially
Siddharth Agarwal <sid0@fb.com>
parents:
27026
diff
changeset
|
299 parent: 1:dc77451844e3 |
a01ecbcfaf84
mergestate: handle additional record types specially
Siddharth Agarwal <sid0@fb.com>
parents:
27026
diff
changeset
|
300 append bar to files |
a01ecbcfaf84
mergestate: handle additional record types specially
Siddharth Agarwal <sid0@fb.com>
parents:
27026
diff
changeset
|
301 branch: default |
a01ecbcfaf84
mergestate: handle additional record types specially
Siddharth Agarwal <sid0@fb.com>
parents:
27026
diff
changeset
|
302 warning: merge state has unsupported record types: X |
a01ecbcfaf84
mergestate: handle additional record types specially
Siddharth Agarwal <sid0@fb.com>
parents:
27026
diff
changeset
|
303 commit: 2 modified, 2 unknown (merge) |
a01ecbcfaf84
mergestate: handle additional record types specially
Siddharth Agarwal <sid0@fb.com>
parents:
27026
diff
changeset
|
304 update: 2 new changesets (update) |
a01ecbcfaf84
mergestate: handle additional record types specially
Siddharth Agarwal <sid0@fb.com>
parents:
27026
diff
changeset
|
305 phases: 5 draft |
a01ecbcfaf84
mergestate: handle additional record types specially
Siddharth Agarwal <sid0@fb.com>
parents:
27026
diff
changeset
|
306 |
a01ecbcfaf84
mergestate: handle additional record types specially
Siddharth Agarwal <sid0@fb.com>
parents:
27026
diff
changeset
|
307 update --clean shouldn't abort on unsupported records |
a01ecbcfaf84
mergestate: handle additional record types specially
Siddharth Agarwal <sid0@fb.com>
parents:
27026
diff
changeset
|
308 |
a01ecbcfaf84
mergestate: handle additional record types specially
Siddharth Agarwal <sid0@fb.com>
parents:
27026
diff
changeset
|
309 $ hg up -qC 1 |
a01ecbcfaf84
mergestate: handle additional record types specially
Siddharth Agarwal <sid0@fb.com>
parents:
27026
diff
changeset
|
310 $ hg debugmergestate |
a01ecbcfaf84
mergestate: handle additional record types specially
Siddharth Agarwal <sid0@fb.com>
parents:
27026
diff
changeset
|
311 no merge state found |
a01ecbcfaf84
mergestate: handle additional record types specially
Siddharth Agarwal <sid0@fb.com>
parents:
27026
diff
changeset
|
312 |
12117
a40372c1c731
tests: unify test-resolve
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11451
diff
changeset
|
313 test crashed merge with empty mergestate |
7734 | 314 |
12117
a40372c1c731
tests: unify test-resolve
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11451
diff
changeset
|
315 $ mkdir .hg/merge |
a40372c1c731
tests: unify test-resolve
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11451
diff
changeset
|
316 $ touch .hg/merge/state |
11451
51021f4c80b5
resolve: do not crash on empty mergestate
Martin Geisler <mg@lazybytes.net>
parents:
8167
diff
changeset
|
317 |
23020
dfad19274d85
test-resolve: clarify test descriptions and consistently use "should"
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
21947
diff
changeset
|
318 resolve -l should be empty |
12117
a40372c1c731
tests: unify test-resolve
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11451
diff
changeset
|
319 |
a40372c1c731
tests: unify test-resolve
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11451
diff
changeset
|
320 $ hg resolve -l |
16913
f2719b387380
tests: add missing trailing 'cd ..'
Mads Kiilerich <mads@kiilerich.com>
parents:
12788
diff
changeset
|
321 |
f2719b387380
tests: add missing trailing 'cd ..'
Mads Kiilerich <mads@kiilerich.com>
parents:
12788
diff
changeset
|
322 $ cd .. |