[darcs-users] cannot use darcs to control my systems-config because darcs diff doesnt work if darcs repos is (yes, i mean root)

Thies C. Arntzen thies at thieso.net
Fri Jan 28 10:31:51 UTC 2005


hi,

i want to use darcs to control changes to my sytsem files - works 
_GREAT_ - thanx.

one small thing: if i do darcs diff i get:

root at schnuffel# cd /
root at schnuffel# darcs init
root at schnuffel# darcs add /etc/passwd
root at schnuffel# darcs rec -am "test"
root at schnuffel# darcs diff
diff: invalid option -- o
diff: Try `diff --help' for more information.

doing an "strace -f darcs diff"  reveals:

[pid 17525] execve("/usr/bin/diff", ["diff", "-rN", "-old", "-new"], 
[/* 26 vars */]) = 0
[pid 17525] write(2, "diff: invalid option -- o\n", 26) = 26

so, because darcs creates the old and new version in folder called 
[repos]-old and [repos]-new and [repos] is emty in my case -old and 
-new are misunderstood as switches to diff.

i can see a few ways of making this work -

- change [repos]-old, [repos]-new to old-[repos] and [new]-repos(*)
- change the dash '-' to some other character
- add a double dash to the comman-line of diff so that it "know" that 
the following args are files/folder (only works with gnu diff)
... many more

(*) my favorite

i could send in a path but i never wrote a line of huskell;-)


thanx for darcs!
re, thies









More information about the darcs-users mailing list