[darcs-users] darcs patch: Test for issue1224

Trent W. Buck trentbuck at gmail.com
Sat Sep 12 15:03:21 UTC 2009

Looks good from visual inspection.  I'll apply this as-is, thanks!
Nitpicks follow.

Thorkil Naur <naur at post11.tele.dk> writes:

> Fri Sep 11 19:08:50 CEST 2009  Thorkil Naur <naur at post11.tele.dk>
>   * Test for issue1224

I'd like to establish a convention of "Accept issueNNNN: <synopsis>" for
patches that add a failing test, similar to how we use "Resolve ..." to
close bugs.

>   Attempting to "darcs convert" a repository which is already in
>   darcs2 format leads to a converted repository with missing file
>   contents. This patch provides a test that reproduces this behaviour.

> +darcs record --patch-name=add_file.txt --author=me --no-test -a
> --repodir temp/repo-2

AFAIK --author is unnecessary; the test harness sets it up in advance.

> +echo 'I understand the consequences of my action' |
> darcs convert temp/repo-2 temp/repo-2-converted

The sh operators &&, || and | all allow newlines (and comments) before
their RHS, so you can split this long line up, as shown above.

> +diff -s temp/repo-2/file.txt temp/repo-2-converted/file.txt

I'd also use cmp over diff, since it only matters IF they differ, not
HOW they differ.  I think that's just a matter of style.

More information about the darcs-users mailing list