Login | Register
My pages Projects Community openCollabNet

Discussions > users > Question about path representation

fsvs
Discussion topic

Back to topic list

Question about path representation

Author pmarek
Full name P.Marek
Date 2007-05-31 22:45:42 PDT
Message I'm currently fixing an UI bug, and fear that I'm opening a whole box of
worms :-).
Please provide feedback.


Say, you're versioning your whole installation, and have a few modified
files:
        $ fsvs st /
        .mC. 100 ./bin/bash
        .mC. 200 ./etc/X11/xorg.conf

Now you're going into a subdirectory and ask:
        $ cd /etc/X11
        $ fsvs st .
        .mC. 200 ./etc/X11/xorg.conf
So far, so good.

But the default is wrong:
        $ fsvs st
        .mC. 100 ./bin/bash
        .mC. 200 ./etc/X11/xorg.conf

This is a bit ugly; it should only show the files below the current path.
This I'm fixing.


The other question that arises - where I'd need some feedback - is:


* How should the path be shown? *
\==================​=============/

- "./etc/X11/xorg.conf" - current way, relative to the wc root
  This is nice in some way, but has a significant drawback - the path
  can't be copy/pasted in the current shell window.

- "/etc/X11/xorg.conf" - the full path
  A full path has its merits - it does always work, but can get very long.

- "$WCROOT/xorg.conf" - full path, but shortened by environment variables
  A subvariant of the full path, but with beginnings of the paths
  substituted by environment variables, as applicable.
  Note: No variable name would be hardcoded - all variables would be
  looked for matching strings.
  Doesn't help much if the WC root is "/" - but in this case the full path
  might be the best bet anyway. Shortening helps if you're in a deep
  path - and for this case some environment variable set could be useful
  for other things, too.

- "./xorg.conf", or "xorg.conf" - relative to commandline argument
  Providing a path relative to the commandline argument that references it
  is the way many utilities (including svn) work.
  Drawback: displaying something like
    ../../somewhere/../w​hereisit/../a_here/p​ath/stumble/file.txt​
  is not nice.
  - Should a "./" be included or not? Wouldn't be needed, but shows that
    they're only valid in *this* directory.


I'm currently leaning towards something like the 3rd idea; or the last,
but with sanitized paths - so that the given example would be compressed
into
        ../../a_here/path/st​umble/file.txt


But that just leaves more questions to answer ...
- Should ignore patterns be taken relative to the current subdirectory of
  the wc root, so that
    $ fsvs ignore './*.txt'
  is really
    $ ( cd $WCROOT ; fsvs ignore './$OLD_WC/*.txt' )
  Or should ignore normally work as now, with a new "local-ignore"
  command?

- How about displaying paths in diff? Deriving the paths from the
  arguments makes a lot of sense, as the diff output might need them.


Please note that this is just a quick brainstorming ... please mention any
other points you find worthwhile.


Thank you!




--
Versioning your /etc, /home or even your whole installation?
             Try fsvs (fsvs.tigris.org)!

« Previous message in topic | 1 of 6 | Next message in topic »

Messages

Show all messages in topic

Question about path representation pmarek P.Marek 2007-05-31 22:45:42 PDT
     Re: Question about path representation pmarek P.Marek 2007-06-03 05:32:09 PDT
         Re: Question about path representation Thomas Harold <tgh at tgharold dot com> Thomas Harold <tgh at tgharold dot com> 2007-06-03 11:15:51 PDT
     Re: Question about path representation benjaminm Benjamin M. 2007-06-03 13:58:17 PDT
         Re: Question about path representation pmarek P.Marek 2007-06-03 22:46:36 PDT
     Re: Question about path representation Gunter Ohrner <G dot Ohrner at post dot rwth-aachen dot de> Gunter Ohrner <G dot Ohrner at post dot rwth-aachen dot de> 2007-06-21 09:32:21 PDT
Messages per page: