[darcs-users] finding the patch where a line was removed

Nathan Gray kolibrie at graystudios.org
Thu Nov 29 22:14:02 UTC 2007


On Thu, Nov 29, 2007 at 06:29:00AM -0800, Daniel Burrows wrote:
> On Wed, Nov 28, 2007 at 10:39:41AM -0500, Nathan Gray <kolibrie at graystudios.org> was heard to say:
> > In order to find the patch where a line is added, one can easily
> > 
> >   darcs annotate FILENAME
> > 
> > and find the name of the patch tied to the line in question.
> > 
> > To find the patch where a line is removed, 'darcs annotate' is not
> > quite as helpful, because the line is no longer printed out.
> 
>   [snip]
> 
> > Anyone know of an easier way?
> > 
> > How should this functionality best be implemented?
> 
>   So, I've never done this, but I think you can get darcs to do
> something like it with:
> 
> darcs trackdown "grep 'regexp' path/to/file"
> 
>   According to the manual, that should tell you the most recent
> repository version in which the grep succeeds.

I'd never used trackdown before, either.  It might work, especially if
you only need to go back several patches.  However, it unfortunately did
not work in my situation.  It ran into a patch that it did not like
and errored with:

  darcs failed:  Bad patch:
  ./path/to/some/file.pl: openBinaryFile: does not exist (No such file or directory)

In the particular scenario, the file I am interested in only has four
changes, and so looking at the manually I see that I need to pull out
two of them.

This particular repository is an import from CVS and contains 18K
darcs patches, and the patches I need to unpull are several hundred or
thousands back.

My goal on this project is to create darcs tags at the appropriate
places marking our production versions, which I have only as tarballs
of source code.

Is it possible to create a tag by listing the patches that should be
included, while leaving out other patches in the repository?  Though I
still have to figure out which patches I need and which I do not.

-kolibrie



More information about the darcs-users mailing list