[darcs-devel] [darcs #452] Filenames displayed relative to pruning directory

David Roundy droundy at darcs.net
Sat Jun 25 04:42:40 PDT 2005


On Thu, Jun 23, 2005 at 09:31:16PM -0400,  via RT wrote:
> `darcs whatsnew some_dir' or `darcs record some_dir' display filenames
> relative to the toplevel _darcs directory, although the filenames start
> with a `./' (there might be other darcs command showing the same
> behaviour). There has been some discussion about this problem on the
> darcs-user mailinglist...

There were a couple of proposals.  One was that the preceding ./ should be
removed from filenames.  That sounds reasonable to me, since it does indeed
appear to suggest that the files are relative to the current directory.  It
also conveys no information.  I think we may need to leave the ./ in the
actual patches for backwards compatibility, but we can pretty easily use
the "invisible" feature of the Printer module to avoid displaying it on
screen.

> The conclusion was that filenames should be displayed relative to the
> pruning directory.

This isn't so clear to me.  The posts seemed split regarding defaulting the
pruning direcotry to the current directory.  What would one do with

darcs whatsnew src/

To me it would seem contrary to display filenames without the preceding
src/.  That would be similar to the behavior of ls, but contrary to that of
diff.

Even worse, what would you do when the user asks

darcs whatsnew src/ doc/

In this case you'll *have* to include the src/ and doc/ parts of the
paths.

I think that displaying filenames relative to the pruning directory isn't a
reasonable option.  That leaves two possibilities.  Either we leave
filenames relative to the root of the repository, or we make them relative
to the current directory.  I prefer the former.
-- 
David Roundy
http://www.darcs.net




More information about the darcs-devel mailing list