1
votes

We are using TortoiseHg as our Mercurial client UI. Today we ran into an issue while trying to push from one particular workstation. It was receiving the following error:

abort: No space left on device [command returned code 255 ..........]

This error occurs while TortoiseHg/Mercurial is bundling files in preparation to pushing to the repository. I did some testing and noticed that the workstations (C:) drive was gradually being filled up as the file were being bundled. The (C:) drive went from ~900MB to ~100MB and then the error message was received. So this is obviously the cause.

My question is this:

  1. Does anyone know which default directory is used to store the temp files created while TortoiseHg/Mercurial bundles files in prep for a push? This seems to be independent of the drive TortoiseHg is installed to. I re-installed to a data drive with plenty of space and still used (C:) to store whatever temp files it was using.

  2. Is there a way to configure TortoiseHg/Mercurial to use a temp directory of your choice?

Thanks in advance for any help!

2
The best solution is to clear up some other stuff. Like %TEMP%, old system temporary stuff that's not needed, etc. CCleaner can help there. You will often be able to save several gigabytes that way. - Chris Morgan
@ Chris Morgan: Clearing up additional space on the drive is the overall solution. However, we are using TortoiseHg / Mercurial as client solution and have little control over their environment. Since the local repo was on their data drive (E:) with 300 GB free I was surprised to see the (C:) being used. My main concern is finding out specifics (if possible) to questions 1 & 2 as if we decide to use TortoiseHg / Mercurial on more widespread basis as a client/services solution we will have to provide some level of support...and having this type of knowledge will help us in that aspect. - OtoNoOto

2 Answers

2
votes

Mercurial is python and python has good platform specific defaults for temporary file locations. They're pretty easily overridden if you want something other than the defaults, which on Windows are probably c:\temp.

http://docs.python.org/library/tempfile.html#tempfile.tempdir says it's:

  1. The directory named by the TMPDIR environment variable.
  2. The directory named by the TEMP environment variable.
  3. The directory named by the TMP environment variable.
  4. A platform-specific location:
    • On RiscOS, the directory named by the Wimp$ScrapDir environment variable.
    • On Windows, the directories C:\TEMP, C:\TMP, \TEMP, and \TMP, in that order.
    • On all other platforms, the directories /tmp, /var/tmp, and /usr/tmp, in that order.
  5. As a last resort, the current working directory.

So if you've got software using Mercurial on a client computer set the environment variable to some place you know has space.

-2
votes

Mercurial always stores internal files inside the ".hg" folder in the local repository folder. Maybe TortoiseHg has a additional temp folder... don't know. Anyway you should try to push the files using the Mercurital command line client:

hg push

More information about the command line client you can find here Mercurial: The Definitive Guide

Another temporary solution might be the move these files via a file system simlink to another drive with more space left.