mercurial --> plain text --> mercurial
Matt Mackall
mpm at selenic.com
Thu Mar 27 14:39:15 CDT 2008
On Thu, 2008-03-27 at 18:31 +0000, didier deshommes wrote:
> Matt Mackall <mpm <at> selenic.com> writes:
>
> >
> > Alright, here's a pair of scripts that will do end-to-end:
> > +# Dump revlogs as raw data stream
> > +# $ find .hg/store/ -name "*.i" | xargs dumprevlog > repo.dump
...
> > +# Undump a dump from dumprevlog
> > +# $ hg init
> > +# $ undumprevlog < repo.dump
> The undump script is doing something, but after it's done, I'm still left with
> an empty directory. Here's what I did:
> $ ls #original hg repo
> build dumprevlog MANIFEST.in sage spkg-debian-maybe
> bundle dumprevlog~ mercurial-howto.txt sage-push spkg-delauto
> c_lib export pull setupnb.py spkg-dist
> debian install README.txt setup.py spkg-install
>
> $ mv repo.dum ~/hg-test
> $ hg init # new hg repo
> $ undumprevlog < repo.dump
> [...]
> $ ls # where are all the files?
Well you didn't expect it to do a checkout too, did you?
> $ ls .hg/data/
> boring.i commit.i MANIFEST.in.i README.i setup.py.i
> build config.i mercurial-howto.txt.i README.txt.i
> spkg-debian-maybe.i
> bundle.i debian new.i sage spkg-delauto.i
> changes.i doc notes.txt.i sage-push.i spkg-dist.i
> c_lib export.i PKG-INFO.i setupnb.py.i spkg-install.i
> cmfcore.tailor.i install.i pull.i setup.py.d test_changed.i
>
> $ hg tip
> changeset: -1:000000000000
> tag: tip
> user:
> date: Thu Jan 01 00:00:00 1970 +0000
Did you dump the .i files in .hg? Or just the ones in .hg/data?
BTW, modern hg uses a slightly different layout by default which
addresses some issues like filesystem case-folding. Which is why the
comments mention .hg/store/. Any time you do a clone over the wire or
with --pull, you'll get this new layout.
--
Mathematics is the supreme nostalgia of our time.
More information about the Mercurial
mailing list