[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

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

From: Daniel Shahaf <danielsh_at_apache.org>
Date: Fri, 16 Dec 2016 19:13:02 +0000

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
Received on 2016-12-16 20:16:31 CET

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.