darcs

Issue 127 proposal: rename mv to move, rename remove to unadd

Title proposal: rename mv to move, rename remove to unadd
Priority wishlist Status resolved
Milestone Resolved in
Superseder Nosy List darcs-devel, dmitry.kurochkin, isaacd, kowey, markstos, thorkilnaur, tommy, zooko
Assigned To kowey
Topics

Created on 2006-02-07.16:57:57 by zooko, last changed 2009-08-27.14:10:44 by admin.

Messages
msg474 (view) Author: zooko Date: 2006-02-07.16:57:54
Two problems:

1.  Many users think that they need to use "darcs remove" to remove a file,
much as one is required to use "svn delete/rm/remove" in Subversion.  For
example, see this thread:

http://article.gmane.org/gmane.comp.version-control.darcs.user/9403

For another example, as I was considering submitting this bug report I noticed
the same kind of thing happening in an exchange on the #darcs IRC channel.  A
new user was confused as he was trying to use "darcs remove" to get rid of a
file.

2.  People frequently complain that they tried "darcs move" and it didn't work,
since it is named "darcs mv".  "darcs mv" is the only darcs command which is a
unix-style abbreviation rather than an English phrase.

These two problems are linked because the express reason why "darcs mv" is
namedly inconsistently with the other commands is to differentiate it from the
similar-named but subtly different "darcs remove".

So the proposal is to name these commands "darcs unadd" since it is parallel to
the other "darcs un*" command and it describes its behavior better (et isn't
like "svn remove") -- and "darcs move" since it is consistent with the other
namings.

Regards,

Zooko
msg841 (view) Author: zooko Date: 2006-08-03.00:07:15
This issue continues to vex new users.

My co-worker just used "darcs mv", and then expected there to be an analog
"darcs rm".  He was irritated that it didn't work, read the resulting usage
message, figured out that there was a "darcs remove", so he used that, not
realizing that it wasn't doing what he wanted.

He reports that if you just rm a file under Subversion then Subversion complains
about it later, and you are supposed to use "svn rm" to cleanly remove it, so he
expected to have to use "darcs rm" to cleanly remove things from darcs.

He suggested that maybe "darcs rm" could simply print out an error message
saying "Just rm it." and do nothing else.

In any case, he finds the difference between "darcs mv" and "darcs remove" to be
inexplicably inconsistent.
msg853 (view) Author: markstos Date: 2006-08-04.21:27:14
I think 'mv' and 'remove' work well, but I agree that perhaps "darcs rm" should
return a clarifying response like "Just delete the file and darcs will notice.
To keep the file but remove it from darcs management, use "darcs remove"'.

"unadd" is unnormal. 

"darcs mv" seem clear enough, and works like Unix mv. I think it should remain
unchanged.
msg854 (view) Author: droundy Date: 2006-08-05.12:44:25
On Fri, Aug 04, 2006 at 09:27:17PM +0000, Mark Stosberg wrote:
> I think 'mv' and 'remove' work well, but I agree that perhaps "darcs
> rm" should return a clarifying response like "Just delete the file
> and darcs will notice.  To keep the file but remove it from darcs
> management, use "darcs remove"'.

I like this idea.  A stub command "darcs rm" would be reasonably easy
to implement.
-- 
David Roundy
msg1003 (view) Author: zooko Date: 2006-09-20.05:46:12
"unadd" is analogous to "unrecord" and "unrevert".  I still prefer it because it
actually names what the operation does.  The operation does not remove any file
from existence, only removes it from darcs's awareness, which is the inverse of
what "darcs add" does.
msg1004 (view) Author: markstos Date: 2006-09-20.13:30:00
Zooko wrote:
> Zooko <zooko@zooko.com> added the comment:
> 
> "unadd" is analogous to "unrecord" and "unrevert". 

"Unadd" may appeal to computer scientists and logicians, but it is not a
word, just like "unpull" wasn't a word, and was better as "obliterate".

The opposite of "add" is "remove".

> The operation does not remove any file
> from existence, only removes it from darcs's awareness, which is the inverse of
> what "darcs add" does.

