RFC: A mercurial pack extension

Alexis S. L. Carvalho alexis at cecm.usp.br
Wed Feb 20 13:03:16 CST 2008


Answering some points raised in this thread:

- the name "pack" is a very bad choice - git and bzr are already using
  it for something very different, and this will confuse users moving
  from one system to the other

- a patch to add "hg bundle --full" would be welcome

- I think --base null worked even before 0.9.5, but the help text was
  changed only after that release

- if you give hg the path to a file when it expects a repo, it already
  assumes it's a bundle file (without checking extension, first few
  bytes, etc).  It assumes the "base repository" for that bundle is
  whatever was specified with -R (or the current dir)

- it would be nice to make "hg clone bundle-file new-repo" work.  You
  may notice that "hg pull /local/path/to/bundle/file" already works
  (but in an inefficient way that could be a problem with full bundles
  of large repos)

- the idea of pulling directly from a set of bundles (+ index file) as
  a faster alternative to static-http has come up before (google for
  "extension to publish bundles" - it will give you an old, old link)

I'm not sure what would be the best way to make the last two work.

Maybe add some code to localrepo.pull to see if the other repo has some
"I know a better way to add revisions" method and call it.

But for clone it might be easier to add some mode to hg.clone that just
reads the revisions from a file object and adds them to the new repo
(how to add a UI for that is another good question).

Or maybe try to use an empty temporary repo as the base repo and just
use the same code that pulls use (bundlerepository.py).

Alexis



More information about the Mercurial mailing list