Frage

I have noticed by mercurial repository expanding in size when ever I use repo B to pull changes from repo A.

It seems that TortoiseHG creates files like hg-bundle-r3e6uf.hg10un under .hg directory. These files are usually 1-2MB in size each, so nothing too big, but together they create a lot, and can be an annoyance when doing backups.

This does not seem to happen if I pull changes instantly without reviewing them, or if I use repo A to push changes to B.

These bundle files seem useless as they are not copied when cloning the repository B. Also the cloned repo is almost half smaller without them, so it is like data in these files wasn't moved to other files either.

Is it possible to:

  • A) Avoid creating these bundles on pull. (Pushing is option only when I have access to both repos)
  • B) Use some command to cleanup .hg directory. (Cloning is not very elegant)

EDIT:

When I select 'Incoming' first bundle is created:

% hg --repository C:\temp\hg\testB incoming --quiet --bundle c:\docume~1\username\locals~1\temp\thg.hlngus\CtemphgtestA_iavzew.hg C:\temp\hg\testA

1:d806c8cb0355
2:e0e3b20d5cb2
3:4e803a7ecefc
[command completed successfully Fri Aug 02 09:59:12 2013]

and then 'Accept', the second bundle is created:

% hg --repository C:\temp\hg\testB pull --verbose c:\docume~1\username\locals~1\temp\thg.hlngus\CtemphgtestA_iavzew.hg

pulling from c:\docume~1\username\locals~1\temp\thg.hlngus\CtemphgtestA_iavzew.hg
searching for changes
all local heads known remotely
3 changesets found
adding changesets
adding manifests
adding file changes
added 3 changesets with 3 changes to 1 files
(run 'hg update' to get a working copy)
[command completed successfully Fri Aug 02 10:00:10 2013]

Where as using 'Pull' directly, no extra bundles are created:

% hg --repository C:\temp\hg\testB pull --verbose C:\temp\hg\testA

pulling from C:\temp\hg\testA
searching for changes
all local heads known remotely
3 changesets found
adding changesets
adding manifests
adding file changes
added 3 changesets with 3 changes to 1 files
(run 'hg update' to get a working copy)
[command completed successfully Fri Aug 02 10:01:52 2013]
War es hilfreich?

Lösung

It seems this is TortoiseHg specific issue. Solution is either use push or use pull directly from command line to avoid extra bundles. Only (safe) way to cleanup seems to be the repository cloning.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top