On Tue 2002-09-03 at 13:40:25 -0500, Karl Fogel wrote:
> Colin D Bennett <firstname.lastname@example.org> writes:
> > Does anyone see a problem with simply ignoring files, even if explicitly
> > specified (as with "svn add -R *" or "svn add *")? I wouldn't mind svn
> > silently ignoring already-added files.
> So we simply declare 'svn add' to be idempotent (I love that word).
> Sure, I see no problem with that. Anyone else?
Just my 2 cents...
I started writing about how I do not like the idea about svn not
telling me if I messed up, even in a harmless way (specifying a file
which is already checked in).
The main reason being that, AFAIK, svn has no way to tell that I used
a joker. I could have typed all files/dirs by hand on the command
line. And if I type "svn add foobar" explicitly for a foobar which is
already added, I have messed up in some way (well, at least I think
In the course of trying to provide further arguments I noticed that
whether one would consider a explicit message the expected behaviour
or not, depends on what action "svn add" means:
- if it means "add this file/dir to the repository" (what I thought it
means), IMHO, the expected behaviour is to complain that it is
already in there.
- if it means "assure the file/dir is in the repository", IMHO, it
should not complain about files already being in the repository.
Well, that might have been already obvious to all of you. To me, it
was not. ;-)
Presumed that the above observation will be agreed upon, one can
deduct that a simple "svn should always be silent" about such files
(as has been suggested) or "svn should always complain" is not
reasonable, but depends on what a command should mean and therefore
the probable expected behaviour would be.
The funny thing is, that while my intuition (awry thing, it is) tells
me "svn add <file/dir>" means the first, it also says that
"svn add -R <dir>" means the second for all recursive checks, i.e. I
would only expect it to give an warning, if there was no file in <dir>
to add at all (even if <dir> was already in the repository).
Ah, and by the way, "svn add -R ." can be used reaonably instead of
"svn add -R *" and would only result in one message in case everything
is already added. So there is an valid alternative to avoid the
mass of annoying messages "*" provokes, if the existing behaviour is
OTOH, I cannot think of any consequential damage that could result
from changing the current behaviour in the suggested way.
 Well, "svn add -R ." will not leave out files starting with dot
(on UNIX systems) which is probably what was meant with "*"
anyhow: add everything, except files on ignore list(s).
(does it indeed ignore files on ignore list? I hope so ;-)
Received on Wed Sep 4 04:52:49 2002
- application/pgp-signature attachment: stored