[darcs-users] Feature request: Print paths relative to the current directory

Wolfgang Dobler wdobler at gmail.com
Fri May 6 19:21:54 UTC 2011

I haven't found an existing bug for the following, seemingly natural,
feature request:

Suppose I have the following directory structure under revision control:

  |-- top-level.file
  `-- level1/
      `-- some.file

and some.file gets changes somehow without my revision control system
knowing yet.

I cd to level1, ask about changed files, and record the change. In CVS,
SVN or git, this looks like

  cd level0/level1
  svn status
  # prints:
  # M       some.file
  svn commit some.file

In darcs, however, we have

  cd level0/level1
  darcs whatsnew
  # M ./level1/some.file -1 +1
  darcs record ./some.file

Being both lazy and afraid to mistype filenames, I am used to copy and
paste the file name in question, which works fine for CVS/SVN/git. For
darcs however, I thus get

  darcs record ./level1/some.file
  # WARNING: File 'level1/level1/some.file' does not exist!
  # Recording changes in "level1/level1/some.file":
  # darcs failed:  None of the files you specified exist!

So my workflow involves two more steps: curse loudly, then strip the file
name (with an extra iteration if I am yet deeper in a darcs working
directory and don't get the stripping right at my first attempt).

I much prefer the other VCs' presentation here. With git, my
copy-and-paste approach works even when top-level.file gets changed:

  cd level0/level1
  git status
  #       modified:   ../top-level.file
  git commit ../top-level.file

Now there probably are some reasons for darcs' design, and we certainly
cannot simply change the default behaviour. But I would like to see a flag
(that I can put in my ~/.darcs/defaults) giving me git's file name
handling here:

  cd level0/level1
  darcs whatsnew --relative-filenames
  # M ./some.file -1 +1
  # M ../top-level.file -2 +17
  darcs record ./some.file ../top-level.file

If others have been missing this feature, too, I'll submit a ticket.

W o l f g a n g

More information about the darcs-users mailing list