[darcs-users] Frustrations diffing against the last change to a file

Karel Gardas kgardas at objectsecurity.com
Thu Mar 31 07:16:15 UTC 2005

On Wed, 30 Mar 2005, Michael G Schwern wrote:

> I was trying to look at the diff between the current version and the last
> change to a file.  Trivial stuff.  I failed and gave up.
> To sum up...
> * "darcs diff some/file" should only report on changes to affect some/file,
>   not the entire repository.  This was the source of 90% of my frustration.
>   --last 1, for example, showing me the last change to the repository instead
>   of the last change to some/file.

Could you be so kind and enter appropriate ticket in darcs bug database?

> * The lack of simple revision numbers really complicates what would be a
>   very simple task in most other version control systems.

Is adding complicated revision numbers to the darcs just for helping with
diffing worth the effort? I personally consider --to-* and --from-*
options enough, perhaps there should be --to-date and --from-date added,
but this probably depends on next item.

> * "fancy dates" such as "last month" and "last year" should work if
>   not-so-fancy dates like "last week" work.

IIRC there is a ticket in darcs bug db asking for writting more advanced
fancy date parser.

> Ok, I want to diff against the last revision.  Here's this --last option.
> Perfect!
> 0 /usr/local/src/darcs-unstable$ darcs diff --last 1 tests/add.pl
> Wed Mar 23 23:36:20 PST 2005  schwern at pobox.com
>   * Uncommon file not actually being created
>   On OS X at least (perhaps elsewhere) `date >> \\` produces
>   sh: -c: line 2: syntax error: unexpected end of file
>   Replaced with Shell::Command's touch() so that the file named \ is actually
>   created.
> This was most surprising.  Why is diff giving me a change log entry and no
> diff?

It is diffing against the last revision (not last revision in which
appropriate file was changed) in which probably your file has not been
changed, so it just show change log for this revision. In this case it
would be good if darcs shows nothing when there is no diff for the output.

Karel Gardas                  kgardas at objectsecurity.com
ObjectSecurity Ltd.           http://www.objectsecurity.com

More information about the darcs-users mailing list