Eric Kow <[email protected]> writes:
> When darcs 2.2.1 comes out, I suggest that somebody submit a big bang
> whitespace patch bundle against its tag, and that we update the policy
> suite to test for trailing whitespace.

This can be done as an Emacs batch command:

    find [a-z]*/ \( -name \*.hs -o -name \*.lhs \) -exec \
      emacs --batch -q --no-site-file {} \
      -f universal-argument -f whitespace-cleanup -f save-buffer \;

Note that the above command only performs replacement within Haskell
files, not the TeX sources nor test scripts.

I suggest that you then commit each directory as a separate patch, to
reduce the huuuuuuge merge conflict pain that you will get.  (This is a
compromise; recording each file separately would be better for merging
but bloat the change log amazingly).

    find [a-z]*/ -depth -type d -exec \
      darcs record -am "Whitespace cleanup in {}." {} \;

Note the -depth above ensures that "per directory" doesn't record child
dirs, by recording those children first (depth-first search).

Finally, the glob [a-z]*/ is a kludgy way of saying "find . -name _darcs
-prune -o ...".

> The bundle should likely contain one patch per set of logically related
> files (for example, a sub-directory), this being the usual compromise
> between commutation and keeping the history reasonably clean.

Oops, you're a step ahead of me :-)

_______________________________________________
darcs-users mailing list
[email protected]
http://lists.osuosl.org/mailman/listinfo/darcs-users

Reply via email to