annotate tests/test-push-warn @ 1985:c577689006fa

Adapted behaviour of ui.username() to documentation and mention it explicitly: Searched in this order: $HGUSER, [ui] section of hgrcs, $EMAIL and stop searching if one of these is set. Abort if found username is an empty string to force specifying the commit user elsewhere, e.g. with line option or repo hgrc. If not found, use $LOGNAME or $USERNAME +"@full.hostname".
author Thomas Arendsen Hein <thomas@intevation.de>
date Tue, 21 Mar 2006 15:33:29 +0100
parents 7544700fd931
children fc22ed56afe3
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
816
8674b7803714 Warn on pushing unsynced repo or adding new heads
mpm@selenic.com
parents:
diff changeset
1 #!/bin/sh
8674b7803714 Warn on pushing unsynced repo or adding new heads
mpm@selenic.com
parents:
diff changeset
2
8674b7803714 Warn on pushing unsynced repo or adding new heads
mpm@selenic.com
parents:
diff changeset
3 mkdir a
8674b7803714 Warn on pushing unsynced repo or adding new heads
mpm@selenic.com
parents:
diff changeset
4 cd a
8674b7803714 Warn on pushing unsynced repo or adding new heads
mpm@selenic.com
parents:
diff changeset
5 hg init
8674b7803714 Warn on pushing unsynced repo or adding new heads
mpm@selenic.com
parents:
diff changeset
6 echo foo > t1
8674b7803714 Warn on pushing unsynced repo or adding new heads
mpm@selenic.com
parents:
diff changeset
7 hg add t1
1933
7544700fd931 Use 'hg ci -d "1000000 0"' in tests to circumvent problem with leading zero.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 839
diff changeset
8 hg commit -m "1" -d "1000000 0"
816
8674b7803714 Warn on pushing unsynced repo or adding new heads
mpm@selenic.com
parents:
diff changeset
9
8674b7803714 Warn on pushing unsynced repo or adding new heads
mpm@selenic.com
parents:
diff changeset
10 cd ..
8674b7803714 Warn on pushing unsynced repo or adding new heads
mpm@selenic.com
parents:
diff changeset
11 hg clone a b
8674b7803714 Warn on pushing unsynced repo or adding new heads
mpm@selenic.com
parents:
diff changeset
12
8674b7803714 Warn on pushing unsynced repo or adding new heads
mpm@selenic.com
parents:
diff changeset
13 cd a
8674b7803714 Warn on pushing unsynced repo or adding new heads
mpm@selenic.com
parents:
diff changeset
14 echo foo > t2
8674b7803714 Warn on pushing unsynced repo or adding new heads
mpm@selenic.com
parents:
diff changeset
15 hg add t2
1933
7544700fd931 Use 'hg ci -d "1000000 0"' in tests to circumvent problem with leading zero.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 839
diff changeset
16 hg commit -m "2" -d "1000000 0"
816
8674b7803714 Warn on pushing unsynced repo or adding new heads
mpm@selenic.com
parents:
diff changeset
17
8674b7803714 Warn on pushing unsynced repo or adding new heads
mpm@selenic.com
parents:
diff changeset
18 cd ../b
8674b7803714 Warn on pushing unsynced repo or adding new heads
mpm@selenic.com
parents:
diff changeset
19 echo foo > t3
8674b7803714 Warn on pushing unsynced repo or adding new heads
mpm@selenic.com
parents:
diff changeset
20 hg add t3
1933
7544700fd931 Use 'hg ci -d "1000000 0"' in tests to circumvent problem with leading zero.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 839
diff changeset
21 hg commit -m "3" -d "1000000 0"
816
8674b7803714 Warn on pushing unsynced repo or adding new heads
mpm@selenic.com
parents:
diff changeset
22
8674b7803714 Warn on pushing unsynced repo or adding new heads
mpm@selenic.com
parents:
diff changeset
23 hg push ../a
8674b7803714 Warn on pushing unsynced repo or adding new heads
mpm@selenic.com
parents:
diff changeset
24 hg pull ../a
8674b7803714 Warn on pushing unsynced repo or adding new heads
mpm@selenic.com
parents:
diff changeset
25 hg push ../a
8674b7803714 Warn on pushing unsynced repo or adding new heads
mpm@selenic.com
parents:
diff changeset
26 hg up -m
1933
7544700fd931 Use 'hg ci -d "1000000 0"' in tests to circumvent problem with leading zero.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 839
diff changeset
27 hg commit -m "4" -d "1000000 0"
816
8674b7803714 Warn on pushing unsynced repo or adding new heads
mpm@selenic.com
parents:
diff changeset
28 hg push ../a