monotone-devel
[Top][All Lists]
Advanced

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

Re: [Monotone-devel] slick pictures


From: Ethan Blanton
Subject: Re: [Monotone-devel] slick pictures
Date: Thu, 18 May 2006 10:42:56 -0400
User-agent: Mutt/1.5.9i

Nathaniel Smith spake unto us the following wisdom:
> 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?

CVS is -p0, and this is what I would think most people expect.

Ethan

-- 
The laws that forbid the carrying of arms are laws [that have no remedy
for evils].  They disarm only those who are neither inclined nor
determined to commit crimes.
                -- Cesare Beccaria, "On Crimes and Punishments", 1764

Attachment: signature.asc
Description: Digital signature


reply via email to

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