This makes a reasonable distinction between "rm" and "darcs rem" then.
If "darcs rem" did remove files, I would be confused about the
difference between that and  plain "rm".

I continue to vote "no change" on this issue.

    Mark
msg1873 (view) Author: kowey Date: 2007-07-19.05:16:33
As a compromise, I have submitted a patch which:
- aliases mv to move
- aliases remove to unadd
- adds a command stub for rm ('just delete it')

These aliases and stubs are 'hidden' in that they do not show up in the help,
nor are recognised for abbreviation.

This won't address the first problem that Zooko pointed out (people think they
need to do darcs remove).  I personally would prefer unadd as the default
command, although I'm sceptical that users won't just think they have to do
unadd systematically.

To Mark,  I suspect that our target demographic includes a fair number of
computer programmers and the like :-) Besides, it would be no less English than
unrecord and unrevert.  Having this kind of symmetry is useful for making darcs
'learnable'

In either case, I think now the debate shifts from 'which commands should exist'
to 'which commands we want to tell the users about'
msg1905 (view) Author: kowey Date: 2007-07-23.07:44:49
Marking resolved-in-unstable.  Feel free to re-open if you disagree.  The
relevant patch:

Mon Jul 16 22:29:44 CEST 2007  Eric Kow <eric.kow@loria.fr>
  * Implement command stubs 'rm', 'unadd', 'move' (issue127).
  
  These hidden commands are either stubs (they print some text and quit) or
  aliases (they do the same thing as some other command).
msg4868 (view) Author: isaacd Date: 2008-05-26.19:15:44
> The opposite of "add" is "remove".

perhaps the opposite of "add" is "subtract"? "darcs subtract file.html"... well,
maybe no one would be able to figure out what that meant, but that might be a
good thing.  But it's not entirely an opposite... it's not necessary (zooko
problem 1)

although I don't entirely get why you need to do "darcs add", rather than keep
your boring-file up-to-date (then record could detect new non-boring files as
changes, just like it detects in-file modifications as changes?)  Is that "darcs
record -l"?  A use pattern I never realized I could do, before...
History
Date User Action Args
2006-02-07 16:57:57zookocreate
2006-02-11 13:02:20droundysetnosy: droundy, tommy, zooko
2006-08-03 00:07:23zookosetstatus: unread -> unknown
nosy: droundy, tommy, zooko
messages: + msg841
2006-08-04 21:27:17markstossetnosy: + markstos
messages: + msg853
2006-08-05 12:44:29droundysetnosy: droundy, tommy, markstos, zooko
messages: + msg854
2006-09-20 05:46:17zookosetnosy: + kowey
messages: + msg1003
2006-09-20 13:30:09markstossetnosy: droundy, tommy, kowey, markstos, zooko
messages: + msg1004
2007-07-19 05:16:35koweysetnosy: + beschmi
messages: + msg1873
2007-07-23 07:44:49koweysetstatus: unknown -> resolved-in-unstable
messages: + msg1905
2007-07-31 17:57:35koweysetstatus: resolved-in-unstable -> resolved-in-stable
2008-05-26 19:15:46isaacdsetnosy: + dagit, isaacd
messages: + msg4868
2008-09-16 21:30:08adminsetstatus: resolved-in-stable -> resolved
nosy: droundy, tommy, beschmi, kowey, markstos, zooko, dagit, isaacd
2009-08-06 17:50:45adminsetnosy: + jast, Serware, dmitry.kurochkin, darcs-devel, mornfall, simon, thorkilnaur, - droundy, isaacd
2009-08-06 20:48:54adminsetnosy: - beschmi
2009-08-10 21:43:47adminsetnosy: + isaacd, - darcs-devel, jast, Serware, mornfall
2009-08-10 23:53:08adminsetnosy: - dagit
2009-08-25 18:02:06adminsetnosy: + darcs-devel, - simon
2009-08-27 14:10:44adminsetnosy: tommy, kowey, markstos, darcs-devel, zooko, thorkilnaur, isaacd, dmitry.kurochkin