views:

54

answers:

1

A junior programmer in our office has an unfortunate (but understandable) habit of using Eclipse's "Correct all the indentation in this file" feature. As a result, his checked out copy includes thousands of lines that register as changes, simply because the whitespace is different. Accepting all these changes - while other people are also working on the same code, some of them in different offices - will lead to conflicts. At the same time we don't want to throw away all the work he's done.

Are there any options for Darcs to ignore or normalise whitespace changes; or tools that can revert the differences?

+1  A: 

i have never used darcs, but this is how i'd deal with it:

(cd newbies-copy && darcs diff --diff-opts -w) | (cd fresh-copy && darcs apply)

hopefully i got the darcs commands right, just skimmed the manual.

just somebody
This sounds like the right approach, but those exact commands give an error. Hopefully we'll figure out the correct method based on this.
Marcus Downing
I never actually got this working, but I believe it's the right approach.
Marcus Downing
what were the error messages?
just somebody
The problem with this is that `darcs apply` doesn't work with diff format. You should use the normal `patch` command instead.
Ganesh Sittampalam