monotone-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Monotone-devel] slick pictures


From: Nathaniel Smith
Subject: Re: [Monotone-devel] slick pictures
Date: Thu, 18 May 2006 00:33:39 -0700
User-agent: Mutt/1.5.11

On Thu, May 18, 2006 at 12:27:16AM -0700, Nathaniel Smith wrote:
> I'm not sure exactly what "hg import" does; patch has a lot of
> complicated heuristics in it that it may or may not duplicate.

Ah-hah:

def patch(strip, patchname, ui):
    """apply the patch <patchname> to the working directory.
    a list of patched files is returned"""
    fp = os.popen('patch -p%d < "%s"' % (strip, patchname))
...

It's just shelling out to "patch", and then parsing the output.

One thing that does seem to be different between monotone and some
other systems is that they generate diffs that need -p1 by default,
instead of -p0... is there really a standard here that we should
emulate?

-- Nathaniel

-- 
Damn the Solar System.  Bad light; planets too distant; pestered with
comets; feeble contrivance; could make a better one myself.
  -- Lord Jeffrey




reply via email to

[Prev in Thread] Current Thread [Next in Thread]