how to recover a complete repo from a bundle?

Simon King simon at simonking.org.uk
Thu Aug 8 22:04:50 UTC 2013


On 8 Aug 2013, at 22:09, Giovanni Gherdovich <g.gherdovich at gmail.com> wrote:

> Hi all,
> 
> here a little mercurial puzzle I could not solve yet: 
> 
> you have a repo bundle, which is not a "complete repo"
> since a few csets miss their parents, 
> and your goal is to "restore the original repo" ---> get all missing parents in the bundle. 
> 
> The point is that I don't know how to ask the bundle "What are your heads?".
> If I knew how to do that, I could sort it out via pulling from a related repo and
> then doing some `hg clone -r <rev> <repo>` and `hg pull` dance.
> 
> Consider this picture: http://i.imgur.com/jugbiKl.jpg .
> You have a bundle (the pink csets) and a related repo.
> You pull the bundle from the related repo. 
> 
> You see a new head appearing in the repo (F),
> so you might think that `hg clone -r F <repo>` would do the trick,
> but you're missing D, that was one head of the bundle.
> 
> how to recover a complete repo from a bundle?
> 
> Cheers,
> GGhh

Unless I've misunderstood the question, can't you just pull from the bundle into the related repo?

 hg -R <related-repo> pull <bundle>

If that isn't what you meant, perhaps the "bundle()" revset function will help you. Something along the lines of:

  hg -R <bundle> log -r "heads(bundle())"

Do either of those help?

Simon




More information about the Mercurial mailing list