[PATCH 1 of 2] run-tests: make --tmpdir option more useful

Matt Mackall mpm at selenic.com
Thu Jul 23 10:25:17 CDT 2009


On Thu, 2009-07-23 at 14:18 +0200, Martin Geisler wrote:
> Martin Geisler <mg at lazybytes.net> writes:
> 
> > Augie Fackler <durin42 at gmail.com> writes:
> >
> >> On Jul 12, 2009, at 4:52 PM, Greg Ward wrote:
> >>
> >>> On Sun, Jul 12, 2009 at 12:10 PM, Augie Fackler<durin42 at gmail.com>
> >>> wrote:
> >>>>
> >>>> On Jul 11, 2009, at 5:54 PM, Greg Ward wrote:
> >>>>> # HG changeset patch
> >>>>> # User Greg Ward <greg at gerg.ca>
> >>>>> # Date 1247350616 14400
> >>>>> # Node ID ad3cd96f3eab09436624b230cb9f0830a70e155b
> >>>>> # Parent  54eb3782d32fcc9de072b5e7c9efb6b2bad211c3
> >>>>> run-tests: make --tmpdir option more useful.
> >>>>>
> >>>>> - instead of creating HGTMP inside tmpdir, now HGTMP is tmpdir
> >>>>>  (thus, fail if tmpdir already exists)
> >>>>> - passing --tmpdir automatically turns on --keep-tmpdir
> >>>>
> >>>> I'm going to chime in with a -1 on that - I frequently assign the
> >>>> tmpdir to be on a RAM disk for speed, and still want the test
> >>>> results to be blown away. In fact, I've never used --keep-tmpdir.
> >
> > Would it not be easier for you to set TMP=/mnt/ramdisk instead of
> > --tmpdir=/mn/ramdisk? Using the former should have the same effect as
> > the latter, except that it will delete the tmpdir after Greg's patch.
> 
> Do you still think this patch is bad? After Greg's patch things should
> work like this (I didn't actually test it, I just read the code):
> 
> * no options: create temporary files in /tmp or as specified by TMP.
>   Delete them automatically.
> 
> * --tmpdir DIR: create temporary files in DIR. Do not delete them
>   automatically.

Seems to me we should just have a --keep flag.

-- 
http://selenic.com : development and support for Mercurial and Linux




More information about the Mercurial-devel mailing list