Mercurial > hg
annotate tests/test-resolve.t @ 45180:a6fde9d789d9
phases: move short-lived PyObject pointers to local scope
It helps understand which object should be decrefed on goto release.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sat, 18 Jul 2020 18:38:46 +0900 |
parents | dc5e5577af39 |
children | 766797f23f77 |
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 |
35704
41ef02ba329b
merge: add `--abort` flag which can abort the merge
Pulkit Goyal <7895pulkit@gmail.com>
parents:
35393
diff
changeset
|
37 use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' 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 |
28402
7f77e71e5d7e
resolve: when pats do not match, hint about path:
timeless <timeless@mozdev.org>
parents:
28011
diff
changeset
|
56 tell users how they could have used resolve |
7f77e71e5d7e
resolve: when pats do not match, hint about path:
timeless <timeless@mozdev.org>
parents:
28011
diff
changeset
|
57 |
7f77e71e5d7e
resolve: when pats do not match, hint about path:
timeless <timeless@mozdev.org>
parents:
28011
diff
changeset
|
58 $ mkdir nested |
7f77e71e5d7e
resolve: when pats do not match, hint about path:
timeless <timeless@mozdev.org>
parents:
28011
diff
changeset
|
59 $ cd nested |
7f77e71e5d7e
resolve: when pats do not match, hint about path:
timeless <timeless@mozdev.org>
parents:
28011
diff
changeset
|
60 $ hg resolve -m file1 |
7f77e71e5d7e
resolve: when pats do not match, hint about path:
timeless <timeless@mozdev.org>
parents:
28011
diff
changeset
|
61 arguments do not match paths that need resolving |
7f77e71e5d7e
resolve: when pats do not match, hint about path:
timeless <timeless@mozdev.org>
parents:
28011
diff
changeset
|
62 (try: hg resolve -m path:file1) |
7f77e71e5d7e
resolve: when pats do not match, hint about path:
timeless <timeless@mozdev.org>
parents:
28011
diff
changeset
|
63 $ hg resolve -m file1 filez |
7f77e71e5d7e
resolve: when pats do not match, hint about path:
timeless <timeless@mozdev.org>
parents:
28011
diff
changeset
|
64 arguments do not match paths that need resolving |
7f77e71e5d7e
resolve: when pats do not match, hint about path:
timeless <timeless@mozdev.org>
parents:
28011
diff
changeset
|
65 (try: hg resolve -m path:file1 path:filez) |
7f77e71e5d7e
resolve: when pats do not match, hint about path:
timeless <timeless@mozdev.org>
parents:
28011
diff
changeset
|
66 $ hg resolve -m path:file1 path:filez |
7f77e71e5d7e
resolve: when pats do not match, hint about path:
timeless <timeless@mozdev.org>
parents:
28011
diff
changeset
|
67 $ hg resolve -l |
7f77e71e5d7e
resolve: when pats do not match, hint about path:
timeless <timeless@mozdev.org>
parents:
28011
diff
changeset
|
68 R file1 |
7f77e71e5d7e
resolve: when pats do not match, hint about path:
timeless <timeless@mozdev.org>
parents:
28011
diff
changeset
|
69 U file2 |
41511
72a9aacff645
resolve: respect ui.relative-paths
Martin von Zweigbergk <martinvonz@google.com>
parents:
41281
diff
changeset
|
70 $ hg resolve -l --config ui.relative-paths=yes |
72a9aacff645
resolve: respect ui.relative-paths
Martin von Zweigbergk <martinvonz@google.com>
parents:
41281
diff
changeset
|
71 R ../file1 |
72a9aacff645
resolve: respect ui.relative-paths
Martin von Zweigbergk <martinvonz@google.com>
parents:
41281
diff
changeset
|
72 U ../file2 |
39400
213c0493cea0
resolve: test that we suggest a valid hg command
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents:
39393
diff
changeset
|
73 $ hg resolve --re-merge filez file2 |
213c0493cea0
resolve: test that we suggest a valid hg command
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents:
39393
diff
changeset
|
74 arguments do not match paths that need resolving |
213c0493cea0
resolve: test that we suggest a valid hg command
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents:
39393
diff
changeset
|
75 (try: hg resolve --re-merge path:filez path:file2) |
28402
7f77e71e5d7e
resolve: when pats do not match, hint about path:
timeless <timeless@mozdev.org>
parents:
28011
diff
changeset
|
76 $ hg resolve -m filez file2 |
7f77e71e5d7e
resolve: when pats do not match, hint about path:
timeless <timeless@mozdev.org>
parents:
28011
diff
changeset
|
77 arguments do not match paths that need resolving |
7f77e71e5d7e
resolve: when pats do not match, hint about path:
timeless <timeless@mozdev.org>
parents:
28011
diff
changeset
|
78 (try: hg resolve -m path:filez path:file2) |
7f77e71e5d7e
resolve: when pats do not match, hint about path:
timeless <timeless@mozdev.org>
parents:
28011
diff
changeset
|
79 $ hg resolve -m path:filez path:file2 |
7f77e71e5d7e
resolve: when pats do not match, hint about path:
timeless <timeless@mozdev.org>
parents:
28011
diff
changeset
|
80 (no more unresolved files) |
7f77e71e5d7e
resolve: when pats do not match, hint about path:
timeless <timeless@mozdev.org>
parents:
28011
diff
changeset
|
81 $ hg resolve -l |
7f77e71e5d7e
resolve: when pats do not match, hint about path:
timeless <timeless@mozdev.org>
parents:
28011
diff
changeset
|
82 R file1 |
7f77e71e5d7e
resolve: when pats do not match, hint about path:
timeless <timeless@mozdev.org>
parents:
28011
diff
changeset
|
83 R file2 |
7f77e71e5d7e
resolve: when pats do not match, hint about path:
timeless <timeless@mozdev.org>
parents:
28011
diff
changeset
|
84 |
7f77e71e5d7e
resolve: when pats do not match, hint about path:
timeless <timeless@mozdev.org>
parents:
28011
diff
changeset
|
85 cleanup |
7f77e71e5d7e
resolve: when pats do not match, hint about path:
timeless <timeless@mozdev.org>
parents:
28011
diff
changeset
|
86 $ hg resolve -u |
7f77e71e5d7e
resolve: when pats do not match, hint about path:
timeless <timeless@mozdev.org>
parents:
28011
diff
changeset
|
87 $ cd .. |
7f77e71e5d7e
resolve: when pats do not match, hint about path:
timeless <timeless@mozdev.org>
parents:
28011
diff
changeset
|
88 $ rmdir nested |
7f77e71e5d7e
resolve: when pats do not match, hint about path:
timeless <timeless@mozdev.org>
parents:
28011
diff
changeset
|
89 |
26784
c0aab5961876
commands.resolve: don't allow users to mark or unmark driver-resolved files
Siddharth Agarwal <sid0@fb.com>
parents:
26621
diff
changeset
|
90 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
|
91 |
c0aab5961876
commands.resolve: don't allow users to mark or unmark driver-resolved files
Siddharth Agarwal <sid0@fb.com>
parents:
26621
diff
changeset
|
92 $ 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
|
93 > '''mark and unmark files as driver-resolved''' |
36645
7bc33d677c0c
tests: fix various test-check-module-imports.t violations
Augie Fackler <augie@google.com>
parents:
36481
diff
changeset
|
94 > from mercurial import ( |
44856
b7808443ed6a
mergestate: split out merge state handling code from main merge module
Augie Fackler <augie@google.com>
parents:
44396
diff
changeset
|
95 > mergestate, |
36645
7bc33d677c0c
tests: fix various test-check-module-imports.t violations
Augie Fackler <augie@google.com>
parents:
36481
diff
changeset
|
96 > pycompat, |
7bc33d677c0c
tests: fix various test-check-module-imports.t violations
Augie Fackler <augie@google.com>
parents:
36481
diff
changeset
|
97 > registrar, |
7bc33d677c0c
tests: fix various test-check-module-imports.t violations
Augie Fackler <augie@google.com>
parents:
36481
diff
changeset
|
98 > scmutil, |
7bc33d677c0c
tests: fix various test-check-module-imports.t violations
Augie Fackler <augie@google.com>
parents:
36481
diff
changeset
|
99 > ) |
26784
c0aab5961876
commands.resolve: don't allow users to mark or unmark driver-resolved files
Siddharth Agarwal <sid0@fb.com>
parents:
26621
diff
changeset
|
100 > cmdtable = {} |
32337
46ba2cdda476
registrar: move cmdutil.command to registrar module (API)
Yuya Nishihara <yuya@tcha.org>
parents:
30062
diff
changeset
|
101 > command = registrar.command(cmdtable) |
33097
fce4ed2912bb
py3: make sure commands name are bytes in tests
Pulkit Goyal <7895pulkit@gmail.com>
parents:
32337
diff
changeset
|
102 > @command(b'markdriver', |
36481
9660e629352b
py3: port the markdirver extension in tests/test-resolve.t
Pulkit Goyal <7895pulkit@gmail.com>
parents:
35704
diff
changeset
|
103 > [(b'u', b'unmark', None, b'')], |
9660e629352b
py3: port the markdirver extension in tests/test-resolve.t
Pulkit Goyal <7895pulkit@gmail.com>
parents:
35704
diff
changeset
|
104 > b'FILE...') |
26784
c0aab5961876
commands.resolve: don't allow users to mark or unmark driver-resolved files
Siddharth Agarwal <sid0@fb.com>
parents:
26621
diff
changeset
|
105 > 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
|
106 > wlock = repo.wlock() |
36481
9660e629352b
py3: port the markdirver extension in tests/test-resolve.t
Pulkit Goyal <7895pulkit@gmail.com>
parents:
35704
diff
changeset
|
107 > opts = pycompat.byteskwargs(opts) |
26784
c0aab5961876
commands.resolve: don't allow users to mark or unmark driver-resolved files
Siddharth Agarwal <sid0@fb.com>
parents:
26621
diff
changeset
|
108 > try: |
44856
b7808443ed6a
mergestate: split out merge state handling code from main merge module
Augie Fackler <augie@google.com>
parents:
44396
diff
changeset
|
109 > ms = mergestate.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
|
110 > 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
|
111 > 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
|
112 > 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
|
113 > continue |
36481
9660e629352b
py3: port the markdirver extension in tests/test-resolve.t
Pulkit Goyal <7895pulkit@gmail.com>
parents:
35704
diff
changeset
|
114 > if not opts[b'unmark']: |
9660e629352b
py3: port the markdirver extension in tests/test-resolve.t
Pulkit Goyal <7895pulkit@gmail.com>
parents:
35704
diff
changeset
|
115 > ms.mark(f, b'd') |
26784
c0aab5961876
commands.resolve: don't allow users to mark or unmark driver-resolved files
Siddharth Agarwal <sid0@fb.com>
parents:
26621
diff
changeset
|
116 > else: |
36481
9660e629352b
py3: port the markdirver extension in tests/test-resolve.t
Pulkit Goyal <7895pulkit@gmail.com>
parents:
35704
diff
changeset
|
117 > ms.mark(f, b'u') |
26784
c0aab5961876
commands.resolve: don't allow users to mark or unmark driver-resolved files
Siddharth Agarwal <sid0@fb.com>
parents:
26621
diff
changeset
|
118 > 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
|
119 > finally: |
c0aab5961876
commands.resolve: don't allow users to mark or unmark driver-resolved files
Siddharth Agarwal <sid0@fb.com>
parents:
26621
diff
changeset
|
120 > 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
|
121 > EOF |
c0aab5961876
commands.resolve: don't allow users to mark or unmark driver-resolved files
Siddharth Agarwal <sid0@fb.com>
parents:
26621
diff
changeset
|
122 $ 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
|
123 $ 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
|
124 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
|
125 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
|
126 $ 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
|
127 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
|
128 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
|
129 $ 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
|
130 (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
|
131 $ 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
|
132 (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
|
133 $ 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
|
134 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
|
135 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
|
136 $ 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
|
137 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
|
138 (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
|
139 $ 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
|
140 $ 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
|
141 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
|
142 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
|
143 $ 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
|
144 $ 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
|
145 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
|
146 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
|
147 |
21263
f3e37409ecd3
resolve: split test
Gregory Szorc <gregory.szorc@gmail.com>
parents:
16913
diff
changeset
|
148 resolve the failure |
f3e37409ecd3
resolve: split test
Gregory Szorc <gregory.szorc@gmail.com>
parents:
16913
diff
changeset
|
149 |
23021
41770cee3c6a
test-resolve: add test resolving one of two files
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23020
diff
changeset
|
150 $ echo resolved > file1 |
41770cee3c6a
test-resolve: add test resolving one of two files
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23020
diff
changeset
|
151 $ hg resolve -m file1 |
41770cee3c6a
test-resolve: add test resolving one of two files
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23020
diff
changeset
|
152 |
41770cee3c6a
test-resolve: add test resolving one of two files
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23020
diff
changeset
|
153 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
|
154 |
41770cee3c6a
test-resolve: add test resolving one of two files
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23020
diff
changeset
|
155 $ hg resolve -l |
41770cee3c6a
test-resolve: add test resolving one of two files
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23020
diff
changeset
|
156 R file1 |
41770cee3c6a
test-resolve: add test resolving one of two files
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23020
diff
changeset
|
157 U file2 |
41770cee3c6a
test-resolve: add test resolving one of two files
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23020
diff
changeset
|
158 |
24127
4cb8002658d6
resolve: port to generic templater
Yuya Nishihara <yuya@tcha.org>
parents:
24125
diff
changeset
|
159 $ hg resolve -l -Tjson |
4cb8002658d6
resolve: port to generic templater
Yuya Nishihara <yuya@tcha.org>
parents:
24125
diff
changeset
|
160 [ |
4cb8002658d6
resolve: port to generic templater
Yuya Nishihara <yuya@tcha.org>
parents:
24125
diff
changeset
|
161 { |
39928
f07ab9ddc0c0
resolve: rename {status} to {mergestatus} to not shadow change status (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
39400
diff
changeset
|
162 "mergestatus": "R", |
f07ab9ddc0c0
resolve: rename {status} to {mergestatus} to not shadow change status (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
39400
diff
changeset
|
163 "path": "file1" |
24127
4cb8002658d6
resolve: port to generic templater
Yuya Nishihara <yuya@tcha.org>
parents:
24125
diff
changeset
|
164 }, |
4cb8002658d6
resolve: port to generic templater
Yuya Nishihara <yuya@tcha.org>
parents:
24125
diff
changeset
|
165 { |
39928
f07ab9ddc0c0
resolve: rename {status} to {mergestatus} to not shadow change status (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
39400
diff
changeset
|
166 "mergestatus": "U", |
f07ab9ddc0c0
resolve: rename {status} to {mergestatus} to not shadow change status (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
39400
diff
changeset
|
167 "path": "file2" |
24127
4cb8002658d6
resolve: port to generic templater
Yuya Nishihara <yuya@tcha.org>
parents:
24125
diff
changeset
|
168 } |
4cb8002658d6
resolve: port to generic templater
Yuya Nishihara <yuya@tcha.org>
parents:
24125
diff
changeset
|
169 ] |
4cb8002658d6
resolve: port to generic templater
Yuya Nishihara <yuya@tcha.org>
parents:
24125
diff
changeset
|
170 |
39928
f07ab9ddc0c0
resolve: rename {status} to {mergestatus} to not shadow change status (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
39400
diff
changeset
|
171 $ hg resolve -l -T '{path} {mergestatus} {status} {p1rev} {p2rev}\n' |
f07ab9ddc0c0
resolve: rename {status} to {mergestatus} to not shadow change status (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
39400
diff
changeset
|
172 file1 R M 2 1 |
f07ab9ddc0c0
resolve: rename {status} to {mergestatus} to not shadow change status (BC)
Yuya Nishihara <yuya@tcha.org>
parents:
39400
diff
changeset
|
173 file2 U M 2 1 |
38544
e8c33e27ee9b
resolve: add support for log-like template keywords and functions
Yuya Nishihara <yuya@tcha.org>
parents:
36645
diff
changeset
|
174 |
23021
41770cee3c6a
test-resolve: add test resolving one of two files
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23020
diff
changeset
|
175 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
|
176 |
41770cee3c6a
test-resolve: add test resolving one of two files
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23020
diff
changeset
|
177 $ 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
|
178 (no more unresolved files) |
12117
a40372c1c731
tests: unify test-resolve
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11451
diff
changeset
|
179 $ hg commit -m 'resolved' |
7734 | 180 |
23020
dfad19274d85
test-resolve: clarify test descriptions and consistently use "should"
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
21947
diff
changeset
|
181 resolve -l should be empty after commit |
12117
a40372c1c731
tests: unify test-resolve
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11451
diff
changeset
|
182 |
a40372c1c731
tests: unify test-resolve
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11451
diff
changeset
|
183 $ 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
|
184 |
24127
4cb8002658d6
resolve: port to generic templater
Yuya Nishihara <yuya@tcha.org>
parents:
24125
diff
changeset
|
185 $ hg resolve -l -Tjson |
4cb8002658d6
resolve: port to generic templater
Yuya Nishihara <yuya@tcha.org>
parents:
24125
diff
changeset
|
186 [ |
4cb8002658d6
resolve: port to generic templater
Yuya Nishihara <yuya@tcha.org>
parents:
24125
diff
changeset
|
187 ] |
4cb8002658d6
resolve: port to generic templater
Yuya Nishihara <yuya@tcha.org>
parents:
24125
diff
changeset
|
188 |
23022
ace380a0619b
test-resolve: add more tests for in conflict-free states
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23021
diff
changeset
|
189 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
|
190 |
ace380a0619b
test-resolve: add more tests for in conflict-free states
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23021
diff
changeset
|
191 $ hg resolve --all |
ace380a0619b
test-resolve: add more tests for in conflict-free states
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23021
diff
changeset
|
192 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
|
193 [255] |
ace380a0619b
test-resolve: add more tests for in conflict-free states
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23021
diff
changeset
|
194 |
23020
dfad19274d85
test-resolve: clarify test descriptions and consistently use "should"
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
21947
diff
changeset
|
195 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
|
196 |
21541
6062593d8b06
resolve: don't abort resolve -l even when no merge is in progress
Siddharth Agarwal <sid0@fb.com>
parents:
21267
diff
changeset
|
197 $ hg resolve -m |
21264
4e932dc5c113
resolve: abort when not applicable (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
21263
diff
changeset
|
198 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
|
199 [255] |
12117
a40372c1c731
tests: unify test-resolve
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11451
diff
changeset
|
200 |
27316
777f668eca70
merge: refuse update/merge if there are unresolved conflicts (BC)
Martin von Zweigbergk <martinvonz@google.com>
parents:
27067
diff
changeset
|
201 can not update or merge when there are unresolved conflicts |
777f668eca70
merge: refuse update/merge if there are unresolved conflicts (BC)
Martin von Zweigbergk <martinvonz@google.com>
parents:
27067
diff
changeset
|
202 |
777f668eca70
merge: refuse update/merge if there are unresolved conflicts (BC)
Martin von Zweigbergk <martinvonz@google.com>
parents:
27067
diff
changeset
|
203 $ hg up -qC 0 |
777f668eca70
merge: refuse update/merge if there are unresolved conflicts (BC)
Martin von Zweigbergk <martinvonz@google.com>
parents:
27067
diff
changeset
|
204 $ echo quux >> file1 |
777f668eca70
merge: refuse update/merge if there are unresolved conflicts (BC)
Martin von Zweigbergk <martinvonz@google.com>
parents:
27067
diff
changeset
|
205 $ hg up 1 |
777f668eca70
merge: refuse update/merge if there are unresolved conflicts (BC)
Martin von Zweigbergk <martinvonz@google.com>
parents:
27067
diff
changeset
|
206 merging file1 |
777f668eca70
merge: refuse update/merge if there are unresolved conflicts (BC)
Martin von Zweigbergk <martinvonz@google.com>
parents:
27067
diff
changeset
|
207 warning: conflicts while merging file1! (edit, then use 'hg resolve --mark') |
777f668eca70
merge: refuse update/merge if there are unresolved conflicts (BC)
Martin von Zweigbergk <martinvonz@google.com>
parents:
27067
diff
changeset
|
208 1 files updated, 0 files merged, 0 files removed, 1 files unresolved |
777f668eca70
merge: refuse update/merge if there are unresolved conflicts (BC)
Martin von Zweigbergk <martinvonz@google.com>
parents:
27067
diff
changeset
|
209 use 'hg resolve' to retry unresolved file merges |
777f668eca70
merge: refuse update/merge if there are unresolved conflicts (BC)
Martin von Zweigbergk <martinvonz@google.com>
parents:
27067
diff
changeset
|
210 [1] |
777f668eca70
merge: refuse update/merge if there are unresolved conflicts (BC)
Martin von Zweigbergk <martinvonz@google.com>
parents:
27067
diff
changeset
|
211 $ hg up 0 |
777f668eca70
merge: refuse update/merge if there are unresolved conflicts (BC)
Martin von Zweigbergk <martinvonz@google.com>
parents:
27067
diff
changeset
|
212 abort: outstanding merge conflicts |
42804
7b80ad5af239
merge: hint about using `hg resolve` for resolving conflicts
Martin von Zweigbergk <martinvonz@google.com>
parents:
42565
diff
changeset
|
213 (use 'hg resolve' to resolve) |
27316
777f668eca70
merge: refuse update/merge if there are unresolved conflicts (BC)
Martin von Zweigbergk <martinvonz@google.com>
parents:
27067
diff
changeset
|
214 [255] |
777f668eca70
merge: refuse update/merge if there are unresolved conflicts (BC)
Martin von Zweigbergk <martinvonz@google.com>
parents:
27067
diff
changeset
|
215 $ hg merge 2 |
777f668eca70
merge: refuse update/merge if there are unresolved conflicts (BC)
Martin von Zweigbergk <martinvonz@google.com>
parents:
27067
diff
changeset
|
216 abort: outstanding merge conflicts |
42804
7b80ad5af239
merge: hint about using `hg resolve` for resolving conflicts
Martin von Zweigbergk <martinvonz@google.com>
parents:
42565
diff
changeset
|
217 (use 'hg resolve' to resolve) |
27316
777f668eca70
merge: refuse update/merge if there are unresolved conflicts (BC)
Martin von Zweigbergk <martinvonz@google.com>
parents:
27067
diff
changeset
|
218 [255] |
777f668eca70
merge: refuse update/merge if there are unresolved conflicts (BC)
Martin von Zweigbergk <martinvonz@google.com>
parents:
27067
diff
changeset
|
219 $ hg merge --force 2 |
777f668eca70
merge: refuse update/merge if there are unresolved conflicts (BC)
Martin von Zweigbergk <martinvonz@google.com>
parents:
27067
diff
changeset
|
220 abort: outstanding merge conflicts |
42804
7b80ad5af239
merge: hint about using `hg resolve` for resolving conflicts
Martin von Zweigbergk <martinvonz@google.com>
parents:
42565
diff
changeset
|
221 (use 'hg resolve' to resolve) |
27316
777f668eca70
merge: refuse update/merge if there are unresolved conflicts (BC)
Martin von Zweigbergk <martinvonz@google.com>
parents:
27067
diff
changeset
|
222 [255] |
777f668eca70
merge: refuse update/merge if there are unresolved conflicts (BC)
Martin von Zweigbergk <martinvonz@google.com>
parents:
27067
diff
changeset
|
223 |
23022
ace380a0619b
test-resolve: add more tests for in conflict-free states
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23021
diff
changeset
|
224 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
|
225 |
ace380a0619b
test-resolve: add more tests for in conflict-free states
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23021
diff
changeset
|
226 $ 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
|
227 $ hg merge 1 |
ace380a0619b
test-resolve: add more tests for in conflict-free states
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23021
diff
changeset
|
228 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
|
229 (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
|
230 |
23024
ec36969497de
resolve: run happily after conflict-free merge
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23023
diff
changeset
|
231 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
|
232 $ hg resolve --all |
23024
ec36969497de
resolve: run happily after conflict-free merge
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23023
diff
changeset
|
233 (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
|
234 |
23024
ec36969497de
resolve: run happily after conflict-free merge
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23023
diff
changeset
|
235 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
|
236 |
ace380a0619b
test-resolve: add more tests for in conflict-free states
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23021
diff
changeset
|
237 $ hg resolve -m |
23024
ec36969497de
resolve: run happily after conflict-free merge
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23023
diff
changeset
|
238 (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
|
239 |
23023
63c9088bebad
test-resolve: add tests for re-merge
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23022
diff
changeset
|
240 get back to conflicting state |
63c9088bebad
test-resolve: add tests for re-merge
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23022
diff
changeset
|
241 |
63c9088bebad
test-resolve: add tests for re-merge
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23022
diff
changeset
|
242 $ hg up -qC 2 |
63c9088bebad
test-resolve: add tests for re-merge
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23022
diff
changeset
|
243 $ hg merge --tool=internal:fail 1 |
63c9088bebad
test-resolve: add tests for re-merge
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23022
diff
changeset
|
244 0 files updated, 0 files merged, 0 files removed, 2 files unresolved |
35704
41ef02ba329b
merge: add `--abort` flag which can abort the merge
Pulkit Goyal <7895pulkit@gmail.com>
parents:
35393
diff
changeset
|
245 use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon |
23023
63c9088bebad
test-resolve: add tests for re-merge
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23022
diff
changeset
|
246 [1] |
63c9088bebad
test-resolve: add tests for re-merge
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23022
diff
changeset
|
247 |
63c9088bebad
test-resolve: add tests for re-merge
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23022
diff
changeset
|
248 resolve without arguments should suggest --all |
63c9088bebad
test-resolve: add tests for re-merge
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23022
diff
changeset
|
249 $ hg resolve |
63c9088bebad
test-resolve: add tests for re-merge
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23022
diff
changeset
|
250 abort: no files or directories specified |
26352
e635bc9bb7d9
resolve: consistently describe re-merge + unresolved
timeless@mozdev.org
parents:
24127
diff
changeset
|
251 (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
|
252 [255] |
63c9088bebad
test-resolve: add tests for re-merge
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23022
diff
changeset
|
253 |
63c9088bebad
test-resolve: add tests for re-merge
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23022
diff
changeset
|
254 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
|
255 $ hg resolve --all |
3b213a904b98
test-resolve.t: add some output to show order of operations
Siddharth Agarwal <sid0@fb.com>
parents:
26614
diff
changeset
|
256 merging file1 |
26621
36383507a6f8
resolve: perform all premerges before performing any file merges (BC)
Siddharth Agarwal <sid0@fb.com>
parents:
26620
diff
changeset
|
257 merging file2 |
26614
ef1eb6df7071
simplemerge: move conflict warning message to filemerge
Siddharth Agarwal <sid0@fb.com>
parents:
26352
diff
changeset
|
258 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
|
259 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
|
260 [1] |
26620
7955127efbcb
test-resolve.t: add some tests for .orig file contents
Siddharth Agarwal <sid0@fb.com>
parents:
26619
diff
changeset
|
261 $ cat file1.orig |
7955127efbcb
test-resolve.t: add some tests for .orig file contents
Siddharth Agarwal <sid0@fb.com>
parents:
26619
diff
changeset
|
262 foo |
7955127efbcb
test-resolve.t: add some tests for .orig file contents
Siddharth Agarwal <sid0@fb.com>
parents:
26619
diff
changeset
|
263 baz |
7955127efbcb
test-resolve.t: add some tests for .orig file contents
Siddharth Agarwal <sid0@fb.com>
parents:
26619
diff
changeset
|
264 $ cat file2.orig |
7955127efbcb
test-resolve.t: add some tests for .orig file contents
Siddharth Agarwal <sid0@fb.com>
parents:
26619
diff
changeset
|
265 foo |
7955127efbcb
test-resolve.t: add some tests for .orig file contents
Siddharth Agarwal <sid0@fb.com>
parents:
26619
diff
changeset
|
266 baz |
26939
50d2389a2e49
resolve: choose where .orig file locations are kept
Christian Delahousse <cdelahousse@fb.com>
parents:
26784
diff
changeset
|
267 |
50d2389a2e49
resolve: choose where .orig file locations are kept
Christian Delahousse <cdelahousse@fb.com>
parents:
26784
diff
changeset
|
268 .orig files should exists where specified |
50d2389a2e49
resolve: choose where .orig file locations are kept
Christian Delahousse <cdelahousse@fb.com>
parents:
26784
diff
changeset
|
269 $ 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
|
270 merging file1 |
35393
4441705b7111
tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents:
34146
diff
changeset
|
271 creating directory: $TESTTMP/repo/.hg/origbackups |
26939
50d2389a2e49
resolve: choose where .orig file locations are kept
Christian Delahousse <cdelahousse@fb.com>
parents:
26784
diff
changeset
|
272 merging file2 |
50d2389a2e49
resolve: choose where .orig file locations are kept
Christian Delahousse <cdelahousse@fb.com>
parents:
26784
diff
changeset
|
273 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
|
274 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
|
275 [1] |
50d2389a2e49
resolve: choose where .orig file locations are kept
Christian Delahousse <cdelahousse@fb.com>
parents:
26784
diff
changeset
|
276 $ ls .hg/origbackups |
34146
9e4f82bc2b0b
scmutil: don't append .orig to backups in origbackuppath (BC)
Mark Thomas <mbthomas@fb.com>
parents:
33097
diff
changeset
|
277 file1 |
9e4f82bc2b0b
scmutil: don't append .orig to backups in origbackuppath (BC)
Mark Thomas <mbthomas@fb.com>
parents:
33097
diff
changeset
|
278 file2 |
23025
b8dd8432395d
test-resolve.t: use redirection to /dev/null instead of grep -q
Augie Fackler <raf@durin42.com>
parents:
23024
diff
changeset
|
279 $ 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
|
280 $ grep '<<<' file2 > /dev/null |
23023
63c9088bebad
test-resolve: add tests for re-merge
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23022
diff
changeset
|
281 |
63c9088bebad
test-resolve: add tests for re-merge
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23022
diff
changeset
|
282 resolve <file> should re-merge file |
63c9088bebad
test-resolve: add tests for re-merge
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23022
diff
changeset
|
283 $ echo resolved > file1 |
63c9088bebad
test-resolve: add tests for re-merge
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23022
diff
changeset
|
284 $ hg resolve -q file1 |
26614
ef1eb6df7071
simplemerge: move conflict warning message to filemerge
Siddharth Agarwal <sid0@fb.com>
parents:
26352
diff
changeset
|
285 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
|
286 [1] |
23025
b8dd8432395d
test-resolve.t: use redirection to /dev/null instead of grep -q
Augie Fackler <raf@durin42.com>
parents:
23024
diff
changeset
|
287 $ grep '<<<' file1 > /dev/null |
23023
63c9088bebad
test-resolve: add tests for re-merge
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23022
diff
changeset
|
288 |
26959
ed5f20f9c22e
resolve: restore .orig only after merge is fully complete (issue4952)
Siddharth Agarwal <sid0@fb.com>
parents:
26784
diff
changeset
|
289 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
|
290 |
27067
19b52cde2b84
test-resolve: fix '--tool f' invocation for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
27027
diff
changeset
|
291 $ hg resolve -q file1 --tool "sh -c 'f --dump \"$TESTTMP/repo/file1.orig\"'" |
35393
4441705b7111
tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents:
34146
diff
changeset
|
292 $TESTTMP/repo/file1.orig: |
26959
ed5f20f9c22e
resolve: restore .orig only after merge is fully complete (issue4952)
Siddharth Agarwal <sid0@fb.com>
parents:
26784
diff
changeset
|
293 >>> |
ed5f20f9c22e
resolve: restore .orig only after merge is fully complete (issue4952)
Siddharth Agarwal <sid0@fb.com>
parents:
26784
diff
changeset
|
294 foo |
ed5f20f9c22e
resolve: restore .orig only after merge is fully complete (issue4952)
Siddharth Agarwal <sid0@fb.com>
parents:
26784
diff
changeset
|
295 baz |
ed5f20f9c22e
resolve: restore .orig only after merge is fully complete (issue4952)
Siddharth Agarwal <sid0@fb.com>
parents:
26784
diff
changeset
|
296 <<< |
ed5f20f9c22e
resolve: restore .orig only after merge is fully complete (issue4952)
Siddharth Agarwal <sid0@fb.com>
parents:
26784
diff
changeset
|
297 |
23023
63c9088bebad
test-resolve: add tests for re-merge
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23022
diff
changeset
|
298 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
|
299 $ echo resolved > file1 |
63c9088bebad
test-resolve: add tests for re-merge
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23022
diff
changeset
|
300 $ hg resolve -m file1 |
63c9088bebad
test-resolve: add tests for re-merge
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23022
diff
changeset
|
301 $ hg resolve -q file1 |
63c9088bebad
test-resolve: add tests for re-merge
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23022
diff
changeset
|
302 $ cat file1 |
63c9088bebad
test-resolve: add tests for re-merge
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23022
diff
changeset
|
303 resolved |
63c9088bebad
test-resolve: add tests for re-merge
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
23022
diff
changeset
|
304 |
27027
a01ecbcfaf84
mergestate: handle additional record types specially
Siddharth Agarwal <sid0@fb.com>
parents:
27026
diff
changeset
|
305 insert unsupported advisory merge record |
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 $ 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
|
308 $ hg debugmergestate |
44396
acbfa31cfaf2
debugmergestate: make templated
Martin von Zweigbergk <martinvonz@google.com>
parents:
42804
diff
changeset
|
309 local (working copy): 57653b9f834a4493f7240b0681efcb9ae7cab745 |
acbfa31cfaf2
debugmergestate: make templated
Martin von Zweigbergk <martinvonz@google.com>
parents:
42804
diff
changeset
|
310 other (merge rev): dc77451844e37f03f5c559e3b8529b2b48d381d1 |
acbfa31cfaf2
debugmergestate: make templated
Martin von Zweigbergk <martinvonz@google.com>
parents:
42804
diff
changeset
|
311 file: file1 (state "r") |
acbfa31cfaf2
debugmergestate: make templated
Martin von Zweigbergk <martinvonz@google.com>
parents:
42804
diff
changeset
|
312 local path: file1 (hash 60b27f004e454aca81b0480209cce5081ec52390, flags "") |
27027
a01ecbcfaf84
mergestate: handle additional record types specially
Siddharth Agarwal <sid0@fb.com>
parents:
27026
diff
changeset
|
313 ancestor path: file1 (node 2ed2a3912a0b24502043eae84ee4b279c18b90dd) |
a01ecbcfaf84
mergestate: handle additional record types specially
Siddharth Agarwal <sid0@fb.com>
parents:
27026
diff
changeset
|
314 other path: file1 (node 6f4310b00b9a147241b071a60c28a650827fb03d) |
44396
acbfa31cfaf2
debugmergestate: make templated
Martin von Zweigbergk <martinvonz@google.com>
parents:
42804
diff
changeset
|
315 extra: ancestorlinknode = 99726c03216e233810a2564cbc0adfe395007eac |
acbfa31cfaf2
debugmergestate: make templated
Martin von Zweigbergk <martinvonz@google.com>
parents:
42804
diff
changeset
|
316 file: file2 (state "u") |
acbfa31cfaf2
debugmergestate: make templated
Martin von Zweigbergk <martinvonz@google.com>
parents:
42804
diff
changeset
|
317 local path: file2 (hash cb99b709a1978bd205ab9dfd4c5aaa1fc91c7523, flags "") |
27027
a01ecbcfaf84
mergestate: handle additional record types specially
Siddharth Agarwal <sid0@fb.com>
parents:
27026
diff
changeset
|
318 ancestor path: file2 (node 2ed2a3912a0b24502043eae84ee4b279c18b90dd) |
a01ecbcfaf84
mergestate: handle additional record types specially
Siddharth Agarwal <sid0@fb.com>
parents:
27026
diff
changeset
|
319 other path: file2 (node 6f4310b00b9a147241b071a60c28a650827fb03d) |
44396
acbfa31cfaf2
debugmergestate: make templated
Martin von Zweigbergk <martinvonz@google.com>
parents:
42804
diff
changeset
|
320 extra: ancestorlinknode = 99726c03216e233810a2564cbc0adfe395007eac |
27027
a01ecbcfaf84
mergestate: handle additional record types specially
Siddharth Agarwal <sid0@fb.com>
parents:
27026
diff
changeset
|
321 $ hg resolve -l |
a01ecbcfaf84
mergestate: handle additional record types specially
Siddharth Agarwal <sid0@fb.com>
parents:
27026
diff
changeset
|
322 R file1 |
a01ecbcfaf84
mergestate: handle additional record types specially
Siddharth Agarwal <sid0@fb.com>
parents:
27026
diff
changeset
|
323 U file2 |
a01ecbcfaf84
mergestate: handle additional record types specially
Siddharth Agarwal <sid0@fb.com>
parents:
27026
diff
changeset
|
324 |
44396
acbfa31cfaf2
debugmergestate: make templated
Martin von Zweigbergk <martinvonz@google.com>
parents:
42804
diff
changeset
|
325 test json output |
acbfa31cfaf2
debugmergestate: make templated
Martin von Zweigbergk <martinvonz@google.com>
parents:
42804
diff
changeset
|
326 |
acbfa31cfaf2
debugmergestate: make templated
Martin von Zweigbergk <martinvonz@google.com>
parents:
42804
diff
changeset
|
327 $ hg debugmergestate -T json |
acbfa31cfaf2
debugmergestate: make templated
Martin von Zweigbergk <martinvonz@google.com>
parents:
42804
diff
changeset
|
328 [ |
acbfa31cfaf2
debugmergestate: make templated
Martin von Zweigbergk <martinvonz@google.com>
parents:
42804
diff
changeset
|
329 { |
acbfa31cfaf2
debugmergestate: make templated
Martin von Zweigbergk <martinvonz@google.com>
parents:
42804
diff
changeset
|
330 "commits": [{"label": "working copy", "name": "local", "node": "57653b9f834a4493f7240b0681efcb9ae7cab745"}, {"label": "merge rev", "name": "other", "node": "dc77451844e37f03f5c559e3b8529b2b48d381d1"}], |
acbfa31cfaf2
debugmergestate: make templated
Martin von Zweigbergk <martinvonz@google.com>
parents:
42804
diff
changeset
|
331 "files": [{"ancestor_node": "2ed2a3912a0b24502043eae84ee4b279c18b90dd", "ancestor_path": "file1", "extras": [{"key": "ancestorlinknode", "value": "99726c03216e233810a2564cbc0adfe395007eac"}], "local_flags": "", "local_key": "60b27f004e454aca81b0480209cce5081ec52390", "local_path": "file1", "other_node": "6f4310b00b9a147241b071a60c28a650827fb03d", "other_path": "file1", "path": "file1", "state": "r"}, {"ancestor_node": "2ed2a3912a0b24502043eae84ee4b279c18b90dd", "ancestor_path": "file2", "extras": [{"key": "ancestorlinknode", "value": "99726c03216e233810a2564cbc0adfe395007eac"}], "local_flags": "", "local_key": "cb99b709a1978bd205ab9dfd4c5aaa1fc91c7523", "local_path": "file2", "other_node": "6f4310b00b9a147241b071a60c28a650827fb03d", "other_path": "file2", "path": "file2", "state": "u"}] |
acbfa31cfaf2
debugmergestate: make templated
Martin von Zweigbergk <martinvonz@google.com>
parents:
42804
diff
changeset
|
332 } |
acbfa31cfaf2
debugmergestate: make templated
Martin von Zweigbergk <martinvonz@google.com>
parents:
42804
diff
changeset
|
333 ] |
acbfa31cfaf2
debugmergestate: make templated
Martin von Zweigbergk <martinvonz@google.com>
parents:
42804
diff
changeset
|
334 |
acbfa31cfaf2
debugmergestate: make templated
Martin von Zweigbergk <martinvonz@google.com>
parents:
42804
diff
changeset
|
335 |
27027
a01ecbcfaf84
mergestate: handle additional record types specially
Siddharth Agarwal <sid0@fb.com>
parents:
27026
diff
changeset
|
336 insert unsupported mandatory merge record |
a01ecbcfaf84
mergestate: handle additional record types specially
Siddharth Agarwal <sid0@fb.com>
parents:
27026
diff
changeset
|
337 |
a01ecbcfaf84
mergestate: handle additional record types specially
Siddharth Agarwal <sid0@fb.com>
parents:
27026
diff
changeset
|
338 $ 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
|
339 $ hg debugmergestate |
44396
acbfa31cfaf2
debugmergestate: make templated
Martin von Zweigbergk <martinvonz@google.com>
parents:
42804
diff
changeset
|
340 abort: unsupported merge state records: X |
acbfa31cfaf2
debugmergestate: make templated
Martin von Zweigbergk <martinvonz@google.com>
parents:
42804
diff
changeset
|
341 (see https://mercurial-scm.org/wiki/MergeStateRecords for more information) |
acbfa31cfaf2
debugmergestate: make templated
Martin von Zweigbergk <martinvonz@google.com>
parents:
42804
diff
changeset
|
342 [255] |
27027
a01ecbcfaf84
mergestate: handle additional record types specially
Siddharth Agarwal <sid0@fb.com>
parents:
27026
diff
changeset
|
343 $ hg resolve -l |
a01ecbcfaf84
mergestate: handle additional record types specially
Siddharth Agarwal <sid0@fb.com>
parents:
27026
diff
changeset
|
344 abort: unsupported merge state records: X |
a01ecbcfaf84
mergestate: handle additional record types specially
Siddharth Agarwal <sid0@fb.com>
parents:
27026
diff
changeset
|
345 (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
|
346 [255] |
a01ecbcfaf84
mergestate: handle additional record types specially
Siddharth Agarwal <sid0@fb.com>
parents:
27026
diff
changeset
|
347 $ hg resolve -ma |
a01ecbcfaf84
mergestate: handle additional record types specially
Siddharth Agarwal <sid0@fb.com>
parents:
27026
diff
changeset
|
348 abort: unsupported merge state records: X |
a01ecbcfaf84
mergestate: handle additional record types specially
Siddharth Agarwal <sid0@fb.com>
parents:
27026
diff
changeset
|
349 (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
|
350 [255] |
a01ecbcfaf84
mergestate: handle additional record types specially
Siddharth Agarwal <sid0@fb.com>
parents:
27026
diff
changeset
|
351 $ hg summary |
28641
4acd5651ffa2
summary: move mergemod before parents to give access to ms
timeless <timeless@mozdev.org>
parents:
28402
diff
changeset
|
352 warning: merge state has unsupported record types: X |
27027
a01ecbcfaf84
mergestate: handle additional record types specially
Siddharth Agarwal <sid0@fb.com>
parents:
27026
diff
changeset
|
353 parent: 2:57653b9f834a |
a01ecbcfaf84
mergestate: handle additional record types specially
Siddharth Agarwal <sid0@fb.com>
parents:
27026
diff
changeset
|
354 append baz to files |
a01ecbcfaf84
mergestate: handle additional record types specially
Siddharth Agarwal <sid0@fb.com>
parents:
27026
diff
changeset
|
355 parent: 1:dc77451844e3 |
a01ecbcfaf84
mergestate: handle additional record types specially
Siddharth Agarwal <sid0@fb.com>
parents:
27026
diff
changeset
|
356 append bar to files |
a01ecbcfaf84
mergestate: handle additional record types specially
Siddharth Agarwal <sid0@fb.com>
parents:
27026
diff
changeset
|
357 branch: default |
a01ecbcfaf84
mergestate: handle additional record types specially
Siddharth Agarwal <sid0@fb.com>
parents:
27026
diff
changeset
|
358 commit: 2 modified, 2 unknown (merge) |
a01ecbcfaf84
mergestate: handle additional record types specially
Siddharth Agarwal <sid0@fb.com>
parents:
27026
diff
changeset
|
359 update: 2 new changesets (update) |
a01ecbcfaf84
mergestate: handle additional record types specially
Siddharth Agarwal <sid0@fb.com>
parents:
27026
diff
changeset
|
360 phases: 5 draft |
a01ecbcfaf84
mergestate: handle additional record types specially
Siddharth Agarwal <sid0@fb.com>
parents:
27026
diff
changeset
|
361 |
a01ecbcfaf84
mergestate: handle additional record types specially
Siddharth Agarwal <sid0@fb.com>
parents:
27026
diff
changeset
|
362 update --clean shouldn't abort on unsupported records |
a01ecbcfaf84
mergestate: handle additional record types specially
Siddharth Agarwal <sid0@fb.com>
parents:
27026
diff
changeset
|
363 |
a01ecbcfaf84
mergestate: handle additional record types specially
Siddharth Agarwal <sid0@fb.com>
parents:
27026
diff
changeset
|
364 $ hg up -qC 1 |
a01ecbcfaf84
mergestate: handle additional record types specially
Siddharth Agarwal <sid0@fb.com>
parents:
27026
diff
changeset
|
365 $ hg debugmergestate |
a01ecbcfaf84
mergestate: handle additional record types specially
Siddharth Agarwal <sid0@fb.com>
parents:
27026
diff
changeset
|
366 no merge state found |
a01ecbcfaf84
mergestate: handle additional record types specially
Siddharth Agarwal <sid0@fb.com>
parents:
27026
diff
changeset
|
367 |
12117
a40372c1c731
tests: unify test-resolve
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11451
diff
changeset
|
368 test crashed merge with empty mergestate |
7734 | 369 |
12117
a40372c1c731
tests: unify test-resolve
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11451
diff
changeset
|
370 $ mkdir .hg/merge |
a40372c1c731
tests: unify test-resolve
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11451
diff
changeset
|
371 $ touch .hg/merge/state |
11451
51021f4c80b5
resolve: do not crash on empty mergestate
Martin Geisler <mg@lazybytes.net>
parents:
8167
diff
changeset
|
372 |
23020
dfad19274d85
test-resolve: clarify test descriptions and consistently use "should"
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
21947
diff
changeset
|
373 resolve -l should be empty |
12117
a40372c1c731
tests: unify test-resolve
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11451
diff
changeset
|
374 |
a40372c1c731
tests: unify test-resolve
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11451
diff
changeset
|
375 $ hg resolve -l |
16913
f2719b387380
tests: add missing trailing 'cd ..'
Mads Kiilerich <mads@kiilerich.com>
parents:
12788
diff
changeset
|
376 |
38793
6c8e3c847977
resolve: add option to warn/abort on -m with unresolved conflict markers
Kyle Lippincott <spectral@google.com>
parents:
38544
diff
changeset
|
377 resolve -m can be configured to look for remaining conflict markers |
6c8e3c847977
resolve: add option to warn/abort on -m with unresolved conflict markers
Kyle Lippincott <spectral@google.com>
parents:
38544
diff
changeset
|
378 $ hg up -qC 2 |
6c8e3c847977
resolve: add option to warn/abort on -m with unresolved conflict markers
Kyle Lippincott <spectral@google.com>
parents:
38544
diff
changeset
|
379 $ hg merge -q --tool=internal:merge 1 |
6c8e3c847977
resolve: add option to warn/abort on -m with unresolved conflict markers
Kyle Lippincott <spectral@google.com>
parents:
38544
diff
changeset
|
380 warning: conflicts while merging file1! (edit, then use 'hg resolve --mark') |
6c8e3c847977
resolve: add option to warn/abort on -m with unresolved conflict markers
Kyle Lippincott <spectral@google.com>
parents:
38544
diff
changeset
|
381 warning: conflicts while merging file2! (edit, then use 'hg resolve --mark') |
6c8e3c847977
resolve: add option to warn/abort on -m with unresolved conflict markers
Kyle Lippincott <spectral@google.com>
parents:
38544
diff
changeset
|
382 [1] |
6c8e3c847977
resolve: add option to warn/abort on -m with unresolved conflict markers
Kyle Lippincott <spectral@google.com>
parents:
38544
diff
changeset
|
383 $ hg resolve -l |
6c8e3c847977
resolve: add option to warn/abort on -m with unresolved conflict markers
Kyle Lippincott <spectral@google.com>
parents:
38544
diff
changeset
|
384 U file1 |
6c8e3c847977
resolve: add option to warn/abort on -m with unresolved conflict markers
Kyle Lippincott <spectral@google.com>
parents:
38544
diff
changeset
|
385 U file2 |
6c8e3c847977
resolve: add option to warn/abort on -m with unresolved conflict markers
Kyle Lippincott <spectral@google.com>
parents:
38544
diff
changeset
|
386 $ echo 'remove markers' > file1 |
38857
96d0795bd0bd
resolve: graduate resolve.mark-check from experimental, add docs
Kyle Lippincott <spectral@google.com>
parents:
38822
diff
changeset
|
387 $ hg --config commands.resolve.mark-check=abort resolve -m |
38793
6c8e3c847977
resolve: add option to warn/abort on -m with unresolved conflict markers
Kyle Lippincott <spectral@google.com>
parents:
38544
diff
changeset
|
388 warning: the following files still have conflict markers: |
6c8e3c847977
resolve: add option to warn/abort on -m with unresolved conflict markers
Kyle Lippincott <spectral@google.com>
parents:
38544
diff
changeset
|
389 file2 |
6c8e3c847977
resolve: add option to warn/abort on -m with unresolved conflict markers
Kyle Lippincott <spectral@google.com>
parents:
38544
diff
changeset
|
390 abort: conflict markers detected |
6c8e3c847977
resolve: add option to warn/abort on -m with unresolved conflict markers
Kyle Lippincott <spectral@google.com>
parents:
38544
diff
changeset
|
391 (use --all to mark anyway) |
6c8e3c847977
resolve: add option to warn/abort on -m with unresolved conflict markers
Kyle Lippincott <spectral@google.com>
parents:
38544
diff
changeset
|
392 [255] |
6c8e3c847977
resolve: add option to warn/abort on -m with unresolved conflict markers
Kyle Lippincott <spectral@google.com>
parents:
38544
diff
changeset
|
393 $ hg resolve -l |
6c8e3c847977
resolve: add option to warn/abort on -m with unresolved conflict markers
Kyle Lippincott <spectral@google.com>
parents:
38544
diff
changeset
|
394 U file1 |
6c8e3c847977
resolve: add option to warn/abort on -m with unresolved conflict markers
Kyle Lippincott <spectral@google.com>
parents:
38544
diff
changeset
|
395 U file2 |
6c8e3c847977
resolve: add option to warn/abort on -m with unresolved conflict markers
Kyle Lippincott <spectral@google.com>
parents:
38544
diff
changeset
|
396 Try with --all from the hint |
38857
96d0795bd0bd
resolve: graduate resolve.mark-check from experimental, add docs
Kyle Lippincott <spectral@google.com>
parents:
38822
diff
changeset
|
397 $ hg --config commands.resolve.mark-check=abort resolve -m --all |
38793
6c8e3c847977
resolve: add option to warn/abort on -m with unresolved conflict markers
Kyle Lippincott <spectral@google.com>
parents:
38544
diff
changeset
|
398 warning: the following files still have conflict markers: |
6c8e3c847977
resolve: add option to warn/abort on -m with unresolved conflict markers
Kyle Lippincott <spectral@google.com>
parents:
38544
diff
changeset
|
399 file2 |
6c8e3c847977
resolve: add option to warn/abort on -m with unresolved conflict markers
Kyle Lippincott <spectral@google.com>
parents:
38544
diff
changeset
|
400 (no more unresolved files) |
6c8e3c847977
resolve: add option to warn/abort on -m with unresolved conflict markers
Kyle Lippincott <spectral@google.com>
parents:
38544
diff
changeset
|
401 $ hg resolve -l |
6c8e3c847977
resolve: add option to warn/abort on -m with unresolved conflict markers
Kyle Lippincott <spectral@google.com>
parents:
38544
diff
changeset
|
402 R file1 |
6c8e3c847977
resolve: add option to warn/abort on -m with unresolved conflict markers
Kyle Lippincott <spectral@google.com>
parents:
38544
diff
changeset
|
403 R file2 |
38873
7e75777e4a51
resolve: correct behavior of mark-check=none to match docs
Kyle Lippincott <spectral@google.com>
parents:
38859
diff
changeset
|
404 Test option value 'warn' |
38793
6c8e3c847977
resolve: add option to warn/abort on -m with unresolved conflict markers
Kyle Lippincott <spectral@google.com>
parents:
38544
diff
changeset
|
405 $ hg resolve --unmark |
6c8e3c847977
resolve: add option to warn/abort on -m with unresolved conflict markers
Kyle Lippincott <spectral@google.com>
parents:
38544
diff
changeset
|
406 $ hg resolve -l |
6c8e3c847977
resolve: add option to warn/abort on -m with unresolved conflict markers
Kyle Lippincott <spectral@google.com>
parents:
38544
diff
changeset
|
407 U file1 |
6c8e3c847977
resolve: add option to warn/abort on -m with unresolved conflict markers
Kyle Lippincott <spectral@google.com>
parents:
38544
diff
changeset
|
408 U file2 |
38857
96d0795bd0bd
resolve: graduate resolve.mark-check from experimental, add docs
Kyle Lippincott <spectral@google.com>
parents:
38822
diff
changeset
|
409 $ hg --config commands.resolve.mark-check=warn resolve -m |
38793
6c8e3c847977
resolve: add option to warn/abort on -m with unresolved conflict markers
Kyle Lippincott <spectral@google.com>
parents:
38544
diff
changeset
|
410 warning: the following files still have conflict markers: |
6c8e3c847977
resolve: add option to warn/abort on -m with unresolved conflict markers
Kyle Lippincott <spectral@google.com>
parents:
38544
diff
changeset
|
411 file2 |
6c8e3c847977
resolve: add option to warn/abort on -m with unresolved conflict markers
Kyle Lippincott <spectral@google.com>
parents:
38544
diff
changeset
|
412 (no more unresolved files) |
6c8e3c847977
resolve: add option to warn/abort on -m with unresolved conflict markers
Kyle Lippincott <spectral@google.com>
parents:
38544
diff
changeset
|
413 $ hg resolve -l |
6c8e3c847977
resolve: add option to warn/abort on -m with unresolved conflict markers
Kyle Lippincott <spectral@google.com>
parents:
38544
diff
changeset
|
414 R file1 |
6c8e3c847977
resolve: add option to warn/abort on -m with unresolved conflict markers
Kyle Lippincott <spectral@google.com>
parents:
38544
diff
changeset
|
415 R file2 |
6c8e3c847977
resolve: add option to warn/abort on -m with unresolved conflict markers
Kyle Lippincott <spectral@google.com>
parents:
38544
diff
changeset
|
416 If the file is already marked as resolved, we don't warn about it |
6c8e3c847977
resolve: add option to warn/abort on -m with unresolved conflict markers
Kyle Lippincott <spectral@google.com>
parents:
38544
diff
changeset
|
417 $ hg resolve --unmark file1 |
6c8e3c847977
resolve: add option to warn/abort on -m with unresolved conflict markers
Kyle Lippincott <spectral@google.com>
parents:
38544
diff
changeset
|
418 $ hg resolve -l |
6c8e3c847977
resolve: add option to warn/abort on -m with unresolved conflict markers
Kyle Lippincott <spectral@google.com>
parents:
38544
diff
changeset
|
419 U file1 |
6c8e3c847977
resolve: add option to warn/abort on -m with unresolved conflict markers
Kyle Lippincott <spectral@google.com>
parents:
38544
diff
changeset
|
420 R file2 |
38857
96d0795bd0bd
resolve: graduate resolve.mark-check from experimental, add docs
Kyle Lippincott <spectral@google.com>
parents:
38822
diff
changeset
|
421 $ hg --config commands.resolve.mark-check=warn resolve -m |
38793
6c8e3c847977
resolve: add option to warn/abort on -m with unresolved conflict markers
Kyle Lippincott <spectral@google.com>
parents:
38544
diff
changeset
|
422 (no more unresolved files) |
6c8e3c847977
resolve: add option to warn/abort on -m with unresolved conflict markers
Kyle Lippincott <spectral@google.com>
parents:
38544
diff
changeset
|
423 $ hg resolve -l |
6c8e3c847977
resolve: add option to warn/abort on -m with unresolved conflict markers
Kyle Lippincott <spectral@google.com>
parents:
38544
diff
changeset
|
424 R file1 |
6c8e3c847977
resolve: add option to warn/abort on -m with unresolved conflict markers
Kyle Lippincott <spectral@google.com>
parents:
38544
diff
changeset
|
425 R file2 |
38873
7e75777e4a51
resolve: correct behavior of mark-check=none to match docs
Kyle Lippincott <spectral@google.com>
parents:
38859
diff
changeset
|
426 If the user passes an invalid value, we treat it as 'none'. |
7e75777e4a51
resolve: correct behavior of mark-check=none to match docs
Kyle Lippincott <spectral@google.com>
parents:
38859
diff
changeset
|
427 $ hg resolve --unmark |
7e75777e4a51
resolve: correct behavior of mark-check=none to match docs
Kyle Lippincott <spectral@google.com>
parents:
38859
diff
changeset
|
428 $ hg resolve -l |
7e75777e4a51
resolve: correct behavior of mark-check=none to match docs
Kyle Lippincott <spectral@google.com>
parents:
38859
diff
changeset
|
429 U file1 |
7e75777e4a51
resolve: correct behavior of mark-check=none to match docs
Kyle Lippincott <spectral@google.com>
parents:
38859
diff
changeset
|
430 U file2 |
7e75777e4a51
resolve: correct behavior of mark-check=none to match docs
Kyle Lippincott <spectral@google.com>
parents:
38859
diff
changeset
|
431 $ hg --config commands.resolve.mark-check=nope resolve -m |
7e75777e4a51
resolve: correct behavior of mark-check=none to match docs
Kyle Lippincott <spectral@google.com>
parents:
38859
diff
changeset
|
432 (no more unresolved files) |
7e75777e4a51
resolve: correct behavior of mark-check=none to match docs
Kyle Lippincott <spectral@google.com>
parents:
38859
diff
changeset
|
433 $ hg resolve -l |
7e75777e4a51
resolve: correct behavior of mark-check=none to match docs
Kyle Lippincott <spectral@google.com>
parents:
38859
diff
changeset
|
434 R file1 |
7e75777e4a51
resolve: correct behavior of mark-check=none to match docs
Kyle Lippincott <spectral@google.com>
parents:
38859
diff
changeset
|
435 R file2 |
40567
8785d66edd6e
tests: fix a couple typos in test-resolve.t comments and add a comment
Kyle Lippincott <spectral@google.com>
parents:
39928
diff
changeset
|
436 Test explicitly setting the option to 'none' |
38873
7e75777e4a51
resolve: correct behavior of mark-check=none to match docs
Kyle Lippincott <spectral@google.com>
parents:
38859
diff
changeset
|
437 $ hg resolve --unmark |
7e75777e4a51
resolve: correct behavior of mark-check=none to match docs
Kyle Lippincott <spectral@google.com>
parents:
38859
diff
changeset
|
438 $ hg resolve -l |
7e75777e4a51
resolve: correct behavior of mark-check=none to match docs
Kyle Lippincott <spectral@google.com>
parents:
38859
diff
changeset
|
439 U file1 |
7e75777e4a51
resolve: correct behavior of mark-check=none to match docs
Kyle Lippincott <spectral@google.com>
parents:
38859
diff
changeset
|
440 U file2 |
7e75777e4a51
resolve: correct behavior of mark-check=none to match docs
Kyle Lippincott <spectral@google.com>
parents:
38859
diff
changeset
|
441 $ hg --config commands.resolve.mark-check=none resolve -m |
7e75777e4a51
resolve: correct behavior of mark-check=none to match docs
Kyle Lippincott <spectral@google.com>
parents:
38859
diff
changeset
|
442 (no more unresolved files) |
7e75777e4a51
resolve: correct behavior of mark-check=none to match docs
Kyle Lippincott <spectral@google.com>
parents:
38859
diff
changeset
|
443 $ hg resolve -l |
7e75777e4a51
resolve: correct behavior of mark-check=none to match docs
Kyle Lippincott <spectral@google.com>
parents:
38859
diff
changeset
|
444 R file1 |
7e75777e4a51
resolve: correct behavior of mark-check=none to match docs
Kyle Lippincott <spectral@google.com>
parents:
38859
diff
changeset
|
445 R file2 |
40472
da2e874fe582
resolve: when resolve.mark-check=abort, downgrade to warning if pats specified
Kyle Lippincott <spectral@google.com>
parents:
39928
diff
changeset
|
446 Test with marking an explicit file as resolved, this should not abort (since |
da2e874fe582
resolve: when resolve.mark-check=abort, downgrade to warning if pats specified
Kyle Lippincott <spectral@google.com>
parents:
39928
diff
changeset
|
447 there's no --force flag, we have no way of combining --all with a filename) |
da2e874fe582
resolve: when resolve.mark-check=abort, downgrade to warning if pats specified
Kyle Lippincott <spectral@google.com>
parents:
39928
diff
changeset
|
448 $ hg resolve --unmark |
da2e874fe582
resolve: when resolve.mark-check=abort, downgrade to warning if pats specified
Kyle Lippincott <spectral@google.com>
parents:
39928
diff
changeset
|
449 $ hg resolve -l |
da2e874fe582
resolve: when resolve.mark-check=abort, downgrade to warning if pats specified
Kyle Lippincott <spectral@google.com>
parents:
39928
diff
changeset
|
450 U file1 |
da2e874fe582
resolve: when resolve.mark-check=abort, downgrade to warning if pats specified
Kyle Lippincott <spectral@google.com>
parents:
39928
diff
changeset
|
451 U file2 |
da2e874fe582
resolve: when resolve.mark-check=abort, downgrade to warning if pats specified
Kyle Lippincott <spectral@google.com>
parents:
39928
diff
changeset
|
452 (This downgrades to a warning since an explicit file was specified). |
da2e874fe582
resolve: when resolve.mark-check=abort, downgrade to warning if pats specified
Kyle Lippincott <spectral@google.com>
parents:
39928
diff
changeset
|
453 $ hg --config commands.resolve.mark-check=abort resolve -m file2 |
da2e874fe582
resolve: when resolve.mark-check=abort, downgrade to warning if pats specified
Kyle Lippincott <spectral@google.com>
parents:
39928
diff
changeset
|
454 warning: the following files still have conflict markers: |
da2e874fe582
resolve: when resolve.mark-check=abort, downgrade to warning if pats specified
Kyle Lippincott <spectral@google.com>
parents:
39928
diff
changeset
|
455 file2 |
da2e874fe582
resolve: when resolve.mark-check=abort, downgrade to warning if pats specified
Kyle Lippincott <spectral@google.com>
parents:
39928
diff
changeset
|
456 $ hg resolve -l |
da2e874fe582
resolve: when resolve.mark-check=abort, downgrade to warning if pats specified
Kyle Lippincott <spectral@google.com>
parents:
39928
diff
changeset
|
457 U file1 |
da2e874fe582
resolve: when resolve.mark-check=abort, downgrade to warning if pats specified
Kyle Lippincott <spectral@google.com>
parents:
39928
diff
changeset
|
458 R file2 |
39392
5d00e6061ba2
resolve: add a flag for the default behavior of re-merging
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents:
38874
diff
changeset
|
459 Testing the --re-merge flag |
5d00e6061ba2
resolve: add a flag for the default behavior of re-merging
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents:
38874
diff
changeset
|
460 $ hg resolve --unmark file1 |
5d00e6061ba2
resolve: add a flag for the default behavior of re-merging
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents:
38874
diff
changeset
|
461 $ hg resolve -l |
5d00e6061ba2
resolve: add a flag for the default behavior of re-merging
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents:
38874
diff
changeset
|
462 U file1 |
5d00e6061ba2
resolve: add a flag for the default behavior of re-merging
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents:
38874
diff
changeset
|
463 R file2 |
5d00e6061ba2
resolve: add a flag for the default behavior of re-merging
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents:
38874
diff
changeset
|
464 $ hg resolve --mark --re-merge |
39393
56469d475341
resolve: add config to make hg resolve not re-merge by default
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents:
39392
diff
changeset
|
465 abort: too many actions specified |
39392
5d00e6061ba2
resolve: add a flag for the default behavior of re-merging
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents:
38874
diff
changeset
|
466 [255] |
5d00e6061ba2
resolve: add a flag for the default behavior of re-merging
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents:
38874
diff
changeset
|
467 $ hg resolve --re-merge --all |
5d00e6061ba2
resolve: add a flag for the default behavior of re-merging
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents:
38874
diff
changeset
|
468 merging file1 |
5d00e6061ba2
resolve: add a flag for the default behavior of re-merging
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents:
38874
diff
changeset
|
469 warning: conflicts while merging file1! (edit, then use 'hg resolve --mark') |
5d00e6061ba2
resolve: add a flag for the default behavior of re-merging
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents:
38874
diff
changeset
|
470 [1] |
39393
56469d475341
resolve: add config to make hg resolve not re-merge by default
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents:
39392
diff
changeset
|
471 Explicit re-merge |
56469d475341
resolve: add config to make hg resolve not re-merge by default
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents:
39392
diff
changeset
|
472 $ hg resolve --unmark file1 |
56469d475341
resolve: add config to make hg resolve not re-merge by default
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents:
39392
diff
changeset
|
473 $ hg resolve --config commands.resolve.explicit-re-merge=1 --all |
56469d475341
resolve: add config to make hg resolve not re-merge by default
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents:
39392
diff
changeset
|
474 abort: no action specified |
56469d475341
resolve: add config to make hg resolve not re-merge by default
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents:
39392
diff
changeset
|
475 (use --mark, --unmark, --list or --re-merge) |
56469d475341
resolve: add config to make hg resolve not re-merge by default
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents:
39392
diff
changeset
|
476 [255] |
56469d475341
resolve: add config to make hg resolve not re-merge by default
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents:
39392
diff
changeset
|
477 $ hg resolve --config commands.resolve.explicit-re-merge=1 --re-merge --all |
56469d475341
resolve: add config to make hg resolve not re-merge by default
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents:
39392
diff
changeset
|
478 merging file1 |
56469d475341
resolve: add config to make hg resolve not re-merge by default
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents:
39392
diff
changeset
|
479 warning: conflicts while merging file1! (edit, then use 'hg resolve --mark') |
56469d475341
resolve: add config to make hg resolve not re-merge by default
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents:
39392
diff
changeset
|
480 [1] |
38793
6c8e3c847977
resolve: add option to warn/abort on -m with unresolved conflict markers
Kyle Lippincott <spectral@google.com>
parents:
38544
diff
changeset
|
481 |
16913
f2719b387380
tests: add missing trailing 'cd ..'
Mads Kiilerich <mads@kiilerich.com>
parents:
12788
diff
changeset
|
482 $ cd .. |
38822
f8732e33bcbc
resolve: add confirm config option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38793
diff
changeset
|
483 |
f8732e33bcbc
resolve: add confirm config option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38793
diff
changeset
|
484 ====================================================== |
f8732e33bcbc
resolve: add confirm config option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38793
diff
changeset
|
485 Test 'hg resolve' confirm config option functionality | |
f8732e33bcbc
resolve: add confirm config option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38793
diff
changeset
|
486 ====================================================== |
f8732e33bcbc
resolve: add confirm config option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38793
diff
changeset
|
487 $ cat >> $HGRCPATH << EOF |
f8732e33bcbc
resolve: add confirm config option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38793
diff
changeset
|
488 > [extensions] |
f8732e33bcbc
resolve: add confirm config option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38793
diff
changeset
|
489 > rebase= |
f8732e33bcbc
resolve: add confirm config option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38793
diff
changeset
|
490 > EOF |
f8732e33bcbc
resolve: add confirm config option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38793
diff
changeset
|
491 |
f8732e33bcbc
resolve: add confirm config option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38793
diff
changeset
|
492 $ hg init repo2 |
f8732e33bcbc
resolve: add confirm config option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38793
diff
changeset
|
493 $ cd repo2 |
f8732e33bcbc
resolve: add confirm config option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38793
diff
changeset
|
494 |
f8732e33bcbc
resolve: add confirm config option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38793
diff
changeset
|
495 $ echo boss > boss |
f8732e33bcbc
resolve: add confirm config option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38793
diff
changeset
|
496 $ hg ci -Am "add boss" |
f8732e33bcbc
resolve: add confirm config option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38793
diff
changeset
|
497 adding boss |
f8732e33bcbc
resolve: add confirm config option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38793
diff
changeset
|
498 |
f8732e33bcbc
resolve: add confirm config option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38793
diff
changeset
|
499 $ for emp in emp1 emp2 emp3; do echo work > $emp; done; |
f8732e33bcbc
resolve: add confirm config option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38793
diff
changeset
|
500 $ hg ci -Aqm "added emp1 emp2 emp3" |
f8732e33bcbc
resolve: add confirm config option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38793
diff
changeset
|
501 |
f8732e33bcbc
resolve: add confirm config option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38793
diff
changeset
|
502 $ hg up 0 |
f8732e33bcbc
resolve: add confirm config option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38793
diff
changeset
|
503 0 files updated, 0 files merged, 3 files removed, 0 files unresolved |
f8732e33bcbc
resolve: add confirm config option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38793
diff
changeset
|
504 |
f8732e33bcbc
resolve: add confirm config option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38793
diff
changeset
|
505 $ for emp in emp1 emp2 emp3; do echo nowork > $emp; done; |
f8732e33bcbc
resolve: add confirm config option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38793
diff
changeset
|
506 $ hg ci -Aqm "added lazy emp1 emp2 emp3" |
f8732e33bcbc
resolve: add confirm config option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38793
diff
changeset
|
507 |
f8732e33bcbc
resolve: add confirm config option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38793
diff
changeset
|
508 $ hg log -GT "{rev} {node|short} {firstline(desc)}\n" |
f8732e33bcbc
resolve: add confirm config option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38793
diff
changeset
|
509 @ 2 0acfd4a49af0 added lazy emp1 emp2 emp3 |
f8732e33bcbc
resolve: add confirm config option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38793
diff
changeset
|
510 | |
f8732e33bcbc
resolve: add confirm config option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38793
diff
changeset
|
511 | o 1 f30f98a8181f added emp1 emp2 emp3 |
f8732e33bcbc
resolve: add confirm config option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38793
diff
changeset
|
512 |/ |
f8732e33bcbc
resolve: add confirm config option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38793
diff
changeset
|
513 o 0 88660038d466 add boss |
f8732e33bcbc
resolve: add confirm config option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38793
diff
changeset
|
514 |
f8732e33bcbc
resolve: add confirm config option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38793
diff
changeset
|
515 $ hg rebase -s 1 -d 2 |
f8732e33bcbc
resolve: add confirm config option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38793
diff
changeset
|
516 rebasing 1:f30f98a8181f "added emp1 emp2 emp3" |
f8732e33bcbc
resolve: add confirm config option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38793
diff
changeset
|
517 merging emp1 |
f8732e33bcbc
resolve: add confirm config option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38793
diff
changeset
|
518 merging emp2 |
f8732e33bcbc
resolve: add confirm config option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38793
diff
changeset
|
519 merging emp3 |
f8732e33bcbc
resolve: add confirm config option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38793
diff
changeset
|
520 warning: conflicts while merging emp1! (edit, then use 'hg resolve --mark') |
f8732e33bcbc
resolve: add confirm config option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38793
diff
changeset
|
521 warning: conflicts while merging emp2! (edit, then use 'hg resolve --mark') |
f8732e33bcbc
resolve: add confirm config option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38793
diff
changeset
|
522 warning: conflicts while merging emp3! (edit, then use 'hg resolve --mark') |
45150
dc5e5577af39
error: unify the error message formats for 'rebase' and 'unshelve'
Daniel Ploch <dploch@google.com>
parents:
44856
diff
changeset
|
523 unresolved conflicts (see 'hg resolve', then 'hg rebase --continue') |
38822
f8732e33bcbc
resolve: add confirm config option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38793
diff
changeset
|
524 [1] |
f8732e33bcbc
resolve: add confirm config option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38793
diff
changeset
|
525 |
f8732e33bcbc
resolve: add confirm config option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38793
diff
changeset
|
526 Test when commands.resolve.confirm config option is not set: |
f8732e33bcbc
resolve: add confirm config option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38793
diff
changeset
|
527 =========================================================== |
f8732e33bcbc
resolve: add confirm config option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38793
diff
changeset
|
528 $ hg resolve --all |
f8732e33bcbc
resolve: add confirm config option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38793
diff
changeset
|
529 merging emp1 |
f8732e33bcbc
resolve: add confirm config option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38793
diff
changeset
|
530 merging emp2 |
f8732e33bcbc
resolve: add confirm config option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38793
diff
changeset
|
531 merging emp3 |
f8732e33bcbc
resolve: add confirm config option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38793
diff
changeset
|
532 warning: conflicts while merging emp1! (edit, then use 'hg resolve --mark') |
f8732e33bcbc
resolve: add confirm config option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38793
diff
changeset
|
533 warning: conflicts while merging emp2! (edit, then use 'hg resolve --mark') |
f8732e33bcbc
resolve: add confirm config option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38793
diff
changeset
|
534 warning: conflicts while merging emp3! (edit, then use 'hg resolve --mark') |
f8732e33bcbc
resolve: add confirm config option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38793
diff
changeset
|
535 [1] |
f8732e33bcbc
resolve: add confirm config option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38793
diff
changeset
|
536 |
f8732e33bcbc
resolve: add confirm config option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38793
diff
changeset
|
537 Test when config option is set: |
f8732e33bcbc
resolve: add confirm config option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38793
diff
changeset
|
538 ============================== |
40568
b93157f69f46
tests: make the commands.resolve.confirm tests not pollute the test-wide hgrc
Kyle Lippincott <spectral@google.com>
parents:
40567
diff
changeset
|
539 $ cat >> .hg/hgrc << EOF |
38822
f8732e33bcbc
resolve: add confirm config option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38793
diff
changeset
|
540 > [ui] |
f8732e33bcbc
resolve: add confirm config option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38793
diff
changeset
|
541 > interactive = True |
f8732e33bcbc
resolve: add confirm config option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38793
diff
changeset
|
542 > [commands] |
f8732e33bcbc
resolve: add confirm config option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38793
diff
changeset
|
543 > resolve.confirm = True |
f8732e33bcbc
resolve: add confirm config option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38793
diff
changeset
|
544 > EOF |
f8732e33bcbc
resolve: add confirm config option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38793
diff
changeset
|
545 |
f8732e33bcbc
resolve: add confirm config option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38793
diff
changeset
|
546 $ hg resolve |
f8732e33bcbc
resolve: add confirm config option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38793
diff
changeset
|
547 abort: no files or directories specified |
f8732e33bcbc
resolve: add confirm config option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38793
diff
changeset
|
548 (use --all to re-merge all unresolved files) |
f8732e33bcbc
resolve: add confirm config option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38793
diff
changeset
|
549 [255] |
f8732e33bcbc
resolve: add confirm config option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38793
diff
changeset
|
550 $ hg resolve --all << EOF |
f8732e33bcbc
resolve: add confirm config option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38793
diff
changeset
|
551 > n |
f8732e33bcbc
resolve: add confirm config option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38793
diff
changeset
|
552 > EOF |
f8732e33bcbc
resolve: add confirm config option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38793
diff
changeset
|
553 re-merge all unresolved files (yn)? n |
f8732e33bcbc
resolve: add confirm config option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38793
diff
changeset
|
554 abort: user quit |
f8732e33bcbc
resolve: add confirm config option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38793
diff
changeset
|
555 [255] |
f8732e33bcbc
resolve: add confirm config option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38793
diff
changeset
|
556 |
f8732e33bcbc
resolve: add confirm config option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38793
diff
changeset
|
557 $ hg resolve --all << EOF |
f8732e33bcbc
resolve: add confirm config option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38793
diff
changeset
|
558 > y |
f8732e33bcbc
resolve: add confirm config option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38793
diff
changeset
|
559 > EOF |
f8732e33bcbc
resolve: add confirm config option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38793
diff
changeset
|
560 re-merge all unresolved files (yn)? y |
f8732e33bcbc
resolve: add confirm config option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38793
diff
changeset
|
561 merging emp1 |
f8732e33bcbc
resolve: add confirm config option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38793
diff
changeset
|
562 merging emp2 |
f8732e33bcbc
resolve: add confirm config option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38793
diff
changeset
|
563 merging emp3 |
f8732e33bcbc
resolve: add confirm config option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38793
diff
changeset
|
564 warning: conflicts while merging emp1! (edit, then use 'hg resolve --mark') |
f8732e33bcbc
resolve: add confirm config option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38793
diff
changeset
|
565 warning: conflicts while merging emp2! (edit, then use 'hg resolve --mark') |
f8732e33bcbc
resolve: add confirm config option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38793
diff
changeset
|
566 warning: conflicts while merging emp3! (edit, then use 'hg resolve --mark') |
f8732e33bcbc
resolve: add confirm config option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38793
diff
changeset
|
567 [1] |
f8732e33bcbc
resolve: add confirm config option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38793
diff
changeset
|
568 |
38859
db03e5cefc82
resolve: support commands.resolve.confirm option with --mark flag
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38857
diff
changeset
|
569 Test that commands.resolve.confirm respect --mark option (only when no patterns args are given): |
db03e5cefc82
resolve: support commands.resolve.confirm option with --mark flag
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38857
diff
changeset
|
570 =============================================================================================== |
db03e5cefc82
resolve: support commands.resolve.confirm option with --mark flag
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38857
diff
changeset
|
571 |
db03e5cefc82
resolve: support commands.resolve.confirm option with --mark flag
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38857
diff
changeset
|
572 $ hg resolve -m emp1 |
db03e5cefc82
resolve: support commands.resolve.confirm option with --mark flag
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38857
diff
changeset
|
573 $ hg resolve -l |
db03e5cefc82
resolve: support commands.resolve.confirm option with --mark flag
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38857
diff
changeset
|
574 R emp1 |
db03e5cefc82
resolve: support commands.resolve.confirm option with --mark flag
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38857
diff
changeset
|
575 U emp2 |
db03e5cefc82
resolve: support commands.resolve.confirm option with --mark flag
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38857
diff
changeset
|
576 U emp3 |
db03e5cefc82
resolve: support commands.resolve.confirm option with --mark flag
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38857
diff
changeset
|
577 |
db03e5cefc82
resolve: support commands.resolve.confirm option with --mark flag
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38857
diff
changeset
|
578 $ hg resolve -m << EOF |
db03e5cefc82
resolve: support commands.resolve.confirm option with --mark flag
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38857
diff
changeset
|
579 > n |
db03e5cefc82
resolve: support commands.resolve.confirm option with --mark flag
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38857
diff
changeset
|
580 > EOF |
db03e5cefc82
resolve: support commands.resolve.confirm option with --mark flag
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38857
diff
changeset
|
581 mark all unresolved files as resolved (yn)? n |
db03e5cefc82
resolve: support commands.resolve.confirm option with --mark flag
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38857
diff
changeset
|
582 abort: user quit |
db03e5cefc82
resolve: support commands.resolve.confirm option with --mark flag
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38857
diff
changeset
|
583 [255] |
db03e5cefc82
resolve: support commands.resolve.confirm option with --mark flag
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38857
diff
changeset
|
584 |
db03e5cefc82
resolve: support commands.resolve.confirm option with --mark flag
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38857
diff
changeset
|
585 $ hg resolve -m << EOF |
db03e5cefc82
resolve: support commands.resolve.confirm option with --mark flag
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38857
diff
changeset
|
586 > y |
db03e5cefc82
resolve: support commands.resolve.confirm option with --mark flag
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38857
diff
changeset
|
587 > EOF |
db03e5cefc82
resolve: support commands.resolve.confirm option with --mark flag
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38857
diff
changeset
|
588 mark all unresolved files as resolved (yn)? y |
db03e5cefc82
resolve: support commands.resolve.confirm option with --mark flag
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38857
diff
changeset
|
589 (no more unresolved files) |
db03e5cefc82
resolve: support commands.resolve.confirm option with --mark flag
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38857
diff
changeset
|
590 continue: hg rebase --continue |
db03e5cefc82
resolve: support commands.resolve.confirm option with --mark flag
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38857
diff
changeset
|
591 $ hg resolve -l |
db03e5cefc82
resolve: support commands.resolve.confirm option with --mark flag
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38857
diff
changeset
|
592 R emp1 |
db03e5cefc82
resolve: support commands.resolve.confirm option with --mark flag
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38857
diff
changeset
|
593 R emp2 |
db03e5cefc82
resolve: support commands.resolve.confirm option with --mark flag
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38857
diff
changeset
|
594 R emp3 |
db03e5cefc82
resolve: support commands.resolve.confirm option with --mark flag
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38857
diff
changeset
|
595 |
38874
f35f6791595f
resolve: support confirm config option with --unmark flag
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38873
diff
changeset
|
596 Test that commands.resolve.confirm respect --unmark option (only when no patterns args are given): |
40567
8785d66edd6e
tests: fix a couple typos in test-resolve.t comments and add a comment
Kyle Lippincott <spectral@google.com>
parents:
39928
diff
changeset
|
597 ================================================================================================= |
38874
f35f6791595f
resolve: support confirm config option with --unmark flag
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38873
diff
changeset
|
598 |
f35f6791595f
resolve: support confirm config option with --unmark flag
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38873
diff
changeset
|
599 $ hg resolve -u emp1 |
f35f6791595f
resolve: support confirm config option with --unmark flag
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38873
diff
changeset
|
600 |
f35f6791595f
resolve: support confirm config option with --unmark flag
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38873
diff
changeset
|
601 $ hg resolve -l |
f35f6791595f
resolve: support confirm config option with --unmark flag
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38873
diff
changeset
|
602 U emp1 |
f35f6791595f
resolve: support confirm config option with --unmark flag
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38873
diff
changeset
|
603 R emp2 |
f35f6791595f
resolve: support confirm config option with --unmark flag
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38873
diff
changeset
|
604 R emp3 |
f35f6791595f
resolve: support confirm config option with --unmark flag
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38873
diff
changeset
|
605 |
f35f6791595f
resolve: support confirm config option with --unmark flag
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38873
diff
changeset
|
606 $ hg resolve -u << EOF |
f35f6791595f
resolve: support confirm config option with --unmark flag
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38873
diff
changeset
|
607 > n |
f35f6791595f
resolve: support confirm config option with --unmark flag
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38873
diff
changeset
|
608 > EOF |
f35f6791595f
resolve: support confirm config option with --unmark flag
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38873
diff
changeset
|
609 mark all resolved files as unresolved (yn)? n |
f35f6791595f
resolve: support confirm config option with --unmark flag
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38873
diff
changeset
|
610 abort: user quit |
f35f6791595f
resolve: support confirm config option with --unmark flag
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38873
diff
changeset
|
611 [255] |
f35f6791595f
resolve: support confirm config option with --unmark flag
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38873
diff
changeset
|
612 |
f35f6791595f
resolve: support confirm config option with --unmark flag
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38873
diff
changeset
|
613 $ hg resolve -m << EOF |
f35f6791595f
resolve: support confirm config option with --unmark flag
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38873
diff
changeset
|
614 > y |
f35f6791595f
resolve: support confirm config option with --unmark flag
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38873
diff
changeset
|
615 > EOF |
f35f6791595f
resolve: support confirm config option with --unmark flag
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38873
diff
changeset
|
616 mark all unresolved files as resolved (yn)? y |
f35f6791595f
resolve: support confirm config option with --unmark flag
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38873
diff
changeset
|
617 (no more unresolved files) |
f35f6791595f
resolve: support confirm config option with --unmark flag
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38873
diff
changeset
|
618 continue: hg rebase --continue |
f35f6791595f
resolve: support confirm config option with --unmark flag
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38873
diff
changeset
|
619 |
f35f6791595f
resolve: support confirm config option with --unmark flag
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38873
diff
changeset
|
620 $ hg resolve -l |
f35f6791595f
resolve: support confirm config option with --unmark flag
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38873
diff
changeset
|
621 R emp1 |
f35f6791595f
resolve: support confirm config option with --unmark flag
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38873
diff
changeset
|
622 R emp2 |
f35f6791595f
resolve: support confirm config option with --unmark flag
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38873
diff
changeset
|
623 R emp3 |
f35f6791595f
resolve: support confirm config option with --unmark flag
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38873
diff
changeset
|
624 |
38822
f8732e33bcbc
resolve: add confirm config option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38793
diff
changeset
|
625 $ hg rebase --abort |
f8732e33bcbc
resolve: add confirm config option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38793
diff
changeset
|
626 rebase aborted |
40567
8785d66edd6e
tests: fix a couple typos in test-resolve.t comments and add a comment
Kyle Lippincott <spectral@google.com>
parents:
39928
diff
changeset
|
627 |
8785d66edd6e
tests: fix a couple typos in test-resolve.t comments and add a comment
Kyle Lippincott <spectral@google.com>
parents:
39928
diff
changeset
|
628 Done with commands.resolve.confirm tests: |
38822
f8732e33bcbc
resolve: add confirm config option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38793
diff
changeset
|
629 $ cd .. |
41281
183df3df6031
resolve: fix mark-check when a file was deleted on one side (issue6020)
Kyle Lippincott <spectral@google.com>
parents:
40578
diff
changeset
|
630 |
183df3df6031
resolve: fix mark-check when a file was deleted on one side (issue6020)
Kyle Lippincott <spectral@google.com>
parents:
40578
diff
changeset
|
631 Test that commands.resolve.mark-check works even if there are deleted files: |
183df3df6031
resolve: fix mark-check when a file was deleted on one side (issue6020)
Kyle Lippincott <spectral@google.com>
parents:
40578
diff
changeset
|
632 $ hg init resolve-deleted |
183df3df6031
resolve: fix mark-check when a file was deleted on one side (issue6020)
Kyle Lippincott <spectral@google.com>
parents:
40578
diff
changeset
|
633 $ cd resolve-deleted |
183df3df6031
resolve: fix mark-check when a file was deleted on one side (issue6020)
Kyle Lippincott <spectral@google.com>
parents:
40578
diff
changeset
|
634 $ echo r0 > file1 |
183df3df6031
resolve: fix mark-check when a file was deleted on one side (issue6020)
Kyle Lippincott <spectral@google.com>
parents:
40578
diff
changeset
|
635 $ hg ci -qAm r0 |
183df3df6031
resolve: fix mark-check when a file was deleted on one side (issue6020)
Kyle Lippincott <spectral@google.com>
parents:
40578
diff
changeset
|
636 $ echo r1 > file1 |
183df3df6031
resolve: fix mark-check when a file was deleted on one side (issue6020)
Kyle Lippincott <spectral@google.com>
parents:
40578
diff
changeset
|
637 $ hg ci -qm r1 |
183df3df6031
resolve: fix mark-check when a file was deleted on one side (issue6020)
Kyle Lippincott <spectral@google.com>
parents:
40578
diff
changeset
|
638 $ hg co -qr 0 |
183df3df6031
resolve: fix mark-check when a file was deleted on one side (issue6020)
Kyle Lippincott <spectral@google.com>
parents:
40578
diff
changeset
|
639 $ hg rm file1 |
183df3df6031
resolve: fix mark-check when a file was deleted on one side (issue6020)
Kyle Lippincott <spectral@google.com>
parents:
40578
diff
changeset
|
640 $ hg ci -qm "r2 (delete file1)" |
183df3df6031
resolve: fix mark-check when a file was deleted on one side (issue6020)
Kyle Lippincott <spectral@google.com>
parents:
40578
diff
changeset
|
641 |
183df3df6031
resolve: fix mark-check when a file was deleted on one side (issue6020)
Kyle Lippincott <spectral@google.com>
parents:
40578
diff
changeset
|
642 (At this point we have r0 creating file1, and sibling commits r1 and r2, which |
183df3df6031
resolve: fix mark-check when a file was deleted on one side (issue6020)
Kyle Lippincott <spectral@google.com>
parents:
40578
diff
changeset
|
643 modify and delete file1, respectively) |
183df3df6031
resolve: fix mark-check when a file was deleted on one side (issue6020)
Kyle Lippincott <spectral@google.com>
parents:
40578
diff
changeset
|
644 |
183df3df6031
resolve: fix mark-check when a file was deleted on one side (issue6020)
Kyle Lippincott <spectral@google.com>
parents:
40578
diff
changeset
|
645 $ hg merge -r 1 |
183df3df6031
resolve: fix mark-check when a file was deleted on one side (issue6020)
Kyle Lippincott <spectral@google.com>
parents:
40578
diff
changeset
|
646 file 'file1' was deleted in local [working copy] but was modified in other [merge rev]. |
42565
4764e8436b2a
filemerge: make last line of prompts <40 english chars (issue6158)
Kyle Lippincott <spectral@google.com>
parents:
41511
diff
changeset
|
647 You can use (c)hanged version, leave (d)eleted, or leave (u)nresolved. |
4764e8436b2a
filemerge: make last line of prompts <40 english chars (issue6158)
Kyle Lippincott <spectral@google.com>
parents:
41511
diff
changeset
|
648 What do you want to do? u |
41281
183df3df6031
resolve: fix mark-check when a file was deleted on one side (issue6020)
Kyle Lippincott <spectral@google.com>
parents:
40578
diff
changeset
|
649 0 files updated, 0 files merged, 0 files removed, 1 files unresolved |
183df3df6031
resolve: fix mark-check when a file was deleted on one side (issue6020)
Kyle Lippincott <spectral@google.com>
parents:
40578
diff
changeset
|
650 use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon |
183df3df6031
resolve: fix mark-check when a file was deleted on one side (issue6020)
Kyle Lippincott <spectral@google.com>
parents:
40578
diff
changeset
|
651 [1] |
183df3df6031
resolve: fix mark-check when a file was deleted on one side (issue6020)
Kyle Lippincott <spectral@google.com>
parents:
40578
diff
changeset
|
652 $ hg resolve --list |
183df3df6031
resolve: fix mark-check when a file was deleted on one side (issue6020)
Kyle Lippincott <spectral@google.com>
parents:
40578
diff
changeset
|
653 U file1 |
183df3df6031
resolve: fix mark-check when a file was deleted on one side (issue6020)
Kyle Lippincott <spectral@google.com>
parents:
40578
diff
changeset
|
654 Because we left it as 'unresolved' the file should still exist. |
183df3df6031
resolve: fix mark-check when a file was deleted on one side (issue6020)
Kyle Lippincott <spectral@google.com>
parents:
40578
diff
changeset
|
655 $ [ -f file1 ] || echo "File does not exist?" |
183df3df6031
resolve: fix mark-check when a file was deleted on one side (issue6020)
Kyle Lippincott <spectral@google.com>
parents:
40578
diff
changeset
|
656 BC behavior: `hg resolve --mark` accepts that the file is still there, and |
183df3df6031
resolve: fix mark-check when a file was deleted on one side (issue6020)
Kyle Lippincott <spectral@google.com>
parents:
40578
diff
changeset
|
657 doesn't have a problem with this situation. |
183df3df6031
resolve: fix mark-check when a file was deleted on one side (issue6020)
Kyle Lippincott <spectral@google.com>
parents:
40578
diff
changeset
|
658 $ hg resolve --mark --config commands.resolve.mark-check=abort |
183df3df6031
resolve: fix mark-check when a file was deleted on one side (issue6020)
Kyle Lippincott <spectral@google.com>
parents:
40578
diff
changeset
|
659 (no more unresolved files) |
183df3df6031
resolve: fix mark-check when a file was deleted on one side (issue6020)
Kyle Lippincott <spectral@google.com>
parents:
40578
diff
changeset
|
660 $ hg resolve --list |
183df3df6031
resolve: fix mark-check when a file was deleted on one side (issue6020)
Kyle Lippincott <spectral@google.com>
parents:
40578
diff
changeset
|
661 R file1 |
183df3df6031
resolve: fix mark-check when a file was deleted on one side (issue6020)
Kyle Lippincott <spectral@google.com>
parents:
40578
diff
changeset
|
662 The file is still there: |
183df3df6031
resolve: fix mark-check when a file was deleted on one side (issue6020)
Kyle Lippincott <spectral@google.com>
parents:
40578
diff
changeset
|
663 $ [ -f file1 ] || echo "File does not exist?" |
183df3df6031
resolve: fix mark-check when a file was deleted on one side (issue6020)
Kyle Lippincott <spectral@google.com>
parents:
40578
diff
changeset
|
664 Let's check mark-check=warn: |
183df3df6031
resolve: fix mark-check when a file was deleted on one side (issue6020)
Kyle Lippincott <spectral@google.com>
parents:
40578
diff
changeset
|
665 $ hg resolve --unmark file1 |
183df3df6031
resolve: fix mark-check when a file was deleted on one side (issue6020)
Kyle Lippincott <spectral@google.com>
parents:
40578
diff
changeset
|
666 $ hg resolve --mark --config commands.resolve.mark-check=warn |
183df3df6031
resolve: fix mark-check when a file was deleted on one side (issue6020)
Kyle Lippincott <spectral@google.com>
parents:
40578
diff
changeset
|
667 (no more unresolved files) |
183df3df6031
resolve: fix mark-check when a file was deleted on one side (issue6020)
Kyle Lippincott <spectral@google.com>
parents:
40578
diff
changeset
|
668 $ hg resolve --list |
183df3df6031
resolve: fix mark-check when a file was deleted on one side (issue6020)
Kyle Lippincott <spectral@google.com>
parents:
40578
diff
changeset
|
669 R file1 |
183df3df6031
resolve: fix mark-check when a file was deleted on one side (issue6020)
Kyle Lippincott <spectral@google.com>
parents:
40578
diff
changeset
|
670 The file is still there: |
183df3df6031
resolve: fix mark-check when a file was deleted on one side (issue6020)
Kyle Lippincott <spectral@google.com>
parents:
40578
diff
changeset
|
671 $ [ -f file1 ] || echo "File does not exist?" |
183df3df6031
resolve: fix mark-check when a file was deleted on one side (issue6020)
Kyle Lippincott <spectral@google.com>
parents:
40578
diff
changeset
|
672 Let's resolve the issue by deleting the file via `hg resolve` |
183df3df6031
resolve: fix mark-check when a file was deleted on one side (issue6020)
Kyle Lippincott <spectral@google.com>
parents:
40578
diff
changeset
|
673 $ hg resolve --unmark file1 |
183df3df6031
resolve: fix mark-check when a file was deleted on one side (issue6020)
Kyle Lippincott <spectral@google.com>
parents:
40578
diff
changeset
|
674 $ echo 'd' | hg resolve file1 --config ui.interactive=1 |
183df3df6031
resolve: fix mark-check when a file was deleted on one side (issue6020)
Kyle Lippincott <spectral@google.com>
parents:
40578
diff
changeset
|
675 file 'file1' was deleted in local [working copy] but was modified in other [merge rev]. |
42565
4764e8436b2a
filemerge: make last line of prompts <40 english chars (issue6158)
Kyle Lippincott <spectral@google.com>
parents:
41511
diff
changeset
|
676 You can use (c)hanged version, leave (d)eleted, or leave (u)nresolved. |
4764e8436b2a
filemerge: make last line of prompts <40 english chars (issue6158)
Kyle Lippincott <spectral@google.com>
parents:
41511
diff
changeset
|
677 What do you want to do? d |
41281
183df3df6031
resolve: fix mark-check when a file was deleted on one side (issue6020)
Kyle Lippincott <spectral@google.com>
parents:
40578
diff
changeset
|
678 (no more unresolved files) |
183df3df6031
resolve: fix mark-check when a file was deleted on one side (issue6020)
Kyle Lippincott <spectral@google.com>
parents:
40578
diff
changeset
|
679 $ hg resolve --list |
183df3df6031
resolve: fix mark-check when a file was deleted on one side (issue6020)
Kyle Lippincott <spectral@google.com>
parents:
40578
diff
changeset
|
680 R file1 |
183df3df6031
resolve: fix mark-check when a file was deleted on one side (issue6020)
Kyle Lippincott <spectral@google.com>
parents:
40578
diff
changeset
|
681 The file is deleted: |
183df3df6031
resolve: fix mark-check when a file was deleted on one side (issue6020)
Kyle Lippincott <spectral@google.com>
parents:
40578
diff
changeset
|
682 $ [ -f file1 ] && echo "File still exists?" || true |
183df3df6031
resolve: fix mark-check when a file was deleted on one side (issue6020)
Kyle Lippincott <spectral@google.com>
parents:
40578
diff
changeset
|
683 Doing `hg resolve --mark` doesn't break now that the file is missing: |
183df3df6031
resolve: fix mark-check when a file was deleted on one side (issue6020)
Kyle Lippincott <spectral@google.com>
parents:
40578
diff
changeset
|
684 $ hg resolve --mark --config commands.resolve.mark-check=abort |
183df3df6031
resolve: fix mark-check when a file was deleted on one side (issue6020)
Kyle Lippincott <spectral@google.com>
parents:
40578
diff
changeset
|
685 (no more unresolved files) |
183df3df6031
resolve: fix mark-check when a file was deleted on one side (issue6020)
Kyle Lippincott <spectral@google.com>
parents:
40578
diff
changeset
|
686 $ hg resolve --mark --config commands.resolve.mark-check=warn |
183df3df6031
resolve: fix mark-check when a file was deleted on one side (issue6020)
Kyle Lippincott <spectral@google.com>
parents:
40578
diff
changeset
|
687 (no more unresolved files) |
183df3df6031
resolve: fix mark-check when a file was deleted on one side (issue6020)
Kyle Lippincott <spectral@google.com>
parents:
40578
diff
changeset
|
688 Resurrect the file, and delete it outside of hg: |
183df3df6031
resolve: fix mark-check when a file was deleted on one side (issue6020)
Kyle Lippincott <spectral@google.com>
parents:
40578
diff
changeset
|
689 $ hg resolve --unmark file1 |
183df3df6031
resolve: fix mark-check when a file was deleted on one side (issue6020)
Kyle Lippincott <spectral@google.com>
parents:
40578
diff
changeset
|
690 $ hg resolve file1 |
183df3df6031
resolve: fix mark-check when a file was deleted on one side (issue6020)
Kyle Lippincott <spectral@google.com>
parents:
40578
diff
changeset
|
691 file 'file1' was deleted in local [working copy] but was modified in other [merge rev]. |
42565
4764e8436b2a
filemerge: make last line of prompts <40 english chars (issue6158)
Kyle Lippincott <spectral@google.com>
parents:
41511
diff
changeset
|
692 You can use (c)hanged version, leave (d)eleted, or leave (u)nresolved. |
4764e8436b2a
filemerge: make last line of prompts <40 english chars (issue6158)
Kyle Lippincott <spectral@google.com>
parents:
41511
diff
changeset
|
693 What do you want to do? u |
41281
183df3df6031
resolve: fix mark-check when a file was deleted on one side (issue6020)
Kyle Lippincott <spectral@google.com>
parents:
40578
diff
changeset
|
694 [1] |
183df3df6031
resolve: fix mark-check when a file was deleted on one side (issue6020)
Kyle Lippincott <spectral@google.com>
parents:
40578
diff
changeset
|
695 $ [ -f file1 ] || echo "File does not exist?" |
183df3df6031
resolve: fix mark-check when a file was deleted on one side (issue6020)
Kyle Lippincott <spectral@google.com>
parents:
40578
diff
changeset
|
696 $ hg resolve --list |
183df3df6031
resolve: fix mark-check when a file was deleted on one side (issue6020)
Kyle Lippincott <spectral@google.com>
parents:
40578
diff
changeset
|
697 U file1 |
183df3df6031
resolve: fix mark-check when a file was deleted on one side (issue6020)
Kyle Lippincott <spectral@google.com>
parents:
40578
diff
changeset
|
698 $ rm file1 |
183df3df6031
resolve: fix mark-check when a file was deleted on one side (issue6020)
Kyle Lippincott <spectral@google.com>
parents:
40578
diff
changeset
|
699 $ hg resolve --mark --config commands.resolve.mark-check=abort |
183df3df6031
resolve: fix mark-check when a file was deleted on one side (issue6020)
Kyle Lippincott <spectral@google.com>
parents:
40578
diff
changeset
|
700 (no more unresolved files) |
183df3df6031
resolve: fix mark-check when a file was deleted on one side (issue6020)
Kyle Lippincott <spectral@google.com>
parents:
40578
diff
changeset
|
701 $ hg resolve --list |
183df3df6031
resolve: fix mark-check when a file was deleted on one side (issue6020)
Kyle Lippincott <spectral@google.com>
parents:
40578
diff
changeset
|
702 R file1 |
183df3df6031
resolve: fix mark-check when a file was deleted on one side (issue6020)
Kyle Lippincott <spectral@google.com>
parents:
40578
diff
changeset
|
703 $ hg resolve --unmark file1 |
183df3df6031
resolve: fix mark-check when a file was deleted on one side (issue6020)
Kyle Lippincott <spectral@google.com>
parents:
40578
diff
changeset
|
704 $ hg resolve file1 |
183df3df6031
resolve: fix mark-check when a file was deleted on one side (issue6020)
Kyle Lippincott <spectral@google.com>
parents:
40578
diff
changeset
|
705 file 'file1' was deleted in local [working copy] but was modified in other [merge rev]. |
42565
4764e8436b2a
filemerge: make last line of prompts <40 english chars (issue6158)
Kyle Lippincott <spectral@google.com>
parents:
41511
diff
changeset
|
706 You can use (c)hanged version, leave (d)eleted, or leave (u)nresolved. |
4764e8436b2a
filemerge: make last line of prompts <40 english chars (issue6158)
Kyle Lippincott <spectral@google.com>
parents:
41511
diff
changeset
|
707 What do you want to do? u |
41281
183df3df6031
resolve: fix mark-check when a file was deleted on one side (issue6020)
Kyle Lippincott <spectral@google.com>
parents:
40578
diff
changeset
|
708 [1] |
183df3df6031
resolve: fix mark-check when a file was deleted on one side (issue6020)
Kyle Lippincott <spectral@google.com>
parents:
40578
diff
changeset
|
709 $ [ -f file1 ] || echo "File does not exist?" |
183df3df6031
resolve: fix mark-check when a file was deleted on one side (issue6020)
Kyle Lippincott <spectral@google.com>
parents:
40578
diff
changeset
|
710 $ hg resolve --list |
183df3df6031
resolve: fix mark-check when a file was deleted on one side (issue6020)
Kyle Lippincott <spectral@google.com>
parents:
40578
diff
changeset
|
711 U file1 |
183df3df6031
resolve: fix mark-check when a file was deleted on one side (issue6020)
Kyle Lippincott <spectral@google.com>
parents:
40578
diff
changeset
|
712 $ rm file1 |
183df3df6031
resolve: fix mark-check when a file was deleted on one side (issue6020)
Kyle Lippincott <spectral@google.com>
parents:
40578
diff
changeset
|
713 $ hg resolve --mark --config commands.resolve.mark-check=warn |
183df3df6031
resolve: fix mark-check when a file was deleted on one side (issue6020)
Kyle Lippincott <spectral@google.com>
parents:
40578
diff
changeset
|
714 (no more unresolved files) |
183df3df6031
resolve: fix mark-check when a file was deleted on one side (issue6020)
Kyle Lippincott <spectral@google.com>
parents:
40578
diff
changeset
|
715 $ hg resolve --list |
183df3df6031
resolve: fix mark-check when a file was deleted on one side (issue6020)
Kyle Lippincott <spectral@google.com>
parents:
40578
diff
changeset
|
716 R file1 |
183df3df6031
resolve: fix mark-check when a file was deleted on one side (issue6020)
Kyle Lippincott <spectral@google.com>
parents:
40578
diff
changeset
|
717 |
183df3df6031
resolve: fix mark-check when a file was deleted on one side (issue6020)
Kyle Lippincott <spectral@google.com>
parents:
40578
diff
changeset
|
718 |
183df3df6031
resolve: fix mark-check when a file was deleted on one side (issue6020)
Kyle Lippincott <spectral@google.com>
parents:
40578
diff
changeset
|
719 For completeness, let's try that in the opposite direction (merging r2 into r1, |
183df3df6031
resolve: fix mark-check when a file was deleted on one side (issue6020)
Kyle Lippincott <spectral@google.com>
parents:
40578
diff
changeset
|
720 instead of r1 into r2): |
183df3df6031
resolve: fix mark-check when a file was deleted on one side (issue6020)
Kyle Lippincott <spectral@google.com>
parents:
40578
diff
changeset
|
721 $ hg update -qCr 1 |
183df3df6031
resolve: fix mark-check when a file was deleted on one side (issue6020)
Kyle Lippincott <spectral@google.com>
parents:
40578
diff
changeset
|
722 $ hg merge -r 2 |
183df3df6031
resolve: fix mark-check when a file was deleted on one side (issue6020)
Kyle Lippincott <spectral@google.com>
parents:
40578
diff
changeset
|
723 file 'file1' was deleted in other [merge rev] but was modified in local [working copy]. |
42565
4764e8436b2a
filemerge: make last line of prompts <40 english chars (issue6158)
Kyle Lippincott <spectral@google.com>
parents:
41511
diff
changeset
|
724 You can use (c)hanged version, (d)elete, or leave (u)nresolved. |
4764e8436b2a
filemerge: make last line of prompts <40 english chars (issue6158)
Kyle Lippincott <spectral@google.com>
parents:
41511
diff
changeset
|
725 What do you want to do? u |
41281
183df3df6031
resolve: fix mark-check when a file was deleted on one side (issue6020)
Kyle Lippincott <spectral@google.com>
parents:
40578
diff
changeset
|
726 0 files updated, 0 files merged, 0 files removed, 1 files unresolved |
183df3df6031
resolve: fix mark-check when a file was deleted on one side (issue6020)
Kyle Lippincott <spectral@google.com>
parents:
40578
diff
changeset
|
727 use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon |
183df3df6031
resolve: fix mark-check when a file was deleted on one side (issue6020)
Kyle Lippincott <spectral@google.com>
parents:
40578
diff
changeset
|
728 [1] |
183df3df6031
resolve: fix mark-check when a file was deleted on one side (issue6020)
Kyle Lippincott <spectral@google.com>
parents:
40578
diff
changeset
|
729 $ hg resolve --list |
183df3df6031
resolve: fix mark-check when a file was deleted on one side (issue6020)
Kyle Lippincott <spectral@google.com>
parents:
40578
diff
changeset
|
730 U file1 |
183df3df6031
resolve: fix mark-check when a file was deleted on one side (issue6020)
Kyle Lippincott <spectral@google.com>
parents:
40578
diff
changeset
|
731 Because we left it as 'unresolved' the file should still exist. |
183df3df6031
resolve: fix mark-check when a file was deleted on one side (issue6020)
Kyle Lippincott <spectral@google.com>
parents:
40578
diff
changeset
|
732 $ [ -f file1 ] || echo "File does not exist?" |
183df3df6031
resolve: fix mark-check when a file was deleted on one side (issue6020)
Kyle Lippincott <spectral@google.com>
parents:
40578
diff
changeset
|
733 BC behavior: `hg resolve --mark` accepts that the file is still there, and |
183df3df6031
resolve: fix mark-check when a file was deleted on one side (issue6020)
Kyle Lippincott <spectral@google.com>
parents:
40578
diff
changeset
|
734 doesn't have a problem with this situation. |
183df3df6031
resolve: fix mark-check when a file was deleted on one side (issue6020)
Kyle Lippincott <spectral@google.com>
parents:
40578
diff
changeset
|
735 $ hg resolve --mark --config commands.resolve.mark-check=abort |
183df3df6031
resolve: fix mark-check when a file was deleted on one side (issue6020)
Kyle Lippincott <spectral@google.com>
parents:
40578
diff
changeset
|
736 (no more unresolved files) |
183df3df6031
resolve: fix mark-check when a file was deleted on one side (issue6020)
Kyle Lippincott <spectral@google.com>
parents:
40578
diff
changeset
|
737 $ hg resolve --list |
183df3df6031
resolve: fix mark-check when a file was deleted on one side (issue6020)
Kyle Lippincott <spectral@google.com>
parents:
40578
diff
changeset
|
738 R file1 |
183df3df6031
resolve: fix mark-check when a file was deleted on one side (issue6020)
Kyle Lippincott <spectral@google.com>
parents:
40578
diff
changeset
|
739 The file is still there: |
183df3df6031
resolve: fix mark-check when a file was deleted on one side (issue6020)
Kyle Lippincott <spectral@google.com>
parents:
40578
diff
changeset
|
740 $ [ -f file1 ] || echo "File does not exist?" |
183df3df6031
resolve: fix mark-check when a file was deleted on one side (issue6020)
Kyle Lippincott <spectral@google.com>
parents:
40578
diff
changeset
|
741 Let's check mark-check=warn: |
183df3df6031
resolve: fix mark-check when a file was deleted on one side (issue6020)
Kyle Lippincott <spectral@google.com>
parents:
40578
diff
changeset
|
742 $ hg resolve --unmark file1 |
183df3df6031
resolve: fix mark-check when a file was deleted on one side (issue6020)
Kyle Lippincott <spectral@google.com>
parents:
40578
diff
changeset
|
743 $ hg resolve --mark --config commands.resolve.mark-check=warn |
183df3df6031
resolve: fix mark-check when a file was deleted on one side (issue6020)
Kyle Lippincott <spectral@google.com>
parents:
40578
diff
changeset
|
744 (no more unresolved files) |
183df3df6031
resolve: fix mark-check when a file was deleted on one side (issue6020)
Kyle Lippincott <spectral@google.com>
parents:
40578
diff
changeset
|
745 $ hg resolve --list |
183df3df6031
resolve: fix mark-check when a file was deleted on one side (issue6020)
Kyle Lippincott <spectral@google.com>
parents:
40578
diff
changeset
|
746 R file1 |
183df3df6031
resolve: fix mark-check when a file was deleted on one side (issue6020)
Kyle Lippincott <spectral@google.com>
parents:
40578
diff
changeset
|
747 The file is still there: |
183df3df6031
resolve: fix mark-check when a file was deleted on one side (issue6020)
Kyle Lippincott <spectral@google.com>
parents:
40578
diff
changeset
|
748 $ [ -f file1 ] || echo "File does not exist?" |
183df3df6031
resolve: fix mark-check when a file was deleted on one side (issue6020)
Kyle Lippincott <spectral@google.com>
parents:
40578
diff
changeset
|
749 Let's resolve the issue by deleting the file via `hg resolve` |
183df3df6031
resolve: fix mark-check when a file was deleted on one side (issue6020)
Kyle Lippincott <spectral@google.com>
parents:
40578
diff
changeset
|
750 $ hg resolve --unmark file1 |
183df3df6031
resolve: fix mark-check when a file was deleted on one side (issue6020)
Kyle Lippincott <spectral@google.com>
parents:
40578
diff
changeset
|
751 $ echo 'd' | hg resolve file1 --config ui.interactive=1 |
183df3df6031
resolve: fix mark-check when a file was deleted on one side (issue6020)
Kyle Lippincott <spectral@google.com>
parents:
40578
diff
changeset
|
752 file 'file1' was deleted in other [merge rev] but was modified in local [working copy]. |
42565
4764e8436b2a
filemerge: make last line of prompts <40 english chars (issue6158)
Kyle Lippincott <spectral@google.com>
parents:
41511
diff
changeset
|
753 You can use (c)hanged version, (d)elete, or leave (u)nresolved. |
4764e8436b2a
filemerge: make last line of prompts <40 english chars (issue6158)
Kyle Lippincott <spectral@google.com>
parents:
41511
diff
changeset
|
754 What do you want to do? d |
41281
183df3df6031
resolve: fix mark-check when a file was deleted on one side (issue6020)
Kyle Lippincott <spectral@google.com>
parents:
40578
diff
changeset
|
755 (no more unresolved files) |
183df3df6031
resolve: fix mark-check when a file was deleted on one side (issue6020)
Kyle Lippincott <spectral@google.com>
parents:
40578
diff
changeset
|
756 $ hg resolve --list |
183df3df6031
resolve: fix mark-check when a file was deleted on one side (issue6020)
Kyle Lippincott <spectral@google.com>
parents:
40578
diff
changeset
|
757 R file1 |
183df3df6031
resolve: fix mark-check when a file was deleted on one side (issue6020)
Kyle Lippincott <spectral@google.com>
parents:
40578
diff
changeset
|
758 The file is deleted: |
183df3df6031
resolve: fix mark-check when a file was deleted on one side (issue6020)
Kyle Lippincott <spectral@google.com>
parents:
40578
diff
changeset
|
759 $ [ -f file1 ] && echo "File still exists?" || true |
183df3df6031
resolve: fix mark-check when a file was deleted on one side (issue6020)
Kyle Lippincott <spectral@google.com>
parents:
40578
diff
changeset
|
760 Doing `hg resolve --mark` doesn't break now that the file is missing: |
183df3df6031
resolve: fix mark-check when a file was deleted on one side (issue6020)
Kyle Lippincott <spectral@google.com>
parents:
40578
diff
changeset
|
761 $ hg resolve --mark --config commands.resolve.mark-check=abort |
183df3df6031
resolve: fix mark-check when a file was deleted on one side (issue6020)
Kyle Lippincott <spectral@google.com>
parents:
40578
diff
changeset
|
762 (no more unresolved files) |
183df3df6031
resolve: fix mark-check when a file was deleted on one side (issue6020)
Kyle Lippincott <spectral@google.com>
parents:
40578
diff
changeset
|
763 $ hg resolve --mark --config commands.resolve.mark-check=warn |
183df3df6031
resolve: fix mark-check when a file was deleted on one side (issue6020)
Kyle Lippincott <spectral@google.com>
parents:
40578
diff
changeset
|
764 (no more unresolved files) |
183df3df6031
resolve: fix mark-check when a file was deleted on one side (issue6020)
Kyle Lippincott <spectral@google.com>
parents:
40578
diff
changeset
|
765 Resurrect the file, and delete it outside of hg: |
183df3df6031
resolve: fix mark-check when a file was deleted on one side (issue6020)
Kyle Lippincott <spectral@google.com>
parents:
40578
diff
changeset
|
766 $ hg resolve --unmark file1 |
183df3df6031
resolve: fix mark-check when a file was deleted on one side (issue6020)
Kyle Lippincott <spectral@google.com>
parents:
40578
diff
changeset
|
767 $ hg resolve file1 |
183df3df6031
resolve: fix mark-check when a file was deleted on one side (issue6020)
Kyle Lippincott <spectral@google.com>
parents:
40578
diff
changeset
|
768 file 'file1' was deleted in other [merge rev] but was modified in local [working copy]. |
42565
4764e8436b2a
filemerge: make last line of prompts <40 english chars (issue6158)
Kyle Lippincott <spectral@google.com>
parents:
41511
diff
changeset
|
769 You can use (c)hanged version, (d)elete, or leave (u)nresolved. |
4764e8436b2a
filemerge: make last line of prompts <40 english chars (issue6158)
Kyle Lippincott <spectral@google.com>
parents:
41511
diff
changeset
|
770 What do you want to do? u |
41281
183df3df6031
resolve: fix mark-check when a file was deleted on one side (issue6020)
Kyle Lippincott <spectral@google.com>
parents:
40578
diff
changeset
|
771 [1] |
183df3df6031
resolve: fix mark-check when a file was deleted on one side (issue6020)
Kyle Lippincott <spectral@google.com>
parents:
40578
diff
changeset
|
772 $ [ -f file1 ] || echo "File does not exist?" |
183df3df6031
resolve: fix mark-check when a file was deleted on one side (issue6020)
Kyle Lippincott <spectral@google.com>
parents:
40578
diff
changeset
|
773 $ hg resolve --list |
183df3df6031
resolve: fix mark-check when a file was deleted on one side (issue6020)
Kyle Lippincott <spectral@google.com>
parents:
40578
diff
changeset
|
774 U file1 |
183df3df6031
resolve: fix mark-check when a file was deleted on one side (issue6020)
Kyle Lippincott <spectral@google.com>
parents:
40578
diff
changeset
|
775 $ rm file1 |
183df3df6031
resolve: fix mark-check when a file was deleted on one side (issue6020)
Kyle Lippincott <spectral@google.com>
parents:
40578
diff
changeset
|
776 $ hg resolve --mark --config commands.resolve.mark-check=abort |
183df3df6031
resolve: fix mark-check when a file was deleted on one side (issue6020)
Kyle Lippincott <spectral@google.com>
parents:
40578
diff
changeset
|
777 (no more unresolved files) |
183df3df6031
resolve: fix mark-check when a file was deleted on one side (issue6020)
Kyle Lippincott <spectral@google.com>
parents:
40578
diff
changeset
|
778 $ hg resolve --list |
183df3df6031
resolve: fix mark-check when a file was deleted on one side (issue6020)
Kyle Lippincott <spectral@google.com>
parents:
40578
diff
changeset
|
779 R file1 |
183df3df6031
resolve: fix mark-check when a file was deleted on one side (issue6020)
Kyle Lippincott <spectral@google.com>
parents:
40578
diff
changeset
|
780 $ hg resolve --unmark file1 |
183df3df6031
resolve: fix mark-check when a file was deleted on one side (issue6020)
Kyle Lippincott <spectral@google.com>
parents:
40578
diff
changeset
|
781 $ hg resolve file1 |
183df3df6031
resolve: fix mark-check when a file was deleted on one side (issue6020)
Kyle Lippincott <spectral@google.com>
parents:
40578
diff
changeset
|
782 file 'file1' was deleted in other [merge rev] but was modified in local [working copy]. |
42565
4764e8436b2a
filemerge: make last line of prompts <40 english chars (issue6158)
Kyle Lippincott <spectral@google.com>
parents:
41511
diff
changeset
|
783 You can use (c)hanged version, (d)elete, or leave (u)nresolved. |
4764e8436b2a
filemerge: make last line of prompts <40 english chars (issue6158)
Kyle Lippincott <spectral@google.com>
parents:
41511
diff
changeset
|
784 What do you want to do? u |
41281
183df3df6031
resolve: fix mark-check when a file was deleted on one side (issue6020)
Kyle Lippincott <spectral@google.com>
parents:
40578
diff
changeset
|
785 [1] |
183df3df6031
resolve: fix mark-check when a file was deleted on one side (issue6020)
Kyle Lippincott <spectral@google.com>
parents:
40578
diff
changeset
|
786 $ [ -f file1 ] || echo "File does not exist?" |
183df3df6031
resolve: fix mark-check when a file was deleted on one side (issue6020)
Kyle Lippincott <spectral@google.com>
parents:
40578
diff
changeset
|
787 $ hg resolve --list |
183df3df6031
resolve: fix mark-check when a file was deleted on one side (issue6020)
Kyle Lippincott <spectral@google.com>
parents:
40578
diff
changeset
|
788 U file1 |
183df3df6031
resolve: fix mark-check when a file was deleted on one side (issue6020)
Kyle Lippincott <spectral@google.com>
parents:
40578
diff
changeset
|
789 $ rm file1 |
183df3df6031
resolve: fix mark-check when a file was deleted on one side (issue6020)
Kyle Lippincott <spectral@google.com>
parents:
40578
diff
changeset
|
790 $ hg resolve --mark --config commands.resolve.mark-check=warn |
183df3df6031
resolve: fix mark-check when a file was deleted on one side (issue6020)
Kyle Lippincott <spectral@google.com>
parents:
40578
diff
changeset
|
791 (no more unresolved files) |
183df3df6031
resolve: fix mark-check when a file was deleted on one side (issue6020)
Kyle Lippincott <spectral@google.com>
parents:
40578
diff
changeset
|
792 $ hg resolve --list |
183df3df6031
resolve: fix mark-check when a file was deleted on one side (issue6020)
Kyle Lippincott <spectral@google.com>
parents:
40578
diff
changeset
|
793 R file1 |
183df3df6031
resolve: fix mark-check when a file was deleted on one side (issue6020)
Kyle Lippincott <spectral@google.com>
parents:
40578
diff
changeset
|
794 |
183df3df6031
resolve: fix mark-check when a file was deleted on one side (issue6020)
Kyle Lippincott <spectral@google.com>
parents:
40578
diff
changeset
|
795 $ cd .. |