Mercurial > hg
annotate tests/test-commit-unresolved @ 8063:ee8d9b93b316
convert/p4: win32 fixes
* cmd.exe does not know single quotes
* win32 does not like trailing whitespace very much. Trade test coverage for
maintenance time and drop the trailing whitespaces tests.
author | Patrick Mezard <pmezard@gmail.com> |
---|---|
date | Mon, 13 Apr 2009 16:15:45 +0200 |
parents | 93609576244e |
children | 8766fee6f225 |
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 | 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 | 11 |
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 |