annotate tests/test-commit-unresolved @ 9962:a7178eccf2dc

convert: better error on invalid repository type
author Patrick Mezard <pmezard@gmail.com>
date Mon, 30 Nov 2009 22:23:04 +0100
parents 8766fee6f225
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
6888
7c36a4fb05a3 make commit fail when committing unresolved files
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
1 #!/bin/sh
7c36a4fb05a3 make commit fail when committing unresolved files
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
2
7c36a4fb05a3 make commit fail when committing unresolved files
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
3 echo "[extensions]" >> $HGRCPATH
7c36a4fb05a3 make commit fail when committing unresolved files
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
4 echo "graphlog=" >> $HGRCPATH
7c36a4fb05a3 make commit fail when committing unresolved files
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
5
6910
93609576244e Debashify rebase tests
Brendan Cully <brendan@kublai.com>
parents: 6888
diff changeset
6 addcommit () {
6888
7c36a4fb05a3 make commit fail when committing unresolved files
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
7 echo $1 > $1
7c36a4fb05a3 make commit fail when committing unresolved files
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
8 hg add $1
8168
8766fee6f225 tests: removed redundant "-u test" from test scripts
Martin Geisler <mg@lazybytes.net>
parents: 6910
diff changeset
9 hg commit -d "${2} 0" -m $1
6888
7c36a4fb05a3 make commit fail when committing unresolved files
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
10 }
6910
93609576244e Debashify rebase tests
Brendan Cully <brendan@kublai.com>
parents: 6888
diff changeset
11
93609576244e Debashify rebase tests
Brendan Cully <brendan@kublai.com>
parents: 6888
diff changeset
12 commit () {
8168
8766fee6f225 tests: removed redundant "-u test" from test scripts
Martin Geisler <mg@lazybytes.net>
parents: 6910
diff changeset
13 hg commit -d "${2} 0" -m $1
6888
7c36a4fb05a3 make commit fail when committing unresolved files
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
14 }
7c36a4fb05a3 make commit fail when committing unresolved files
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
15
7c36a4fb05a3 make commit fail when committing unresolved files
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
16 hg init a
7c36a4fb05a3 make commit fail when committing unresolved files
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
17 cd a
7c36a4fb05a3 make commit fail when committing unresolved files
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
18 addcommit "A" 0
7c36a4fb05a3 make commit fail when committing unresolved files
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
19 addcommit "B" 1
7c36a4fb05a3 make commit fail when committing unresolved files
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
20 echo "C" >> A
7c36a4fb05a3 make commit fail when committing unresolved files
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
21 commit "C" 2
7c36a4fb05a3 make commit fail when committing unresolved files
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
22
7c36a4fb05a3 make commit fail when committing unresolved files
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
23 hg update -C 0
7c36a4fb05a3 make commit fail when committing unresolved files
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
24 echo "D" >> A
7c36a4fb05a3 make commit fail when committing unresolved files
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
25 commit "D" 3
7c36a4fb05a3 make commit fail when committing unresolved files
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
26
7c36a4fb05a3 make commit fail when committing unresolved files
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
27 echo
7c36a4fb05a3 make commit fail when committing unresolved files
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
28 echo "% Merging a conflict araises"
7c36a4fb05a3 make commit fail when committing unresolved files
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
29 hg merge
7c36a4fb05a3 make commit fail when committing unresolved files
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
30
7c36a4fb05a3 make commit fail when committing unresolved files
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
31 echo
7c36a4fb05a3 make commit fail when committing unresolved files
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
32 echo "% Correct the conflict without marking the file as resolved"
7c36a4fb05a3 make commit fail when committing unresolved files
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
33 echo "ABCD" > A
7c36a4fb05a3 make commit fail when committing unresolved files
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
34 hg commit -m "Merged"
7c36a4fb05a3 make commit fail when committing unresolved files
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
35
7c36a4fb05a3 make commit fail when committing unresolved files
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
36 echo
7c36a4fb05a3 make commit fail when committing unresolved files
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
37 echo "% Mark the conflict as resolved and commit"
7c36a4fb05a3 make commit fail when committing unresolved files
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
38 hg resolve -m A
7c36a4fb05a3 make commit fail when committing unresolved files
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
39 hg commit -m "Merged"
7c36a4fb05a3 make commit fail when committing unresolved files
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
40
7c36a4fb05a3 make commit fail when committing unresolved files
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
41 exit 0