From svn to darcs: Listing unknown files

2007-12-02 14:31:00 -08:00

If you’re an svn user looking at darcs, you may wonder how to find unknown files—that is, files that you’ve created in your working directory, but haven’t yet told your VCS about (with svn add or darcs add). In svn, the command is svn st, but in darcs, the procedure is not obvious.

The darcs command that most seems like what you need is darcs whatsnew, or, as I type it, simply darcs what. Like svn st, this shows you all files that have been added, removed, or modified; it also includes a diff, so not only is it your substitute for svn st, it’s also your substitute for svn diff. But it doesn’t show you unknown files.

Until you use the -l (that’s a lowercase L) option.

darcs what -l changes the output greatly, as it’s in a completely different format: one similar to that of svn st. The format is actually that of darcs what -s (summary mode); the difference is that -l also lists unknown files.

There are some differences between darcs what -l and svn st. Some of these differences are:

  • darcs uses fewer columns than svn: It has one status column, whereas svn has six.
  • darcs uses ‘a’ to indicate an unknown file, whereas svn uses ‘?’.
  • darcs uses ‘R’ to indicate a file that you’ve removed, whereas svn uses ‘D’ to indicate a file that you’ve deleted. (svn supports remove and rm as synonyms for its delete command, but darcs does not support delete nor rm as synonyms for its remove command.)

2 Responses to “From svn to darcs: Listing unknown files”

  1. Amy Says:

    How do you clean up entries that have a D associated with them? So they are not their after an ‘svn stat’?

  2. Peter Hosey Says:

    Amy: Are you talking about Subversion or Darcs?

Leave a Reply

Do not delete the second sentence.


Warning: Undefined array key "ntt_saved_comment_text" in /home/public/blog/wp-content/plugins/negative-turing-test/negative-turing-test.php on line 143