[darcs-users] A dumb question

Lele Gaifax lele at nautilus.homeip.net
Sat Nov 11 08:45:33 UTC 2006


David Roundy wrote:
> Or one of the ways of calling annotate
> (which also allow to extract an older version of a file)?

Perhaps the simpler way to obtain the content of an old version of a 
file is (ab)using the diff command in darcs, like in:

  $ darcs diff --diff-command 'cat %2' --match "..." somefile.ext

The trick here is that you can specify an external "diff" program that 
is executed by darcs to compute the comparison between the two versions 
of a file: by specifying "cat %2" you simply obtain the content of the 
second one (although it comes out with a newline appended to its end).

hth,
ciao, lele.




More information about the darcs-users mailing list