You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Zé <jo...@gmx.com> on 2013/09/15 12:10:44 UTC

commit all files except a selected few?

Does subversion support any command line wizardry that offers the user a 
way to commit the changes made to all files under version control except 
those made to a selected few?

Thanks,
-- 
Zé

Re: commit all files except a selected few?

Posted by Zé <jo...@gmx.com>.
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.


Zé

Re: commit all files except a selected few?

Posted by Zé <jo...@gmx.com>.
On 09/15/2013 12:31 PM, Andy Levy wrote:
> On Sun, Sep 15, 2013 at 6:10 AM, Zé <jo...@gmx.com> wrote:
>> Does subversion support any command line wizardry that offers the user a way
>> to commit the changes made to all files under version control except those
>> made to a selected few?
>
>
> If you organize your files into changelists[1], you can commit a
> specific changelist and exclude other files.

That wouldn't really apply to this use case, as it relies on 
pre-established lists of related files.


> 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.


Thanks anyway,
Zé

Re: commit all files except a selected few?

Posted by Andy Levy <an...@gmail.com>.
On Sun, Sep 15, 2013 at 6:10 AM, Zé <jo...@gmx.com> wrote:
> Does subversion support any command line wizardry that offers the user a way
> to commit the changes made to all files under version control except those
> made to a selected few?


If you organize your files into changelists[1], you can commit a
specific changelist and exclude other files.

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.

1: http://svnbook.red-bean.com/en/1.7/svn.advanced.changelists.html