[PATCH] Modified patch.applydiff() to work with repo filters such as win32text

Colin Caughie c.caughie at indigovision.com
Sat May 23 01:55:34 CDT 2009


> -----Original Message-----
> From: Dirkjan Ochtman [mailto:djc.ochtman at gmail.com] On Behalf Of
> Dirkjan Ochtman
> Sent: 22 May 2009 20:39
> To: Colin Caughie
> Cc: mercurial-devel at selenic.com
> Subject: Re: [PATCH] Modified patch.applydiff() to work with repo
> filters such as win32text
>
> On 22/05/2009 21:28, Colin Caughie wrote:
> > This is my first patch, so if there's anything wrong with the way
> I submitted or explained it, please let me know.
>
> Nothing wrong with the way you submitted it, but I'm not sure this
> is
> the right approach. It seems to make more sense to maybe hang
> something
> like this off of mercurial.context.workingctx or something. The
> localrepo object should really be more concerned with the repository
> part than with the working dir parts.

Thanks for this feedback. Do you mean to do it something like merge.update()? This is passed a repo, but gets the workingctx from it and uses that to get info about the wd like its parents (which I wouldn't need) and manifest (which it seems like I would need to get the execute flag if I had to go through localrepo.wwrite()).

It seems though that like merge.update(), patch.patchfile would still need to use localrepo.wwrite() to actually write the patched file, since workingctx doesn't have any methods for writing files.

I'll try something like this and submit it later so we can see what it looks like.

Cheers,
Colin


Latest News at: http://www.indigovision.com/news2009.php



More information about the Mercurial-devel mailing list