annotate tests/test-merge-halt.t @ 35121:66c5a8cf2868

lfs: import the Facebook git-lfs client extension The purpose of this is the same as the built-in largefiles extension- to handle huge files outside of the normal storage system, generally to keep the amount of data cloned to a lower amount. There are several benefits of implementing the git-lfs protocol, instead of using the largefiles extension: - Bitbucket and Github support (and probably wider support in 3rd party hosting sites in general). [1][2] - The number of hg internals monkey patched are several orders of magnitude lower, so it will be easier to reason about and maintain. Future commands will likely just work, without requiring various wrappers. - The "standin" files are only written to the filelog, not the disk. That should avoid weird edge cases where the largefile and standin files get out of sync. [3] It also avoids the occasional printing of the "hidden" standin file in various messages. - Filesets like size() will work, even if the file isn't present. (It always says 41 bytes for largefiles, whether present or not.) The only place that I see where largefiles comes out on top is that it works with `hg serve` for simple sharing, without external infrastructure. Getting lfs-test-server working was a hassle, and took awhile to figure out. Maybe we can do something to make it work in the future. Long term, I expect that this will be highly preferred over largefiles. But if we are to recommend this to largefile users, there are some UI issues to bikeshed. Until they are resolved, I've marked this experimental, and am not putting a pointer to this in the largefiles help. The (non exhaustive) list of issues I've seen so far are: - It isn't sufficient to just enable the largefiles extension- you have to explicitly add a file with --large before it will pay attention to the configured sizes and patterns on future adds. The justification being that once you use it, you're stuck with it. I've seen people confused by this, and haven't liked it myself. But it's also saved me a few times. Should we do something like have a specific enabling config setting that must be set in the local repo config, so that enabling this extension in the user or system hgrc doesn't silently start storing lfs files? - The largefiles extension adds a repo requirement when the first largefile is committed, so that the extension must always be enabled in the future. This extension is not doing that, and since I only enabled it locally to avoid infecting other repos, I got a cryptic error about missing flag processors when I cloned. Is there no repo requirement due to shallow/narrow clone considerations (or other future advanced things)? - In the (small amount of) reading I've done about the git implementation, it seems that the files and sizes are stored in a tracked .gitattributes file. I think a tracked file for this would be extremely useful for consistency across developers, but this kind of touches on the tracked hgrc file proposal a few months back. - The git client can specify file patterns, not just sizes. - The largefiles extension has a cache directory in the local repo, but also a system wide one. We should probably implement a system wide cache too, so that multiple clones don't have to refetch the files from the server. - Jun mentioned other missing features, like SSH authentication, gc, etc. The code corresponds to c0492b73c7ef in hg-experimental. [4] The only tweaks are to load the extension in the tests with 'lfs=' instead of 'lfs=$TESTDIR/../hgext3rd/lfs', change the import in the *.py test to hgext (from hgext3rd), add the 'testedwith' declaration, and mark it experimental for now. The infinite-push, p4fastimport, and remotefilelog tests were left behind. The devel-warnings for unregistered config options are not corrected yet, nor are the import check warnings. [1] https://www.mercurial-scm.org/pipermail/mercurial/2017-November/050699.html [2] https://bitbucket.org/site/master/issues/3843/largefiles-support-bb-3903 [3] https://bz.mercurial-scm.org/show_bug.cgi?id=5738 [4] https://bitbucket.org/facebook/hg-experimental
author Matt Harbison <matt_harbison@yahoo.com>
date Tue, 14 Nov 2017 00:06:23 -0500
parents 05535d0dea68
children dc5e5577af39
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
34679
143337bcec9b merge: add tests to show current behavior on failed filemerges
Ryan McElroy <rmcelroy@fb.com>
parents:
diff changeset
1 $ cat >> $HGRCPATH <<EOF
143337bcec9b merge: add tests to show current behavior on failed filemerges
Ryan McElroy <rmcelroy@fb.com>
parents:
diff changeset
2 > [extensions]
143337bcec9b merge: add tests to show current behavior on failed filemerges
Ryan McElroy <rmcelroy@fb.com>
parents:
diff changeset
3 > rebase=
143337bcec9b merge: add tests to show current behavior on failed filemerges
Ryan McElroy <rmcelroy@fb.com>
parents:
diff changeset
4 > [phases]
143337bcec9b merge: add tests to show current behavior on failed filemerges
Ryan McElroy <rmcelroy@fb.com>
parents:
diff changeset
5 > publish=False
143337bcec9b merge: add tests to show current behavior on failed filemerges
Ryan McElroy <rmcelroy@fb.com>
parents:
diff changeset
6 > [merge]
143337bcec9b merge: add tests to show current behavior on failed filemerges
Ryan McElroy <rmcelroy@fb.com>
parents:
diff changeset
7 > EOF
143337bcec9b merge: add tests to show current behavior on failed filemerges
Ryan McElroy <rmcelroy@fb.com>
parents:
diff changeset
8
143337bcec9b merge: add tests to show current behavior on failed filemerges
Ryan McElroy <rmcelroy@fb.com>
parents:
diff changeset
9 $ hg init repo
143337bcec9b merge: add tests to show current behavior on failed filemerges
Ryan McElroy <rmcelroy@fb.com>
parents:
diff changeset
10 $ cd repo
143337bcec9b merge: add tests to show current behavior on failed filemerges
Ryan McElroy <rmcelroy@fb.com>
parents:
diff changeset
11 $ echo a > a
143337bcec9b merge: add tests to show current behavior on failed filemerges
Ryan McElroy <rmcelroy@fb.com>
parents:
diff changeset
12 $ echo b > b
143337bcec9b merge: add tests to show current behavior on failed filemerges
Ryan McElroy <rmcelroy@fb.com>
parents:
diff changeset
13 $ hg commit -qAm ab
143337bcec9b merge: add tests to show current behavior on failed filemerges
Ryan McElroy <rmcelroy@fb.com>
parents:
diff changeset
14 $ echo c >> a
143337bcec9b merge: add tests to show current behavior on failed filemerges
Ryan McElroy <rmcelroy@fb.com>
parents:
diff changeset
15 $ echo c >> b
143337bcec9b merge: add tests to show current behavior on failed filemerges
Ryan McElroy <rmcelroy@fb.com>
parents:
diff changeset
16 $ hg commit -qAm c
143337bcec9b merge: add tests to show current behavior on failed filemerges
Ryan McElroy <rmcelroy@fb.com>
parents:
diff changeset
17 $ hg up -q ".^"
143337bcec9b merge: add tests to show current behavior on failed filemerges
Ryan McElroy <rmcelroy@fb.com>
parents:
diff changeset
18 $ echo d >> a
143337bcec9b merge: add tests to show current behavior on failed filemerges
Ryan McElroy <rmcelroy@fb.com>
parents:
diff changeset
19 $ echo d >> b
143337bcec9b merge: add tests to show current behavior on failed filemerges
Ryan McElroy <rmcelroy@fb.com>
parents:
diff changeset
20 $ hg commit -qAm d
143337bcec9b merge: add tests to show current behavior on failed filemerges
Ryan McElroy <rmcelroy@fb.com>
parents:
diff changeset
21
143337bcec9b merge: add tests to show current behavior on failed filemerges
Ryan McElroy <rmcelroy@fb.com>
parents:
diff changeset
22 Testing on-failure=continue
143337bcec9b merge: add tests to show current behavior on failed filemerges
Ryan McElroy <rmcelroy@fb.com>
parents:
diff changeset
23 $ echo on-failure=continue >> $HGRCPATH
143337bcec9b merge: add tests to show current behavior on failed filemerges
Ryan McElroy <rmcelroy@fb.com>
parents:
diff changeset
24 $ hg rebase -s 1 -d 2 --tool false
143337bcec9b merge: add tests to show current behavior on failed filemerges
Ryan McElroy <rmcelroy@fb.com>
parents:
diff changeset
25 rebasing 1:1f28a51c3c9b "c"
143337bcec9b merge: add tests to show current behavior on failed filemerges
Ryan McElroy <rmcelroy@fb.com>
parents:
diff changeset
26 merging a
143337bcec9b merge: add tests to show current behavior on failed filemerges
Ryan McElroy <rmcelroy@fb.com>
parents:
diff changeset
27 merging b
143337bcec9b merge: add tests to show current behavior on failed filemerges
Ryan McElroy <rmcelroy@fb.com>
parents:
diff changeset
28 merging a failed!
143337bcec9b merge: add tests to show current behavior on failed filemerges
Ryan McElroy <rmcelroy@fb.com>
parents:
diff changeset
29 merging b failed!
143337bcec9b merge: add tests to show current behavior on failed filemerges
Ryan McElroy <rmcelroy@fb.com>
parents:
diff changeset
30 unresolved conflicts (see hg resolve, then hg rebase --continue)
143337bcec9b merge: add tests to show current behavior on failed filemerges
Ryan McElroy <rmcelroy@fb.com>
parents:
diff changeset
31 [1]
143337bcec9b merge: add tests to show current behavior on failed filemerges
Ryan McElroy <rmcelroy@fb.com>
parents:
diff changeset
32
143337bcec9b merge: add tests to show current behavior on failed filemerges
Ryan McElroy <rmcelroy@fb.com>
parents:
diff changeset
33 $ hg resolve --list
143337bcec9b merge: add tests to show current behavior on failed filemerges
Ryan McElroy <rmcelroy@fb.com>
parents:
diff changeset
34 U a
143337bcec9b merge: add tests to show current behavior on failed filemerges
Ryan McElroy <rmcelroy@fb.com>
parents:
diff changeset
35 U b
143337bcec9b merge: add tests to show current behavior on failed filemerges
Ryan McElroy <rmcelroy@fb.com>
parents:
diff changeset
36
143337bcec9b merge: add tests to show current behavior on failed filemerges
Ryan McElroy <rmcelroy@fb.com>
parents:
diff changeset
37 $ hg rebase --abort
143337bcec9b merge: add tests to show current behavior on failed filemerges
Ryan McElroy <rmcelroy@fb.com>
parents:
diff changeset
38 rebase aborted
143337bcec9b merge: add tests to show current behavior on failed filemerges
Ryan McElroy <rmcelroy@fb.com>
parents:
diff changeset
39
143337bcec9b merge: add tests to show current behavior on failed filemerges
Ryan McElroy <rmcelroy@fb.com>
parents:
diff changeset
40 Testing on-failure=halt
143337bcec9b merge: add tests to show current behavior on failed filemerges
Ryan McElroy <rmcelroy@fb.com>
parents:
diff changeset
41 $ echo on-failure=halt >> $HGRCPATH
143337bcec9b merge: add tests to show current behavior on failed filemerges
Ryan McElroy <rmcelroy@fb.com>
parents:
diff changeset
42 $ hg rebase -s 1 -d 2 --tool false
143337bcec9b merge: add tests to show current behavior on failed filemerges
Ryan McElroy <rmcelroy@fb.com>
parents:
diff changeset
43 rebasing 1:1f28a51c3c9b "c"
143337bcec9b merge: add tests to show current behavior on failed filemerges
Ryan McElroy <rmcelroy@fb.com>
parents:
diff changeset
44 merging a
143337bcec9b merge: add tests to show current behavior on failed filemerges
Ryan McElroy <rmcelroy@fb.com>
parents:
diff changeset
45 merging b
143337bcec9b merge: add tests to show current behavior on failed filemerges
Ryan McElroy <rmcelroy@fb.com>
parents:
diff changeset
46 merging a failed!
34797
284fa44f7f39 merge: allow user to halt merge on merge-tool failures
Ryan McElroy <rmcelroy@fb.com>
parents: 34679
diff changeset
47 merge halted after failed merge (see hg resolve)
34679
143337bcec9b merge: add tests to show current behavior on failed filemerges
Ryan McElroy <rmcelroy@fb.com>
parents:
diff changeset
48 [1]
143337bcec9b merge: add tests to show current behavior on failed filemerges
Ryan McElroy <rmcelroy@fb.com>
parents:
diff changeset
49
143337bcec9b merge: add tests to show current behavior on failed filemerges
Ryan McElroy <rmcelroy@fb.com>
parents:
diff changeset
50 $ hg resolve --list
143337bcec9b merge: add tests to show current behavior on failed filemerges
Ryan McElroy <rmcelroy@fb.com>
parents:
diff changeset
51 U a
143337bcec9b merge: add tests to show current behavior on failed filemerges
Ryan McElroy <rmcelroy@fb.com>
parents:
diff changeset
52 U b
143337bcec9b merge: add tests to show current behavior on failed filemerges
Ryan McElroy <rmcelroy@fb.com>
parents:
diff changeset
53
143337bcec9b merge: add tests to show current behavior on failed filemerges
Ryan McElroy <rmcelroy@fb.com>
parents:
diff changeset
54 $ hg rebase --abort
143337bcec9b merge: add tests to show current behavior on failed filemerges
Ryan McElroy <rmcelroy@fb.com>
parents:
diff changeset
55 rebase aborted
143337bcec9b merge: add tests to show current behavior on failed filemerges
Ryan McElroy <rmcelroy@fb.com>
parents:
diff changeset
56
143337bcec9b merge: add tests to show current behavior on failed filemerges
Ryan McElroy <rmcelroy@fb.com>
parents:
diff changeset
57 Testing on-failure=prompt
34884
05535d0dea68 merge: additional test cases to show merge-halting behavior
Ryan McElroy <rmcelroy@fb.com>
parents: 34797
diff changeset
58 $ cat <<EOS >> $HGRCPATH
05535d0dea68 merge: additional test cases to show merge-halting behavior
Ryan McElroy <rmcelroy@fb.com>
parents: 34797
diff changeset
59 > [merge]
05535d0dea68 merge: additional test cases to show merge-halting behavior
Ryan McElroy <rmcelroy@fb.com>
parents: 34797
diff changeset
60 > on-failure=prompt
05535d0dea68 merge: additional test cases to show merge-halting behavior
Ryan McElroy <rmcelroy@fb.com>
parents: 34797
diff changeset
61 > [ui]
05535d0dea68 merge: additional test cases to show merge-halting behavior
Ryan McElroy <rmcelroy@fb.com>
parents: 34797
diff changeset
62 > interactive=1
05535d0dea68 merge: additional test cases to show merge-halting behavior
Ryan McElroy <rmcelroy@fb.com>
parents: 34797
diff changeset
63 > EOS
05535d0dea68 merge: additional test cases to show merge-halting behavior
Ryan McElroy <rmcelroy@fb.com>
parents: 34797
diff changeset
64 $ cat <<EOS | hg rebase -s 1 -d 2 --tool false
34679
143337bcec9b merge: add tests to show current behavior on failed filemerges
Ryan McElroy <rmcelroy@fb.com>
parents:
diff changeset
65 > y
143337bcec9b merge: add tests to show current behavior on failed filemerges
Ryan McElroy <rmcelroy@fb.com>
parents:
diff changeset
66 > n
143337bcec9b merge: add tests to show current behavior on failed filemerges
Ryan McElroy <rmcelroy@fb.com>
parents:
diff changeset
67 > EOS
143337bcec9b merge: add tests to show current behavior on failed filemerges
Ryan McElroy <rmcelroy@fb.com>
parents:
diff changeset
68 rebasing 1:1f28a51c3c9b "c"
143337bcec9b merge: add tests to show current behavior on failed filemerges
Ryan McElroy <rmcelroy@fb.com>
parents:
diff changeset
69 merging a
143337bcec9b merge: add tests to show current behavior on failed filemerges
Ryan McElroy <rmcelroy@fb.com>
parents:
diff changeset
70 merging b
143337bcec9b merge: add tests to show current behavior on failed filemerges
Ryan McElroy <rmcelroy@fb.com>
parents:
diff changeset
71 merging a failed!
34797
284fa44f7f39 merge: allow user to halt merge on merge-tool failures
Ryan McElroy <rmcelroy@fb.com>
parents: 34679
diff changeset
72 continue merge operation (yn)? y
34679
143337bcec9b merge: add tests to show current behavior on failed filemerges
Ryan McElroy <rmcelroy@fb.com>
parents:
diff changeset
73 merging b failed!
34797
284fa44f7f39 merge: allow user to halt merge on merge-tool failures
Ryan McElroy <rmcelroy@fb.com>
parents: 34679
diff changeset
74 continue merge operation (yn)? n
284fa44f7f39 merge: allow user to halt merge on merge-tool failures
Ryan McElroy <rmcelroy@fb.com>
parents: 34679
diff changeset
75 merge halted after failed merge (see hg resolve)
34679
143337bcec9b merge: add tests to show current behavior on failed filemerges
Ryan McElroy <rmcelroy@fb.com>
parents:
diff changeset
76 [1]
143337bcec9b merge: add tests to show current behavior on failed filemerges
Ryan McElroy <rmcelroy@fb.com>
parents:
diff changeset
77
143337bcec9b merge: add tests to show current behavior on failed filemerges
Ryan McElroy <rmcelroy@fb.com>
parents:
diff changeset
78 $ hg resolve --list
143337bcec9b merge: add tests to show current behavior on failed filemerges
Ryan McElroy <rmcelroy@fb.com>
parents:
diff changeset
79 U a
143337bcec9b merge: add tests to show current behavior on failed filemerges
Ryan McElroy <rmcelroy@fb.com>
parents:
diff changeset
80 U b
143337bcec9b merge: add tests to show current behavior on failed filemerges
Ryan McElroy <rmcelroy@fb.com>
parents:
diff changeset
81
143337bcec9b merge: add tests to show current behavior on failed filemerges
Ryan McElroy <rmcelroy@fb.com>
parents:
diff changeset
82 $ hg rebase --abort
143337bcec9b merge: add tests to show current behavior on failed filemerges
Ryan McElroy <rmcelroy@fb.com>
parents:
diff changeset
83 rebase aborted
143337bcec9b merge: add tests to show current behavior on failed filemerges
Ryan McElroy <rmcelroy@fb.com>
parents:
diff changeset
84
34884
05535d0dea68 merge: additional test cases to show merge-halting behavior
Ryan McElroy <rmcelroy@fb.com>
parents: 34797
diff changeset
85 Check that successful tool with failed post-check halts the merge
05535d0dea68 merge: additional test cases to show merge-halting behavior
Ryan McElroy <rmcelroy@fb.com>
parents: 34797
diff changeset
86 $ cat <<EOS >> $HGRCPATH
05535d0dea68 merge: additional test cases to show merge-halting behavior
Ryan McElroy <rmcelroy@fb.com>
parents: 34797
diff changeset
87 > [merge-tools]
05535d0dea68 merge: additional test cases to show merge-halting behavior
Ryan McElroy <rmcelroy@fb.com>
parents: 34797
diff changeset
88 > true.check=changed
05535d0dea68 merge: additional test cases to show merge-halting behavior
Ryan McElroy <rmcelroy@fb.com>
parents: 34797
diff changeset
89 > EOS
05535d0dea68 merge: additional test cases to show merge-halting behavior
Ryan McElroy <rmcelroy@fb.com>
parents: 34797
diff changeset
90 $ cat <<EOS | hg rebase -s 1 -d 2 --tool true
05535d0dea68 merge: additional test cases to show merge-halting behavior
Ryan McElroy <rmcelroy@fb.com>
parents: 34797
diff changeset
91 > y
05535d0dea68 merge: additional test cases to show merge-halting behavior
Ryan McElroy <rmcelroy@fb.com>
parents: 34797
diff changeset
92 > n
05535d0dea68 merge: additional test cases to show merge-halting behavior
Ryan McElroy <rmcelroy@fb.com>
parents: 34797
diff changeset
93 > n
05535d0dea68 merge: additional test cases to show merge-halting behavior
Ryan McElroy <rmcelroy@fb.com>
parents: 34797
diff changeset
94 > EOS
05535d0dea68 merge: additional test cases to show merge-halting behavior
Ryan McElroy <rmcelroy@fb.com>
parents: 34797
diff changeset
95 rebasing 1:1f28a51c3c9b "c"
05535d0dea68 merge: additional test cases to show merge-halting behavior
Ryan McElroy <rmcelroy@fb.com>
parents: 34797
diff changeset
96 merging a
05535d0dea68 merge: additional test cases to show merge-halting behavior
Ryan McElroy <rmcelroy@fb.com>
parents: 34797
diff changeset
97 merging b
05535d0dea68 merge: additional test cases to show merge-halting behavior
Ryan McElroy <rmcelroy@fb.com>
parents: 34797
diff changeset
98 output file a appears unchanged
05535d0dea68 merge: additional test cases to show merge-halting behavior
Ryan McElroy <rmcelroy@fb.com>
parents: 34797
diff changeset
99 was merge successful (yn)? y
05535d0dea68 merge: additional test cases to show merge-halting behavior
Ryan McElroy <rmcelroy@fb.com>
parents: 34797
diff changeset
100 output file b appears unchanged
05535d0dea68 merge: additional test cases to show merge-halting behavior
Ryan McElroy <rmcelroy@fb.com>
parents: 34797
diff changeset
101 was merge successful (yn)? n
05535d0dea68 merge: additional test cases to show merge-halting behavior
Ryan McElroy <rmcelroy@fb.com>
parents: 34797
diff changeset
102 merging b failed!
05535d0dea68 merge: additional test cases to show merge-halting behavior
Ryan McElroy <rmcelroy@fb.com>
parents: 34797
diff changeset
103 continue merge operation (yn)? n
05535d0dea68 merge: additional test cases to show merge-halting behavior
Ryan McElroy <rmcelroy@fb.com>
parents: 34797
diff changeset
104 merge halted after failed merge (see hg resolve)
05535d0dea68 merge: additional test cases to show merge-halting behavior
Ryan McElroy <rmcelroy@fb.com>
parents: 34797
diff changeset
105 [1]
05535d0dea68 merge: additional test cases to show merge-halting behavior
Ryan McElroy <rmcelroy@fb.com>
parents: 34797
diff changeset
106
05535d0dea68 merge: additional test cases to show merge-halting behavior
Ryan McElroy <rmcelroy@fb.com>
parents: 34797
diff changeset
107 $ hg resolve --list
05535d0dea68 merge: additional test cases to show merge-halting behavior
Ryan McElroy <rmcelroy@fb.com>
parents: 34797
diff changeset
108 R a
05535d0dea68 merge: additional test cases to show merge-halting behavior
Ryan McElroy <rmcelroy@fb.com>
parents: 34797
diff changeset
109 U b
05535d0dea68 merge: additional test cases to show merge-halting behavior
Ryan McElroy <rmcelroy@fb.com>
parents: 34797
diff changeset
110
05535d0dea68 merge: additional test cases to show merge-halting behavior
Ryan McElroy <rmcelroy@fb.com>
parents: 34797
diff changeset
111 $ hg rebase --abort
05535d0dea68 merge: additional test cases to show merge-halting behavior
Ryan McElroy <rmcelroy@fb.com>
parents: 34797
diff changeset
112 rebase aborted
05535d0dea68 merge: additional test cases to show merge-halting behavior
Ryan McElroy <rmcelroy@fb.com>
parents: 34797
diff changeset
113
05535d0dea68 merge: additional test cases to show merge-halting behavior
Ryan McElroy <rmcelroy@fb.com>
parents: 34797
diff changeset
114 Check that conflicts with conflict check also halts the merge
05535d0dea68 merge: additional test cases to show merge-halting behavior
Ryan McElroy <rmcelroy@fb.com>
parents: 34797
diff changeset
115 $ cat <<EOS >> $HGRCPATH
05535d0dea68 merge: additional test cases to show merge-halting behavior
Ryan McElroy <rmcelroy@fb.com>
parents: 34797
diff changeset
116 > [merge-tools]
05535d0dea68 merge: additional test cases to show merge-halting behavior
Ryan McElroy <rmcelroy@fb.com>
parents: 34797
diff changeset
117 > true.check=conflicts
05535d0dea68 merge: additional test cases to show merge-halting behavior
Ryan McElroy <rmcelroy@fb.com>
parents: 34797
diff changeset
118 > true.premerge=keep
05535d0dea68 merge: additional test cases to show merge-halting behavior
Ryan McElroy <rmcelroy@fb.com>
parents: 34797
diff changeset
119 > [merge]
05535d0dea68 merge: additional test cases to show merge-halting behavior
Ryan McElroy <rmcelroy@fb.com>
parents: 34797
diff changeset
120 > on-failure=halt
05535d0dea68 merge: additional test cases to show merge-halting behavior
Ryan McElroy <rmcelroy@fb.com>
parents: 34797
diff changeset
121 > EOS
05535d0dea68 merge: additional test cases to show merge-halting behavior
Ryan McElroy <rmcelroy@fb.com>
parents: 34797
diff changeset
122 $ hg rebase -s 1 -d 2 --tool true
05535d0dea68 merge: additional test cases to show merge-halting behavior
Ryan McElroy <rmcelroy@fb.com>
parents: 34797
diff changeset
123 rebasing 1:1f28a51c3c9b "c"
05535d0dea68 merge: additional test cases to show merge-halting behavior
Ryan McElroy <rmcelroy@fb.com>
parents: 34797
diff changeset
124 merging a
05535d0dea68 merge: additional test cases to show merge-halting behavior
Ryan McElroy <rmcelroy@fb.com>
parents: 34797
diff changeset
125 merging b
05535d0dea68 merge: additional test cases to show merge-halting behavior
Ryan McElroy <rmcelroy@fb.com>
parents: 34797
diff changeset
126 merging a failed!
05535d0dea68 merge: additional test cases to show merge-halting behavior
Ryan McElroy <rmcelroy@fb.com>
parents: 34797
diff changeset
127 merge halted after failed merge (see hg resolve)
05535d0dea68 merge: additional test cases to show merge-halting behavior
Ryan McElroy <rmcelroy@fb.com>
parents: 34797
diff changeset
128 [1]
05535d0dea68 merge: additional test cases to show merge-halting behavior
Ryan McElroy <rmcelroy@fb.com>
parents: 34797
diff changeset
129
05535d0dea68 merge: additional test cases to show merge-halting behavior
Ryan McElroy <rmcelroy@fb.com>
parents: 34797
diff changeset
130 $ hg resolve --list
05535d0dea68 merge: additional test cases to show merge-halting behavior
Ryan McElroy <rmcelroy@fb.com>
parents: 34797
diff changeset
131 U a
05535d0dea68 merge: additional test cases to show merge-halting behavior
Ryan McElroy <rmcelroy@fb.com>
parents: 34797
diff changeset
132 U b
05535d0dea68 merge: additional test cases to show merge-halting behavior
Ryan McElroy <rmcelroy@fb.com>
parents: 34797
diff changeset
133
05535d0dea68 merge: additional test cases to show merge-halting behavior
Ryan McElroy <rmcelroy@fb.com>
parents: 34797
diff changeset
134 $ hg rebase --abort
05535d0dea68 merge: additional test cases to show merge-halting behavior
Ryan McElroy <rmcelroy@fb.com>
parents: 34797
diff changeset
135 rebase aborted
05535d0dea68 merge: additional test cases to show merge-halting behavior
Ryan McElroy <rmcelroy@fb.com>
parents: 34797
diff changeset
136
05535d0dea68 merge: additional test cases to show merge-halting behavior
Ryan McElroy <rmcelroy@fb.com>
parents: 34797
diff changeset
137 Check that always-prompt also can halt the merge
05535d0dea68 merge: additional test cases to show merge-halting behavior
Ryan McElroy <rmcelroy@fb.com>
parents: 34797
diff changeset
138 $ cat <<EOS | hg rebase -s 1 -d 2 --tool true --config merge-tools.true.check=prompt
05535d0dea68 merge: additional test cases to show merge-halting behavior
Ryan McElroy <rmcelroy@fb.com>
parents: 34797
diff changeset
139 > y
05535d0dea68 merge: additional test cases to show merge-halting behavior
Ryan McElroy <rmcelroy@fb.com>
parents: 34797
diff changeset
140 > n
05535d0dea68 merge: additional test cases to show merge-halting behavior
Ryan McElroy <rmcelroy@fb.com>
parents: 34797
diff changeset
141 > EOS
05535d0dea68 merge: additional test cases to show merge-halting behavior
Ryan McElroy <rmcelroy@fb.com>
parents: 34797
diff changeset
142 rebasing 1:1f28a51c3c9b "c"
05535d0dea68 merge: additional test cases to show merge-halting behavior
Ryan McElroy <rmcelroy@fb.com>
parents: 34797
diff changeset
143 merging a
05535d0dea68 merge: additional test cases to show merge-halting behavior
Ryan McElroy <rmcelroy@fb.com>
parents: 34797
diff changeset
144 merging b
05535d0dea68 merge: additional test cases to show merge-halting behavior
Ryan McElroy <rmcelroy@fb.com>
parents: 34797
diff changeset
145 was merge of 'a' successful (yn)? y
05535d0dea68 merge: additional test cases to show merge-halting behavior
Ryan McElroy <rmcelroy@fb.com>
parents: 34797
diff changeset
146 was merge of 'b' successful (yn)? n
05535d0dea68 merge: additional test cases to show merge-halting behavior
Ryan McElroy <rmcelroy@fb.com>
parents: 34797
diff changeset
147 merging b failed!
05535d0dea68 merge: additional test cases to show merge-halting behavior
Ryan McElroy <rmcelroy@fb.com>
parents: 34797
diff changeset
148 merge halted after failed merge (see hg resolve)
05535d0dea68 merge: additional test cases to show merge-halting behavior
Ryan McElroy <rmcelroy@fb.com>
parents: 34797
diff changeset
149 [1]
05535d0dea68 merge: additional test cases to show merge-halting behavior
Ryan McElroy <rmcelroy@fb.com>
parents: 34797
diff changeset
150
05535d0dea68 merge: additional test cases to show merge-halting behavior
Ryan McElroy <rmcelroy@fb.com>
parents: 34797
diff changeset
151 $ hg resolve --list
05535d0dea68 merge: additional test cases to show merge-halting behavior
Ryan McElroy <rmcelroy@fb.com>
parents: 34797
diff changeset
152 R a
05535d0dea68 merge: additional test cases to show merge-halting behavior
Ryan McElroy <rmcelroy@fb.com>
parents: 34797
diff changeset
153 U b
05535d0dea68 merge: additional test cases to show merge-halting behavior
Ryan McElroy <rmcelroy@fb.com>
parents: 34797
diff changeset
154
05535d0dea68 merge: additional test cases to show merge-halting behavior
Ryan McElroy <rmcelroy@fb.com>
parents: 34797
diff changeset
155 $ hg rebase --abort
05535d0dea68 merge: additional test cases to show merge-halting behavior
Ryan McElroy <rmcelroy@fb.com>
parents: 34797
diff changeset
156 rebase aborted
05535d0dea68 merge: additional test cases to show merge-halting behavior
Ryan McElroy <rmcelroy@fb.com>
parents: 34797
diff changeset
157
05535d0dea68 merge: additional test cases to show merge-halting behavior
Ryan McElroy <rmcelroy@fb.com>
parents: 34797
diff changeset
158 Check that successful tool otherwise allows the merge to continue
05535d0dea68 merge: additional test cases to show merge-halting behavior
Ryan McElroy <rmcelroy@fb.com>
parents: 34797
diff changeset
159 $ hg rebase -s 1 -d 2 --tool echo --keep --config merge-tools.echo.premerge=keep
05535d0dea68 merge: additional test cases to show merge-halting behavior
Ryan McElroy <rmcelroy@fb.com>
parents: 34797
diff changeset
160 rebasing 1:1f28a51c3c9b "c"
05535d0dea68 merge: additional test cases to show merge-halting behavior
Ryan McElroy <rmcelroy@fb.com>
parents: 34797
diff changeset
161 merging a
05535d0dea68 merge: additional test cases to show merge-halting behavior
Ryan McElroy <rmcelroy@fb.com>
parents: 34797
diff changeset
162 merging b
05535d0dea68 merge: additional test cases to show merge-halting behavior
Ryan McElroy <rmcelroy@fb.com>
parents: 34797
diff changeset
163 $TESTTMP/repo/a *a~base* *a~other* (glob)
05535d0dea68 merge: additional test cases to show merge-halting behavior
Ryan McElroy <rmcelroy@fb.com>
parents: 34797
diff changeset
164 $TESTTMP/repo/b *b~base* *b~other* (glob)