RFC: A mercurial pack extension
John Mulligan
phlogistonjohn at asynchrono.us
Tue Feb 19 20:26:36 CST 2008
On Tuesday 19 February 2008 2:37:11 pm Jesse Glick wrote:
> Peter Arrenbrecht wrote:
> > It took me a while to hunt down `--base null` too, at the time.
>
> Yeah, no kidding. An option '--full' (or '--all'?) as an alias for
> '--base null' would be appreciated.
I just pushed a new version to my public repo, it adds the --full option as an
shortcut to `--base null`. It also extends clone to support bundles without
any extra switches if the remote repo url is not supported by std. clone. An
additional --bundle switch forces it to try the url bundle regardless of
autodetection.
>
> > In clone/unpack, couldn't you assume that a reference to a file always
> > means a bundle so we can do away with the bundle: prefix?
>
> Agreed, this would mean I could
>
> hg bundle --full /tmp/myrepo.hg
> # later...
> hg clone /tmp/myrepo.hg myrepo
>
> which is easier to understand than the current
>
> hg bundle --base null /tmp/myrepo.hg
> # later...
> hg init myrepo
> hg -R myrepo unbundle /tmp/myrepo.hg
>
> > at least when the file extension is .hg
>
> Or the file has the right magic header.
>
Bundles start with the characters 'HG' as the header, which the extension will
check after downloading it. If the file is not a bundle, it will yell at
you :-)
everything's @ http://hg.asynchrono.us/mercurial-pack
Please run it through the paces and let me know if any bugs crop up.
Thanks...
More information about the Mercurial
mailing list