tests/test-fetch
author Vadim Gelfer <vadim.gelfer@gmail.com>
Tue, 15 Aug 2006 11:43:31 -0700
changeset 2918 68cea0b8f992
parent 2823 e0caea53c997
child 2990 61fcd9fac434
permissions -rwxr-xr-x
merge.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2822
4f7abf341cd4 fetch: fix breakage from mpm.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
     1
#!/bin/sh
4f7abf341cd4 fetch: fix breakage from mpm.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
     2
4f7abf341cd4 fetch: fix breakage from mpm.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
     3
HGRCPATH=$HGTMP/.hgrc; export HGRCPATH
4f7abf341cd4 fetch: fix breakage from mpm.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
     4
echo "[extensions]" >> $HGTMP/.hgrc
4f7abf341cd4 fetch: fix breakage from mpm.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
     5
echo "fetch=" >> $HGTMP/.hgrc
4f7abf341cd4 fetch: fix breakage from mpm.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
     6
4f7abf341cd4 fetch: fix breakage from mpm.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
     7
hg init a
4f7abf341cd4 fetch: fix breakage from mpm.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
     8
echo a > a/a
4f7abf341cd4 fetch: fix breakage from mpm.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
     9
hg --cwd a commit -d '1 0' -Ama
4f7abf341cd4 fetch: fix breakage from mpm.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
    10
4f7abf341cd4 fetch: fix breakage from mpm.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
    11
hg clone a b
4f7abf341cd4 fetch: fix breakage from mpm.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
    12
hg clone a c
4f7abf341cd4 fetch: fix breakage from mpm.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
    13
4f7abf341cd4 fetch: fix breakage from mpm.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
    14
echo b > a/b
4f7abf341cd4 fetch: fix breakage from mpm.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
    15
hg --cwd a commit -d '2 0' -Amb
4f7abf341cd4 fetch: fix breakage from mpm.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
    16
hg --cwd a parents -q
4f7abf341cd4 fetch: fix breakage from mpm.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
    17
4f7abf341cd4 fetch: fix breakage from mpm.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
    18
echo % should pull one change
4f7abf341cd4 fetch: fix breakage from mpm.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
    19
hg --cwd b fetch ../a
4f7abf341cd4 fetch: fix breakage from mpm.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
    20
hg --cwd b parents -q
4f7abf341cd4 fetch: fix breakage from mpm.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
    21
4f7abf341cd4 fetch: fix breakage from mpm.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
    22
echo c > c/c
4f7abf341cd4 fetch: fix breakage from mpm.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
    23
hg --cwd c commit -d '3 0' -Amc
2823
e0caea53c997 test-fetch: make output stable
Vadim Gelfer <vadim.gelfer@gmail.com>
parents: 2822
diff changeset
    24
hg --cwd c fetch -d '4 0' -m 'automated merge' ../a
2822
4f7abf341cd4 fetch: fix breakage from mpm.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
    25
ls c