tests/test-bundle
author Chris Mason <mason@suse.com>
Thu, 27 Jul 2006 09:27:35 -0700
changeset 2696 be273f6074de
parent 2673 109a22f5434a
child 2737 400a4a502001
permissions -rwxr-xr-x
mq: patch naming shortcuts This adds some more options to the mq lookup routine. It allows you to use shortcuts in naming patches to push or pop. You can now use: 1) a full patch name 2) a number to indicate an offset in the series file 3) a unique substring of the patch name 4) patchname[-+]num to indicate an offset from a given patch. For case #3 substrings are allowed. qtip and qbase are aliases for the top and bottom of the applied patch queue, unless they are already in the series file as patch names.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2274
89b15372df18 tests for bundles and bundlerepo
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
     1
#!/bin/sh
89b15372df18 tests for bundles and bundlerepo
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
     2
89b15372df18 tests for bundles and bundlerepo
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
     3
hg init test
89b15372df18 tests for bundles and bundlerepo
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
     4
cd test
89b15372df18 tests for bundles and bundlerepo
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
     5
echo 0 > afile
89b15372df18 tests for bundles and bundlerepo
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
     6
hg add afile
89b15372df18 tests for bundles and bundlerepo
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
     7
hg commit -m "0.0" -d "1000000 0"
89b15372df18 tests for bundles and bundlerepo
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
     8
echo 1 >> afile
89b15372df18 tests for bundles and bundlerepo
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
     9
hg commit -m "0.1" -d "1000000 0"
89b15372df18 tests for bundles and bundlerepo
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
    10
echo 2 >> afile
89b15372df18 tests for bundles and bundlerepo
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
    11
hg commit -m "0.2" -d "1000000 0"
89b15372df18 tests for bundles and bundlerepo
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
    12
echo 3 >> afile
89b15372df18 tests for bundles and bundlerepo
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
    13
hg commit -m "0.3" -d "1000000 0"
89b15372df18 tests for bundles and bundlerepo
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
    14
hg update -C 0
89b15372df18 tests for bundles and bundlerepo
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
    15
echo 1 >> afile
89b15372df18 tests for bundles and bundlerepo
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
    16
hg commit -m "1.1" -d "1000000 0"
89b15372df18 tests for bundles and bundlerepo
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
    17
echo 2 >> afile
89b15372df18 tests for bundles and bundlerepo
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
    18
hg commit -m "1.2" -d "1000000 0"
89b15372df18 tests for bundles and bundlerepo
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
    19
echo "a line" > fred
89b15372df18 tests for bundles and bundlerepo
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
    20
echo 3 >> afile
89b15372df18 tests for bundles and bundlerepo
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
    21
hg add fred
89b15372df18 tests for bundles and bundlerepo
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
    22
hg commit -m "1.3" -d "1000000 0"
89b15372df18 tests for bundles and bundlerepo
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
    23
hg mv afile adifferentfile
89b15372df18 tests for bundles and bundlerepo
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
    24
hg commit -m "1.3m" -d "1000000 0"
89b15372df18 tests for bundles and bundlerepo
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
    25
hg update -C 3
89b15372df18 tests for bundles and bundlerepo
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
    26
hg mv afile anotherfile
89b15372df18 tests for bundles and bundlerepo
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
    27
hg commit -m "0.3m" -d "1000000 0"
89b15372df18 tests for bundles and bundlerepo
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
    28
hg verify
89b15372df18 tests for bundles and bundlerepo
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
    29
cd ..
89b15372df18 tests for bundles and bundlerepo
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
    30
hg init empty
89b15372df18 tests for bundles and bundlerepo
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
    31
hg -R test bundle full.hg empty
89b15372df18 tests for bundles and bundlerepo
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
    32
hg -R test unbundle full.hg
89b15372df18 tests for bundles and bundlerepo
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
    33
hg -R empty unbundle full.hg
89b15372df18 tests for bundles and bundlerepo
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
    34
hg -R empty heads
89b15372df18 tests for bundles and bundlerepo
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
    35
hg -R empty verify
89b15372df18 tests for bundles and bundlerepo
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
    36
89b15372df18 tests for bundles and bundlerepo
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
    37
rm -rf empty
89b15372df18 tests for bundles and bundlerepo
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
    38
hg init empty
89b15372df18 tests for bundles and bundlerepo
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
    39
cd empty
89b15372df18 tests for bundles and bundlerepo
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
    40
hg -R bundle://../full.hg log
2673
109a22f5434a hooks: add url to changegroup, incoming, prechangegroup, pretxnchangegroup hooks
Vadim Gelfer <vadim.gelfer@gmail.com>
parents: 2274
diff changeset
    41
echo '[hooks]' >> .hg/hgrc
109a22f5434a hooks: add url to changegroup, incoming, prechangegroup, pretxnchangegroup hooks
Vadim Gelfer <vadim.gelfer@gmail.com>
parents: 2274
diff changeset
    42
echo 'changegroup = echo changegroup: u=$HG_URL' >> .hg/hgrc
2274
89b15372df18 tests for bundles and bundlerepo
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
    43
#doesn't work (yet ?)
89b15372df18 tests for bundles and bundlerepo
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
    44
#hg -R bundle://../full.hg verify
89b15372df18 tests for bundles and bundlerepo
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
    45
hg pull bundle://../full.hg
89b15372df18 tests for bundles and bundlerepo
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
    46
cd ..
89b15372df18 tests for bundles and bundlerepo
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
    47
89b15372df18 tests for bundles and bundlerepo
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
    48
rm -rf empty
89b15372df18 tests for bundles and bundlerepo
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
    49
hg init empty
89b15372df18 tests for bundles and bundlerepo
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
    50
hg clone -r 3 test partial
89b15372df18 tests for bundles and bundlerepo
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
    51
hg clone partial partial2
89b15372df18 tests for bundles and bundlerepo
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
    52
cd partial
89b15372df18 tests for bundles and bundlerepo
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
    53
hg -R bundle://../full.hg log
89b15372df18 tests for bundles and bundlerepo
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
    54
hg incoming bundle://../full.hg
89b15372df18 tests for bundles and bundlerepo
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
    55
hg -R bundle://../full.hg outgoing ../partial2
89b15372df18 tests for bundles and bundlerepo
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
    56
cd ..