annotate tests/test-commit-unresolved @ 7612:069b29656401

web: use the correct filectx in filelog
author Benoit Boissinot <benoit.boissinot@ens-lyon.org>
date Fri, 09 Jan 2009 17:34:06 +0100
parents 93609576244e
children 8766fee6f225
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
7c36a4fb05a3 make commit fail when committing unresolved files
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
9 hg commit -d "${2} 0" -u test -m $1
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 () {
6888
7c36a4fb05a3 make commit fail when committing unresolved files
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
13 hg commit -d "${2} 0" -u test -m $1
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