[darcs-users] Request: porting patches advice (can I get rid of/ignore dependencies?)

Kevin Smith yarcs at qualitycode.com
Sat May 8 16:46:26 UTC 2004


David Roundy wrote:
> On Fri, May 07, 2004 at 08:30:25AM -0700, Kevin Smith wrote:
>>That is, if I have patches A, B, and C which result in a repo with 
>>current contents of X; and I have patches D and E that result in a repo 
>>with current contents of Y; and X == Y (as measured by a recursive 
>>diff); then why can't I apply patch F to both repos?
> 
> Because darcs has no way of knowing that X == Y.
> 
> Also, a recursive diff is insufficient for proving (from darcs'
> perspective) that the two repositories really are identical, since there
> could be identical files whose names have been switched... so this really
> is a case of "inexact patching", which is not what darcs does.
> Fortunately, it *is* what patch does, so you can use patch for this kind of
> application.

Hm. To someone who still doesn't fully understand patch theory, that 
seems strange and limiting.

Individual patches do not carry around a list of dependencies. When I 
try to apply patch F to the two repos above, how would darcs even know 
that it was or was not created by one of those repos?

Above is the meat of my message. Below is idle speculation.

As a workaround, it seems like in the future darcs could support 
receiving a patch, applying it to the working directory, and then 
creating a new patch from it that would be recorded.

In this case, it would be the same patch contents as the received patch, 
but with a different name/date/author. Of course, that's what I was 
asking for earlier when I wanted to be able to review a patch before 
putting it in my repo, but now it's for a completely different reason.

Kevin




More information about the darcs-users mailing list