You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Pavel Lyalyakin <pa...@visualsvn.com> on 2016/12/16 18:02:32 UTC

How does `--changelist` work with `svn revert` and other commands?

Hello,

Subj.

I assume that if I run `svn revert --changelist foo`, it will revert
all the changes made to items listed in 'foo' changelist without
asking me for paths to the items I want revert. Is this correct that
`svn revert` requires me to provide paths to the items I want to
revert in my working copy? Why?

Here is an example:
[[[
svn changelist foo bar
svn revert --changelist foo
svn: E205001: Try 'svn help revert' for more information
svn: E205001: Not enough arguments provided
]]]

I just saw this post on StackOverflow and became interested why this
happens: http://stackoverflow.com/q/41189627/761095

-- 
With best regards,
Pavel Lyalyakin
VisualSVN Team

Re: How does `--changelist` work with `svn revert` and other commands?

Posted by Daniel Shahaf <da...@apache.org>.
Pavel Lyalyakin wrote on Fri, Dec 16, 2016 at 21:02:32 +0300:
> I assume that if I run `svn revert --changelist foo`, it will revert
> all the changes made to items listed in 'foo' changelist without
> asking me for paths to the items I want revert. Is this correct that
> `svn revert` requires me to provide paths to the items I want to
> revert in my working copy? Why?

Historically, 'revert' requires explicit path arguments, and defaults to
--depth=empty, in order to minimise the risk of data loss due to
reverting more than the user intended.

I suspect what you're seeing is simply that when changelists were added,
the "Were any positional arguments specified?" check wasn't updated to
consider okay the case that a --changelist option was given but
positional arguments were not.  In short: an oversight bug.

(Compare the --targets option, which gets resolved before the
"positional arguments?" check.)

Apparently, �svn cl --remove --cl x� behaves in the same way.

Cheers,

Daniel