> (1) "fossil rm xyx.txt" will remove the file xyz.txt from disk if and only
> if an exact copy of xyz.txt exists under control.  If xyz.txt has been
> modified or if xyz.txt has never been checked in (and the "fossil rm" is
> simply to reverse a prior "fossil add") then xyz.txt is unchanged.  Either
> way, there are probably no error or warning messages, though I am
> sympathetic to the argument that there should be a warning message if the
> file is not deleted from disk.

I think that there should be a warning message


> (2) "fossil mv abc.txt xyz.txt" will rename abc.txt to xyz.txt on disk
> provided that xyz.txt does not previously exist on disk or if xyz.txt does
> already exist and its content is identical to abc.txt.  If xyz.txt does
> previously exist and is different from abc.txt (and hence would be
> overwritten) then the operation just fails out-right with an appropriate
> error message.

You should define clearly what to do in case xyz.txt directory does not exist
or is not writable.

  if it is not writable, just fail and error message

  if the directory does not exist:

  a) the simple one, give and error

  b) Try to create the directories too


2012/12/13 Richard Hipp <[email protected]>:
> FWIW, I am following this thread with great interest.  I think I understand
> the various points of view.  I think most everybody brings up good points,
> and I encourage this kind of discussion.
>
> My current leanings are to change "rm" and "mv" as follows:
>
> (1) "fossil rm xyx.txt" will remove the file xyz.txt from disk if and only
> if an exact copy of xyz.txt exists under control.  If xyz.txt has been
> modified or if xyz.txt has never been checked in (and the "fossil rm" is
> simply to reverse a prior "fossil add") then xyz.txt is unchanged.  Either
> way, there are probably no error or warning messages, though I am
> sympathetic to the argument that there should be a warning message if the
> file is not deleted from disk.
>
> (2) "fossil mv abc.txt xyz.txt" will rename abc.txt to xyz.txt on disk
> provided that xyz.txt does not previously exist on disk or if xyz.txt does
> already exist and its content is identical to abc.txt.  If xyz.txt does
> previously exist and is different from abc.txt (and hence would be
> overwritten) then the operation just fails out-right with an appropriate
> error message.
>
> It seems to me that the behaviors above are the most "intuitive" and provide
> developers with the least amount of surprise.  The goal of Fossil (as it
> should be for any VCS) is to get out of the developer's way and just "do the
> right thing", so that the developer can devote maximum brain-power to
> working on their application, and expend a minimum number of brain-cycles
> thinking about Fossil and how to control it.  And I think the behaviors
> outlined above probably best achieve this goal.
>
> But I am far from certain of that, so please do continue debating the issue.
> We want to get this right.
>
> --
> D. Richard Hipp
> [email protected]
>
> _______________________________________________
> fossil-users mailing list
> [email protected]
> http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
>
_______________________________________________
fossil-users mailing list
[email protected]
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users

Reply via email to