annotate tests/test-conflict-1.t @ 882:8b51d737f949

git_handler: move cStringIO to a global import There are a couple of places that use StringIO for the added features it has over cStringIO, so we can't replace all its uses wholesale.
author Siddharth Agarwal <sid0@fb.com>
date Mon, 13 Apr 2015 08:03:57 -0700
parents 5e2f63e1064c
children 93d58b79d816
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
575
a7da97e69d56 tests: extract extension configuration into a testutil library
David M. Carr <david@carrclan.us>
parents: 566
diff changeset
1 Load commonly used test logic
a7da97e69d56 tests: extract extension configuration into a testutil library
David M. Carr <david@carrclan.us>
parents: 566
diff changeset
2 $ . "$TESTDIR/testutil"
a7da97e69d56 tests: extract extension configuration into a testutil library
David M. Carr <david@carrclan.us>
parents: 566
diff changeset
3
495
0f8fa80158e8 tests: unify test-conflict-1
David M. Carr <david@carrclan.us>
parents: 442
diff changeset
4 $ hg init hgrepo1
0f8fa80158e8 tests: unify test-conflict-1
David M. Carr <david@carrclan.us>
parents: 442
diff changeset
5 $ cd hgrepo1
0f8fa80158e8 tests: unify test-conflict-1
David M. Carr <david@carrclan.us>
parents: 442
diff changeset
6 $ echo A > afile
0f8fa80158e8 tests: unify test-conflict-1
David M. Carr <david@carrclan.us>
parents: 442
diff changeset
7 $ hg add afile
0f8fa80158e8 tests: unify test-conflict-1
David M. Carr <david@carrclan.us>
parents: 442
diff changeset
8 $ hg ci -m "origin"
0f8fa80158e8 tests: unify test-conflict-1
David M. Carr <david@carrclan.us>
parents: 442
diff changeset
9
0f8fa80158e8 tests: unify test-conflict-1
David M. Carr <david@carrclan.us>
parents: 442
diff changeset
10 $ echo B > afile
0f8fa80158e8 tests: unify test-conflict-1
David M. Carr <david@carrclan.us>
parents: 442
diff changeset
11 $ hg ci -m "A->B"
405
070f1cfdb80f New tests for round-trip fidelity of merge conflicts resolved using one parent.
Christian Walther <cwalther@gmx.ch>
parents:
diff changeset
12
495
0f8fa80158e8 tests: unify test-conflict-1
David M. Carr <david@carrclan.us>
parents: 442
diff changeset
13 $ hg up -r0
0f8fa80158e8 tests: unify test-conflict-1
David M. Carr <david@carrclan.us>
parents: 442
diff changeset
14 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
0f8fa80158e8 tests: unify test-conflict-1
David M. Carr <david@carrclan.us>
parents: 442
diff changeset
15 $ echo C > afile
0f8fa80158e8 tests: unify test-conflict-1
David M. Carr <david@carrclan.us>
parents: 442
diff changeset
16 $ hg ci -m "A->C"
0f8fa80158e8 tests: unify test-conflict-1
David M. Carr <david@carrclan.us>
parents: 442
diff changeset
17 created new head
405
070f1cfdb80f New tests for round-trip fidelity of merge conflicts resolved using one parent.
Christian Walther <cwalther@gmx.ch>
parents:
diff changeset
18
495
0f8fa80158e8 tests: unify test-conflict-1
David M. Carr <david@carrclan.us>
parents: 442
diff changeset
19 $ hg merge -r1 2>&1 | sed 's/-C ./-C/' | egrep -v '^merging afile$' | sed 's/incomplete.*/failed!/'
0f8fa80158e8 tests: unify test-conflict-1
David M. Carr <david@carrclan.us>
parents: 442
diff changeset
20 warning: conflicts during merge.
0f8fa80158e8 tests: unify test-conflict-1
David M. Carr <david@carrclan.us>
parents: 442
diff changeset
21 merging afile failed!
0f8fa80158e8 tests: unify test-conflict-1
David M. Carr <david@carrclan.us>
parents: 442
diff changeset
22 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
0f8fa80158e8 tests: unify test-conflict-1
David M. Carr <david@carrclan.us>
parents: 442
diff changeset
23 use 'hg resolve' to retry unresolved file merges or 'hg update -C' to abandon
0f8fa80158e8 tests: unify test-conflict-1
David M. Carr <david@carrclan.us>
parents: 442
diff changeset
24 resolve using first parent
0f8fa80158e8 tests: unify test-conflict-1
David M. Carr <david@carrclan.us>
parents: 442
diff changeset
25 $ echo C > afile
754
5e2f63e1064c tests: adapt for hg 3.1 output changes
Augie Fackler <raf@durin42.com>
parents: 724
diff changeset
26 $ hg resolve -m afile | egrep -v 'no more unresolved files' || true
495
0f8fa80158e8 tests: unify test-conflict-1
David M. Carr <david@carrclan.us>
parents: 442
diff changeset
27 $ hg ci -m "merge to C"
405
070f1cfdb80f New tests for round-trip fidelity of merge conflicts resolved using one parent.
Christian Walther <cwalther@gmx.ch>
parents:
diff changeset
28
495
0f8fa80158e8 tests: unify test-conflict-1
David M. Carr <david@carrclan.us>
parents: 442
diff changeset
29 $ hg log --graph --style compact | sed 's/\[.*\]//g'
0f8fa80158e8 tests: unify test-conflict-1
David M. Carr <david@carrclan.us>
parents: 442
diff changeset
30 @ 3:2,1 6c53bc0f062f 1970-01-01 00:00 +0000 test
0f8fa80158e8 tests: unify test-conflict-1
David M. Carr <david@carrclan.us>
parents: 442
diff changeset
31 |\ merge to C
0f8fa80158e8 tests: unify test-conflict-1
David M. Carr <david@carrclan.us>
parents: 442
diff changeset
32 | |
0f8fa80158e8 tests: unify test-conflict-1
David M. Carr <david@carrclan.us>
parents: 442
diff changeset
33 | o 2:0 ea82b67264a1 1970-01-01 00:00 +0000 test
0f8fa80158e8 tests: unify test-conflict-1
David M. Carr <david@carrclan.us>
parents: 442
diff changeset
34 | | A->C
0f8fa80158e8 tests: unify test-conflict-1
David M. Carr <david@carrclan.us>
parents: 442
diff changeset
35 | |
0f8fa80158e8 tests: unify test-conflict-1
David M. Carr <david@carrclan.us>
parents: 442
diff changeset
36 o | 1 7205e83b5a3f 1970-01-01 00:00 +0000 test
0f8fa80158e8 tests: unify test-conflict-1
David M. Carr <david@carrclan.us>
parents: 442
diff changeset
37 |/ A->B
0f8fa80158e8 tests: unify test-conflict-1
David M. Carr <david@carrclan.us>
parents: 442
diff changeset
38 |
0f8fa80158e8 tests: unify test-conflict-1
David M. Carr <david@carrclan.us>
parents: 442
diff changeset
39 o 0 5d1a6b64f9d0 1970-01-01 00:00 +0000 test
0f8fa80158e8 tests: unify test-conflict-1
David M. Carr <david@carrclan.us>
parents: 442
diff changeset
40 origin
0f8fa80158e8 tests: unify test-conflict-1
David M. Carr <david@carrclan.us>
parents: 442
diff changeset
41
405
070f1cfdb80f New tests for round-trip fidelity of merge conflicts resolved using one parent.
Christian Walther <cwalther@gmx.ch>
parents:
diff changeset
42
495
0f8fa80158e8 tests: unify test-conflict-1
David M. Carr <david@carrclan.us>
parents: 442
diff changeset
43 $ cd ..
405
070f1cfdb80f New tests for round-trip fidelity of merge conflicts resolved using one parent.
Christian Walther <cwalther@gmx.ch>
parents:
diff changeset
44
578
935c4fb1bbfc tests: let git init create directories when applicable
David M. Carr <david@carrclan.us>
parents: 575
diff changeset
45 $ git init --bare gitrepo
528
e48a3f30b73c tests: remove piping of command git init to remove leading path
David M. Carr <david@carrclan.us>
parents: 527
diff changeset
46 Initialized empty Git repository in $TESTTMP/gitrepo/
405
070f1cfdb80f New tests for round-trip fidelity of merge conflicts resolved using one parent.
Christian Walther <cwalther@gmx.ch>
parents:
diff changeset
47
495
0f8fa80158e8 tests: unify test-conflict-1
David M. Carr <david@carrclan.us>
parents: 442
diff changeset
48 $ cd hgrepo1
0f8fa80158e8 tests: unify test-conflict-1
David M. Carr <david@carrclan.us>
parents: 442
diff changeset
49 $ hg bookmark -r tip master
529
7edcbdd2ef2f tests: eliminate use of git-daemon
David M. Carr <david@carrclan.us>
parents: 528
diff changeset
50 $ hg push -r master ../gitrepo
7edcbdd2ef2f tests: eliminate use of git-daemon
David M. Carr <david@carrclan.us>
parents: 528
diff changeset
51 pushing to ../gitrepo
550
4bc39fd24db3 push: change "no changes" default output to match normal mercurial
David M. Carr <david@carrclan.us>
parents: 529
diff changeset
52 searching for changes
592
163c452531cf push: add more output about what was added (issue #64)
David M. Carr <david@carrclan.us>
parents: 581
diff changeset
53 adding objects
163c452531cf push: add more output about what was added (issue #64)
David M. Carr <david@carrclan.us>
parents: 581
diff changeset
54 added 4 commits with 3 trees and 3 blobs
495
0f8fa80158e8 tests: unify test-conflict-1
David M. Carr <david@carrclan.us>
parents: 442
diff changeset
55 $ cd ..
405
070f1cfdb80f New tests for round-trip fidelity of merge conflicts resolved using one parent.
Christian Walther <cwalther@gmx.ch>
parents:
diff changeset
56
529
7edcbdd2ef2f tests: eliminate use of git-daemon
David M. Carr <david@carrclan.us>
parents: 528
diff changeset
57 $ hg clone gitrepo hgrepo2 | grep -v '^updating'
495
0f8fa80158e8 tests: unify test-conflict-1
David M. Carr <david@carrclan.us>
parents: 442
diff changeset
58 importing git objects into hg
0f8fa80158e8 tests: unify test-conflict-1
David M. Carr <david@carrclan.us>
parents: 442
diff changeset
59 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
581
52461f71a782 tests: convert echos to comments
David M. Carr <david@carrclan.us>
parents: 580
diff changeset
60 expect the same revision ids as above
580
6cc99298b69e tests: avoid changing the current directory
David M. Carr <david@carrclan.us>
parents: 579
diff changeset
61 $ hg -R hgrepo2 log --graph --style compact | sed 's/\[.*\]//g'
495
0f8fa80158e8 tests: unify test-conflict-1
David M. Carr <david@carrclan.us>
parents: 442
diff changeset
62 @ 3:1,2 6c53bc0f062f 1970-01-01 00:00 +0000 test
0f8fa80158e8 tests: unify test-conflict-1
David M. Carr <david@carrclan.us>
parents: 442
diff changeset
63 |\ merge to C
0f8fa80158e8 tests: unify test-conflict-1
David M. Carr <david@carrclan.us>
parents: 442
diff changeset
64 | |
0f8fa80158e8 tests: unify test-conflict-1
David M. Carr <david@carrclan.us>
parents: 442
diff changeset
65 | o 2:0 7205e83b5a3f 1970-01-01 00:00 +0000 test
0f8fa80158e8 tests: unify test-conflict-1
David M. Carr <david@carrclan.us>
parents: 442
diff changeset
66 | | A->B
0f8fa80158e8 tests: unify test-conflict-1
David M. Carr <david@carrclan.us>
parents: 442
diff changeset
67 | |
0f8fa80158e8 tests: unify test-conflict-1
David M. Carr <david@carrclan.us>
parents: 442
diff changeset
68 o | 1 ea82b67264a1 1970-01-01 00:00 +0000 test
0f8fa80158e8 tests: unify test-conflict-1
David M. Carr <david@carrclan.us>
parents: 442
diff changeset
69 |/ A->C
0f8fa80158e8 tests: unify test-conflict-1
David M. Carr <david@carrclan.us>
parents: 442
diff changeset
70 |
0f8fa80158e8 tests: unify test-conflict-1
David M. Carr <david@carrclan.us>
parents: 442
diff changeset
71 o 0 5d1a6b64f9d0 1970-01-01 00:00 +0000 test
0f8fa80158e8 tests: unify test-conflict-1
David M. Carr <david@carrclan.us>
parents: 442
diff changeset
72 origin
0f8fa80158e8 tests: unify test-conflict-1
David M. Carr <david@carrclan.us>
parents: 442
diff changeset
73