Mercurial > hg > mercurial-crew-with-dirclash
annotate tests/test-merge5 @ 3580:41989e55fa37
allow update to switch to a different branch if the repo is clean
author | Benoit Boissinot <benoit.boissinot@ens-lyon.org> |
---|---|
date | Sun, 29 Oct 2006 13:08:10 +0100 |
parents | 39eb64b23cb5 |
children | fffc8a733bf9 |
rev | line source |
---|---|
800
ec85f9e6f3b1
Don't use 'set -x', fix exports, sed and hexdump usage for Solaris.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
749
diff
changeset
|
1 #!/bin/sh |
415
c2b9502a4e96
[PATCH] Don't prompt user for keep-vs-delete when the merge is about to be aborted
mpm@selenic.com
parents:
diff
changeset
|
2 |
c2b9502a4e96
[PATCH] Don't prompt user for keep-vs-delete when the merge is about to be aborted
mpm@selenic.com
parents:
diff
changeset
|
3 mkdir t |
c2b9502a4e96
[PATCH] Don't prompt user for keep-vs-delete when the merge is about to be aborted
mpm@selenic.com
parents:
diff
changeset
|
4 cd t |
c2b9502a4e96
[PATCH] Don't prompt user for keep-vs-delete when the merge is about to be aborted
mpm@selenic.com
parents:
diff
changeset
|
5 hg init |
c2b9502a4e96
[PATCH] Don't prompt user for keep-vs-delete when the merge is about to be aborted
mpm@selenic.com
parents:
diff
changeset
|
6 echo This is file a1 > a |
c2b9502a4e96
[PATCH] Don't prompt user for keep-vs-delete when the merge is about to be aborted
mpm@selenic.com
parents:
diff
changeset
|
7 echo This is file b1 > b |
c2b9502a4e96
[PATCH] Don't prompt user for keep-vs-delete when the merge is about to be aborted
mpm@selenic.com
parents:
diff
changeset
|
8 hg add a b |
1933
7544700fd931
Use 'hg ci -d "1000000 0"' in tests to circumvent problem with leading zero.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
814
diff
changeset
|
9 hg commit -m "commit #0" -d "1000000 0" |
415
c2b9502a4e96
[PATCH] Don't prompt user for keep-vs-delete when the merge is about to be aborted
mpm@selenic.com
parents:
diff
changeset
|
10 echo This is file b22 > b |
1933
7544700fd931
Use 'hg ci -d "1000000 0"' in tests to circumvent problem with leading zero.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
814
diff
changeset
|
11 hg commit -m"comment #1" -d "1000000 0" |
415
c2b9502a4e96
[PATCH] Don't prompt user for keep-vs-delete when the merge is about to be aborted
mpm@selenic.com
parents:
diff
changeset
|
12 hg update 0 |
c2b9502a4e96
[PATCH] Don't prompt user for keep-vs-delete when the merge is about to be aborted
mpm@selenic.com
parents:
diff
changeset
|
13 rm b |
1933
7544700fd931
Use 'hg ci -d "1000000 0"' in tests to circumvent problem with leading zero.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
814
diff
changeset
|
14 hg commit -A -m"comment #2" -d "1000000 0" |
3580
41989e55fa37
allow update to switch to a different branch if the repo is clean
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
1963
diff
changeset
|
15 |
41989e55fa37
allow update to switch to a different branch if the repo is clean
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
1963
diff
changeset
|
16 echo This is file a > a |
1963
39eb64b23cb5
Don't require the "yes" command for test-merge5.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
1933
diff
changeset
|
17 # in theory, we shouldn't need the "-y" below, but it prevents |
415
c2b9502a4e96
[PATCH] Don't prompt user for keep-vs-delete when the merge is about to be aborted
mpm@selenic.com
parents:
diff
changeset
|
18 # this test from hanging when "hg update" erroneously prompts the |
c2b9502a4e96
[PATCH] Don't prompt user for keep-vs-delete when the merge is about to be aborted
mpm@selenic.com
parents:
diff
changeset
|
19 # user for "keep or delete" |
3580
41989e55fa37
allow update to switch to a different branch if the repo is clean
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
1963
diff
changeset
|
20 hg update -y 1 # should fail (unclean repo) |
41989e55fa37
allow update to switch to a different branch if the repo is clean
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
1963
diff
changeset
|
21 hg revert a |
1963
39eb64b23cb5
Don't require the "yes" command for test-merge5.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
1933
diff
changeset
|
22 hg update -y 1 |
39eb64b23cb5
Don't require the "yes" command for test-merge5.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
1933
diff
changeset
|
23 |
415
c2b9502a4e96
[PATCH] Don't prompt user for keep-vs-delete when the merge is about to be aborted
mpm@selenic.com
parents:
diff
changeset
|
24 exit 0 |