Philip Martin wrote on Thu, Mar 29, 2012 at 10:32:42 +0100:
> danielsh_at_tigris.org writes:
>
> > http://subversion.tigris.org/issues/show_bug.cgi?id=4154
>
> > % ls
> > A foo iota
> > % $svn add f* *o
> > A foo
> > svn: warning: W150002: '/tmp/svn/wc1/trunk/foo' is already under version control
> > subversion/svn/add-cmd.c:108: (apr_err=200009)
> > subversion/svn/add-cmd.c:103: (apr_err=200009)
> > svn: E200009: Could not add all targets because some targets are already versioned
> > subversion/svn/add-cmd.c:94: (apr_err=200009)
> > svn: E200009: Illegal target for the requested operation
> > zsh: exit 1 $SVN add f* *o
> > %
> >
> > svn should be smart enough to uniq() the targets, rather than error out on me
> > because I tried to add it twice.
>
> This issue is "svn add foo foo" complaining that foo is already
> versioned. Is add the only command that is wrong?
As you point out, 'add' and 'mkdir' are similar. 'revert' even today
doesn't error out in the idempotency scenario ('svn $subc foo && svn
$subc foo'; the second invocation errors out for $subc =~ /add|mkdir/.)
> Should we eliminate duplicates in all commands?
I think we shouldn't eliminate duplicates in, for example, 'cat'.
> Silently?
>
> $ svn add foo foo # foo unversioned
> "already versioned" error
>
> $ svn mkdir X X # no X
> "file exists" error
>
> $ svn rm foo foo # foo versioned
> no error
>
> $ svn rm --force foo foo # foo added
> "does not exist" error
>
> $ svn rm foo foo # foo versioned and deleted
> no error
>
> $ svn revert foo foo # foo versioned
> no error
>
> $ svn revert foo foo # foo added
> "Skipped foo" notification
>
> --
> Philip
Received on 2012-03-29 13:31:38 CEST