Importing to hg from perforce with large binary files

Mark Mason mason97123 at gmail.com
Thu Jan 27 09:09:36 CST 2011


Hello,

On Thu, 2011-01-27 at 09:55 -0500, Greg Ward wrote:
> *snort* while I appreciate your optimism, it is sadly misplaced.
> Extensions generally depend only on core hg, not on each other.  And
> it would very bad form for an extension included with hg to depend on
> (or even know about) a third-party extension.  And in the realm of big
> files, where there are 3 to 5 competing extensions on the market, it
> would be very very bad form for hg convert to single one out for
> special treatment.

Yes, well, I'm not usually so optimistic about things, but it was a good
day ;)

> 
> You are almost certainly going to have to write some custom code for
> your conversion to succeed.  Quite likely you will end up hacking the
> Perforce converter, unless it was carefully designed to allow you to
> hook into the conversion and override key parts.

Yes, I have the feeling this is certainly going to be the case. 

> 
> In my experience converting a moderately large CVS repo with a few
> hundred large binary files using cvs2hg and bfiles, I had to write
> some custom code in my cvs2hg "config" file to detect large files and
> make bfiles handle them.  I suspect you will have to do something
> similar.
> 
> BTW, I strongly recommend that you check out the various competing big
> file extensions.  bigfiles isn't perfect, nor is bfiles.  See also
> "snap" and "kbfiles".  Pick one *before* you invest a lot of effort in
> writing conversion code that knows about that particular extension's
> way of handling big files.

Yes. I've been looking at snap since my original post. From both using
it manually on test cases and looking at the code, it looks more closely
integrated with the internals of hg (in that, it automatically catches
large files that you operate on with the normal hg commands instead of
depending on new commands that you have to remember to use with the
files you want treated specially). It's not working automatically at the
moment, but it might be a better starting point.

We're also looking at your cvs2hg converter script for conversion of our
large CVS repo. Fortunately, while there are some large files in there,
none of them are binaries, so we can sidestep at least this problem. :)

Thanks,
Mark




More information about the Mercurial mailing list