tests/test-fetch
author Matt Mackall <mpm@selenic.com>
Thu, 11 Oct 2007 00:46:54 -0500
changeset 5451 0a43875677b1
parent 2990 61fcd9fac434
child 5798 86f5d8f608b7
permissions -rwxr-xr-x
revlog: break up compression of large deltas Python's zlib apparently makes an internal copy of strings passed to compress(). To avoid this, compress strings 1M at a time, then join them at the end if the result would be smaller than the original. For initial commits of large but compressible files, this cuts peak memory usage nearly in half.
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
2990
61fcd9fac434 Make tests append settings to $HGRCPATH instead of $HGTMP/.hgrc
Thomas Arendsen Hein <thomas@intevation.de>
parents: 2823
diff changeset
     3
echo "[extensions]" >> $HGRCPATH
61fcd9fac434 Make tests append settings to $HGRCPATH instead of $HGTMP/.hgrc
Thomas Arendsen Hein <thomas@intevation.de>
parents: 2823
diff changeset
     4
echo "fetch=" >> $HGRCPATH
2822
4f7abf341cd4 fetch: fix breakage from mpm.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
     5
4f7abf341cd4 fetch: fix breakage from mpm.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
     6
hg init a
4f7abf341cd4 fetch: fix breakage from mpm.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
     7
echo a > a/a
4f7abf341cd4 fetch: fix breakage from mpm.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
     8
hg --cwd a commit -d '1 0' -Ama
4f7abf341cd4 fetch: fix breakage from mpm.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
     9
4f7abf341cd4 fetch: fix breakage from mpm.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
    10
hg clone a b
4f7abf341cd4 fetch: fix breakage from mpm.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
    11
hg clone a c
4f7abf341cd4 fetch: fix breakage from mpm.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
    12
4f7abf341cd4 fetch: fix breakage from mpm.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
    13
echo b > a/b
4f7abf341cd4 fetch: fix breakage from mpm.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
    14
hg --cwd a commit -d '2 0' -Amb
4f7abf341cd4 fetch: fix breakage from mpm.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
    15
hg --cwd a parents -q
4f7abf341cd4 fetch: fix breakage from mpm.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
    16
4f7abf341cd4 fetch: fix breakage from mpm.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
    17
echo % should pull one change
4f7abf341cd4 fetch: fix breakage from mpm.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
    18
hg --cwd b fetch ../a
4f7abf341cd4 fetch: fix breakage from mpm.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
    19
hg --cwd b parents -q
4f7abf341cd4 fetch: fix breakage from mpm.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
    20
4f7abf341cd4 fetch: fix breakage from mpm.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
    21
echo c > c/c
4f7abf341cd4 fetch: fix breakage from mpm.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
    22
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
    23
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
    24
ls c