Mercurial > hg
annotate tests/test-commit-unresolved @ 9761:647f8c857810
i18n-pt_BR: translate 'changeset' like 'revision'
On Mercurial, 'changeset' and 'revision' may be used
interchangeably, but the first is more or less
untranslatable to a single word.
author | Wagner Bruna <wbruna@softwareexpress.com.br> |
---|---|
date | Tue, 20 Oct 2009 15:26:22 -0200 |
parents | 8766fee6f225 |
children |
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 |
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 | 11 |
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 |