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

Re: commit all files except a selected few?

From: Zé <jose.passes_at_gmx.com>
Date: Sun, 15 Sep 2013 15:01:14 +0100

On 09/15/2013 02:39 PM, Zé wrote:
> On 09/15/2013 12:31 PM, Andy Levy wrote:

>> Other than that, svn commit allows you to pass multiple files/paths to
>> be committed. You can specify individual paths and/or use your shell
>> to pattern-match or glob files which should then be expanded by your
>> shell to pass to svn.
>
> That doesn't apply as well, as the objective would be to easily exclude
> a single file, or a small subset of files, from an arbitrarily long list
> of files.

Silly me. The answer is, quite obviously, in specifying glob patterns,
particularly one which excludes a file. With bash, the !(excluded) glob
pattern does just that. So, thanks to bash, the following command
excludes main.c++ from a commit:

$ svn commit -m "committing everything except main.c++" !(main.c++)

Once again, a little knowledge of the shell goes a long way.


Received on 2013-09-15 16:01:48 CEST

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.