hg-git converted repo is massive
Kastner Masilko, Friedrich
kastner-masilko at at.festo.com
Mon Jan 28 10:10:24 UTC 2013
Hy there,
> From: mercurial-bounces at selenic.com [mailto:mercurial-bounces at selenic.com] On Behalf Of Harvey Chapman
>
> I wanted to keep a local copy of a kernel repo in our mercurial server.
> So I cloned the 660M git repo and got a 5GB mercurial repo (not
> including the internal copy of the git repo). Is there anything I can
> do about this? Is there any way to start history in the cloned repo at
> a much more recent commit?
Check your .hg/store folder and you'll see that the majority of that fat is the manifest revlog. I've experienced this myself and came to the conclusion, that git is simply more efficient in storing directory layout than Mercurial, because it:
a) uses a more aggressive compression mechanism, and
b) stores the directory layout of the whole repo in small tree-object nodes instead of one big file.
With some tweaks to the revlog class, you can get a kernel-repo clone down to 2GB, but it would cost you in terms of speed. I've submitted an appropriate patch to the crew, but Matt rejected it with a very plausible explanation in this devel-list thread: http://selenic.com/pipermail/mercurial-devel/2012-July/042600.html .
That said, I never met this extreme difference in other repositories besides the Linux kernel. Yet this is no surprise to me, given that git was especially written to handle that use-case.
On a side note: annotate on such a packed git repo is slow as hell, whereas the converted Mercurial repo (with my patch) is about 10 times faster. Other operations are reasonably fast, of course, so I guess it all boils down to what you are willing to trade for the storage space...
Regards,
Fritz
Development Software Systems
Festo Gesellschaft m.b.H.
Linzer Strasse 227
Austria - 1140 Wien
Firmenbuch Wien
FN 38435y
UID: ATU14650108
Tel: +43(1)91075-198
Fax: +43(1)91075-282
www.festo.at
Der Inhalt dieses E-Mails ist ausschliesslich fuer den bezeichneten Adressaten bestimmt. Jede Form der Kenntnisnahme,
Veroeffentlichung, Vervielfaeltigung oder Weitergabe des Inhalts dieses E-Mails durch unberechtigte Dritte ist unzulaessig. Wir
bitten Sie, sich mit dem Absender des E-Mails in Verbindung zu setzen, falls Sie nicht der Adressat dieses E-Mails sind und das
Material von Ihrem Computer zu loeschen.
This e-mail and any attachments are confidential and intended solely for the addressee. The perusal, publication, copying or
dissemination of the contents of this e-mail by unauthorised third parties is prohibited. If you are not the intended recipient of this
e-mail, please delete it and immediately notify the sender.
More information about the Mercurial
mailing list