[darcs-users] darcs and the current working directory

Stefan Wehr mail at stefanwehr.de
Wed Jun 22 08:48:35 UTC 2005


Hi all,

Many of the darcs commands ignore the current working directory  
which is confusing since traditionally shell commands operate  
relative to the current working dir.

     - E.g., "darcs whatsnew" always reports filenames relative to  
the dir containing the _darcs dir rather than relative to the current  
working dir. The wrong impression is further reinforced by the use of  
"./" prefixes on all reported filenames. It would be better for  
whatsnew to report file names relative to the current working dir.

     - This behaviour causes problems if one is post-processing the  
output of darcs since the filenames need to be adjusted.

     - A related problem is the fact that "darcs whatsnew" always  
reports all changes in the repo. It would be more useful if it  
restricted its report to the subset of the repo in which the user is  
currently working.

     - Similar comments could be made about relativity to current  
working directory for other commands such as "darcs record". Rather  
than have these commands only provide a "whole of repo" view, it  
would be better to follow convention and let the user decide the  
scope they want to use by positioning themselves in the repo  
accordingly. This would make darcs easier to use in large repos where  
there are lots of changes and would be consistent with the way  
systems like CVS work.

     - There is something of a workaround: You can say "darcs  
whatsnew ." to get the changes for the current dir (. can be any  
dir). However, the filenames are still reported as relative to the  
toplevel of the repo not the dir you use in the cmd. This works for "darcs 
record" as well.

I suggest that "darcs whatsnew" should behave like "darcs whatsnew .", the 
same for other relevant commands. Furthermore, filenames should be reported 
relative to the current working directory and not relative to the directory 
containing `_darcs'.

Cheers,
  Stefan 

-- 
Stefan Wehr
Web:  http://www.stefanwehr.de
PGP:  Key is available from pgp.mit.edu, ID 0B9F5CE4




More information about the darcs-users mailing list