Select an alternate temp directory on remote on push

Mathieu Clabaut mathieu.clabaut at gmail.com
Mon Jun 2 10:06:55 CDT 2008


On Mon, Jun 2, 2008 at 11:10 AM, Mathieu Clabaut <mathieu.clabaut at gmail.com>
wrote:

> Hello,
>
>   My problem is the following. When pushing I've got an error because of
> quota exceeded on remote:/tmp.
>   So my question is : How can I force mercurial to use another path than
> /tmp on remote host when unbundling the data received ?
>
>   Thank you very much for any direction.



With some help on IRC I manage the following.

On remote global hgrc:
[hooks]
pre-serve.tmpdir = python:hgenviron.settmpdir


In $PYTHONPATH, I put the following henviron.py file :

import os

#see http://docs.python.org/lib/module-tempfile.html
def settmpdir(ui, repo, hooktype, node=None, source=None, **kwargs):
        os.environ["TMPDIR"] = "/home/tmp"


It works well....

As a side note, hgrc manpage does'nt look up to date, as mercurial failed if
I only expect the first 3 arguments for settmpdir hook.

-mathieu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://selenic.com/pipermail/mercurial/attachments/20080602/ed0059be/attachment.htm 


More information about the Mercurial mailing list