allow to specify bundle type
Peter Meerwald
pmeerw at cosy.sbg.ac.at
Tue Apr 22 21:23:37 UTC 2008
>> the attached patch adds an option 'type' to Mercurial's bundle command; it
>> allows to specify the bundle type (i.e. compression to use)
>
> This looks more than reasonable to me (in fact, we discussed this in IRC a
> few months ago), but it would be nice if you could add some tests. Are you in
> a position to look at the test suite (in the tests directory) and add a few
> tests to make sure this doesn't start failing without us noticing at some
> point?
attached a test script and output
regards, p.
--
Peter Meerwald
Kaigasse 3 / 8
A-5020 Salzburg / AUSTRIA
+43-664-2444418 (mobile)
-------------- next part --------------
updating working directory
0 files updated, 0 files merged, 0 files removed, 0 files unresolved
summary: bla
searching for changes
1 changesets found
pulling from ../b1
requesting all changes
adding changesets
adding manifests
adding file changes
added 1 changesets with 1 changes to 1 files
(run 'hg update' to get a working copy)
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
summary: bla
HG10BZ
abort: repository default-push not found!
abort: repository ../bHG10BZ not found!
0 files updated, 0 files merged, 0 files removed, 0 files unresolved
HG10GZ
abort: repository default-push not found!
abort: repository ../bHG10GZ not found!
0 files updated, 0 files merged, 0 files removed, 0 files unresolved
HG10UN
abort: repository default-push not found!
abort: repository ../bHG10UN not found!
0 files updated, 0 files merged, 0 files removed, 0 files unresolved
abort: ../bgarbage: not a Mercurial bundle file
1 changesets found
abort: unknown bundle type specified with --type
-------------- next part --------------
#!/bin/sh
# bundle w/o type option
mkdir t1
cd t1
hg init
cd ..
hg clone t1 t2
cd t1
echo blablablablabla > file.txt
hg add file.txt
hg commit -m "bla"
hg log | grep summary
hg bundle ../b1 ../t2
cd ../t2
hg pull ../b1
hg up
hg log | grep summary
cd ..
# now test all known bundle types
for t in "HG10BZ" "HG10GZ" "HG10UN"; do
echo $t
hg init t$t
cd t1
hg bundle -t $i ../b$t ../t$t
cd ../t$t
hg pull ../b$t
hg up
hg log | grep summary
cd ..
done
# test garbage file
echo garbage > bgarbage
hg init tgarbage
cd tgarbage
hg pull ../bgarbage
cd ..
# test invalid bundle type
cd t1
hg bundle -a -t garbage ../bgarbage
cd ..
More information about the Mercurial-devel
mailing list