[PATCH 0 of 2] mq: import a unified or context diff that does not start with "diff -"

Jozef Hatala jh-mercurial at skrt.org
Sun Feb 28 08:39:15 UTC 2010


On Tue, Feb 16, 2010 at 09:16:16AM -0500, Steve Losh wrote:
> 
> One note: this patch modifies the old mq.patchheader, not my
> refactored version.  If my version goes in this would need
> to be updated.  It will probably be even cleaner to read in
> the end though.

Indeed.  Trivial to add now after the refactoring.

The first patch in the series is simply your (Steve's) patch
transplanted onto a revision that exists in the public repo of
mercurial, the tip of the default branch.

With your patch applied, context format diffs already work as long
as they start with a "diff -" line.

Unified or context format diffs are not required to start with a
"diff -" line though, so the second patch adds checks for the markers
"*** " and "--- ".


On Mon, Feb 15, 2010 at 08:19:09PM +0100, Patrick Mezard wrote:
> 
> That is sad to deal with context diffs in 2010 :-)
> 

Agreed.  (We are managing patches against an upstream project that
prefers context diffs, that's why.)

jh




More information about the Mercurial-devel mailing list