difference between export and bundle

Bryan O'Sullivan bos at serpentine.com
Mon Jun 26 16:59:33 CDT 2006


On Mon, 2006-06-26 at 16:19 -0500, McClain Looney wrote:

> As a new user of mercurial (though a long-time user of cvs &  svn), I'm
> unclear as to when to use export, and when to use bundle.

> From what I can tell, bundle will include binary deltas, and is made in
> comparison to an accessible archive, whereas export will only export text
> deltas, and can be generated as the delta from 2 local revs.

That's right.

The "bundle" command guarantees that whoever unbundles it either gets
exactly the same changeset IDs and contents as you have, or else
failure.

The "export" command guarantees that the diff will apply cleanly, but
nothing more.  It could do a better job than it is doing at the moment,
and I think that such improvements would be a good thing.  For example,
there's a bug open to use git-compatible annotations to record changes
in the executable bit, along with rename and copy information.
Presumably the right thing to do if those bits of metadata faileed to
apply would be to ignore them.

> If I'm correct about the function of these commands, which would be
> appropriate to move changes between 2 local and one remote repo, where
> local repo A doesn't have push access to remote repo R (but R is
> http-exported), and local repo B (think work/home) does have ssh push
> available.
> 
> What I'm currently doing is running a bundle from A, mailing it to B, who
> then unbundles and ssh-push's to R.

Right.

> I'd really like to be able to make a bundle from local revisions, to
> obviate the need for R being http-available.

Yes, this would be very useful.  See
http://www.selenic.com/mercurial/bts/issue76

	<b



More information about the Mercurial mailing list