You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Steve Kelem <st...@kelem.net> on 2012/01/12 00:49:26 UTC

switch to ignore files that have not been checked in?

I'm trying to add properties to a bunch of files that have a common file extension, but are not the only files in the directory/directories.

I would like to run something like:

svn propset svn:needs-lock '*' *.png *.jpg *.vsd

The problem is that I have a number of temporary files in the working directory that match the pattern but are not and should not be checked in.  The problem with using the convenience of shell patterns is that subversion aborts as soon as it processes a file that is not already checked in.  It also aborts even if a file or directory has the svn:ignore property set.

I don't know of an easy way to match all the files that match a shell pattern and are also already checked in. (Which would be a clunky workaround for not having the following:)

I'd like to use a switch such as:

svn --ignore-non-checked-in-files propset svn:needs-lock '*' *.png *.jpg *.vsd

Does such a switch already exist?  Such a switch would tell subversion commands to silently ignore files and directories that have not been checked in.  The opposite already exists. If I run svn add *.png, the "svn add" command runs, but complains harmlessly if a file has already been checked in. "svn add" does not halt if it encounters a file that has already been checked in.

Thanks for your help,
Steve

Re: switch to ignore files that have not been checked in?

Posted by Geoff Hoffman <gh...@cardinalpath.com>.
On Wed, Jan 11, 2012 at 6:45 PM, Andy Levy <an...@gmail.com> wrote:

> On Wed, Jan 11, 2012 at 18:49, Steve Kelem <st...@kelem.net> wrote:
> > I'm trying to add properties to a bunch of files that have a common file
> extension, but are not the only files in the directory/directories.
> >
> > I would like to run something like:
> >
> > svn propset svn:needs-lock '*' *.png *.jpg *.vsd
> >
> > The problem is that I have a number of temporary files in the working
> directory that match the pattern but are not and should not be checked in.
>  The problem with using the convenience of shell patterns is that
> subversion aborts as soon as it processes a file that is not already
> checked in.  It also aborts even if a file or directory has the svn:ignore
> property set.
> >
> > I don't know of an easy way to match all the files that match a shell
> pattern and are also already checked in. (Which would be a clunky
> workaround for not having the following:)
> >
> > I'd like to use a switch such as:
> >
> > svn --ignore-non-checked-in-files propset svn:needs-lock '*' *.png *.jpg
> *.vsd
> >
> > Does such a switch already exist?  Such a switch would tell subversion
> commands to silently ignore files and directories that have not been
> checked in.  The opposite already exists. If I run svn add *.png, the "svn
> add" command runs, but complains harmlessly if a file has already been
> checked in. "svn add" does not halt if it encounters a file that has
> already been checked in.
>
> Try the --force switch.
>


If I'm reading your post/question correctly you may need to (via your own
bash script) grep/sed/awk the output of svn status (for M's) and only svn
propset the ones matching your pattern.

Re: switch to ignore files that have not been checked in?

Posted by Andy Levy <an...@gmail.com>.
On Wed, Jan 11, 2012 at 18:49, Steve Kelem <st...@kelem.net> wrote:
> I'm trying to add properties to a bunch of files that have a common file extension, but are not the only files in the directory/directories.
>
> I would like to run something like:
>
> svn propset svn:needs-lock '*' *.png *.jpg *.vsd
>
> The problem is that I have a number of temporary files in the working directory that match the pattern but are not and should not be checked in.  The problem with using the convenience of shell patterns is that subversion aborts as soon as it processes a file that is not already checked in.  It also aborts even if a file or directory has the svn:ignore property set.
>
> I don't know of an easy way to match all the files that match a shell pattern and are also already checked in. (Which would be a clunky workaround for not having the following:)
>
> I'd like to use a switch such as:
>
> svn --ignore-non-checked-in-files propset svn:needs-lock '*' *.png *.jpg *.vsd
>
> Does such a switch already exist?  Such a switch would tell subversion commands to silently ignore files and directories that have not been checked in.  The opposite already exists. If I run svn add *.png, the "svn add" command runs, but complains harmlessly if a file has already been checked in. "svn add" does not halt if it encounters a file that has already been checked in.

Try the --force switch.

Re: switch to ignore files that have not been checked in?

Posted by Andreas Krey <a....@gmx.de>.
On Wed, 11 Jan 2012 15:49:26 +0000, Steve Kelem wrote:
...
> I would like to run something like:
> 
> svn propset svn:needs-lock '*' *.png *.jpg *.vsd

Crude hackaround:

  for i in *.png *.jpg *.vsd; do svn propset svn:needs-lock '*' "$i"; done

That way, the errors won't keep the rest from working.

Andreas

-- 
"Totally trivial. Famous last words."
From: Linus Torvalds <torvalds@*.org>
Date: Fri, 22 Jan 2010 07:29:21 -0800

RE: switch to ignore files that have not been checked in?

Posted by Bob Archer <Bo...@amsi.com>.
> I'm trying to add properties to a bunch of files that have a common file
> extension, but are not the only files in the directory/directories.
> 
> I would like to run something like:
> 
> svn propset svn:needs-lock '*' *.png *.jpg *.vsd
> 
> The problem is that I have a number of temporary files in the working directory
> that match the pattern but are not and should not be checked in.  The problem
> with using the convenience of shell patterns is that subversion aborts as soon as
> it processes a file that is not already checked in.  It also aborts even if a file or
> directory has the svn:ignore property set.
> 
> I don't know of an easy way to match all the files that match a shell pattern and
> are also already checked in. (Which would be a clunky workaround for not
> having the following:)
> 
> I'd like to use a switch such as:
> 
> svn --ignore-non-checked-in-files propset svn:needs-lock '*' *.png *.jpg *.vsd
> 
> Does such a switch already exist?  Such a switch would tell subversion
> commands to silently ignore files and directories that have not been checked
> in.  The opposite already exists. If I run svn add *.png, the "svn add" command
> runs, but complains harmlessly if a file has already been checked in. "svn add"
> does not halt if it encounters a file that has already been checked in.

Can you not just do a clean checkout and run the command. This way there won't be any un-versioned files.

BOb