You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Benjamin Buch <be...@gmx.de> on 2008/09/13 10:43:36 UTC

Problems with propset svn:ignore

I'd like to exclude a settings-file in my working copy from being  
versioned.
I guess this is a common task... ;-)

The original settings-file for deployment is versioned, so after a  
checkout I have it in the working directory.
I just don't want to submit any changes I make on the settings-file.

What I did was:

svn propset svn:ignore 'settings.py' .

a 'svn propget svn:ignore .' gives me 'settings.py', so I thought this  
file would be ignored.
But when I make changes to settings.py in my working directory, 'svn  
status' gives me

M settings.py

, so subversion knows settings.py has been modified, and the  
modifications will be submitted at the next commit.

Now I'm a little confused...
I thought svn would ignore settings.py?

-benjamin

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Problems with propset svn:ignore

Posted by N D <ni...@gmail.com>.
Yes, instead of running this script on the build server, i will execute it
just before the svn commit operation and ignore files by using the
.cvsignore file. So ignored files wont go in the svn. :)

On Sun, Sep 14, 2008 at 1:19 AM, Ryan Schmidt <
subversion-2008c@ryandesign.com> wrote:

> On Sep 13, 2008, at 7:56 AM, N D wrote:
>
> I have a question on similar lines.
>> My repository has been migrated to SVN. In the migration procees all the
>> .cvsignore files are also in SVN. I have found a script:
>> #! /bin/sh
>>
>> # Scan the given directory (or current directory by default) recursively
>> and,
>>
>> # for every .cvsignore file found, tell Subversion to ignore the presence
>> in
>>
>> # that directory of any files listed in the .cvsignore file.
>>
>> # This stops Subversion from complaining about automatically generated
>> files
>>
>> # that have every right to be in the working copy, though not in the
>> repository.
>>
>> # The .cvsignore files were inherited from the days libpqxx was kept in a
>> CVS
>>
>> # repository, but they're also a lot more convenient than the way
>> Subversion
>>
>> # does this by itself.
>>
>> DIR="$1"
>>
>> if test -z "$DIR" ; then
>>
>> DIR="."
>>
>> fi
>>
>> for i in `find "$DIR" -name .cvsignore` ; do
>>
>> dir="`echo "$i" | sed -e 's|/\.cvsignore$||'`"
>>
>> svn propset svn:ignore --non-interactive --file "$i" "$dir"
>>
>> done
>>
>> I am thinking to run this script on the svn environment. I expect that all
>> the files as listed by the .cvsignore file would be ignore in future by SVN.
>> But as Andy says it 'Once an item is versioned, Subversion will not ignore
>> it.', I doubt what I expect wil really happen. Can any one comment/add/help?
>>
>
> Once an item is versioned, Subversion will not ignore it.
>
> "Ignore" only applies to items which are not in the repository.
>
> If you want an item to be ignored, do not add it to the repository.
>
> If it's already in the repository, and you want to ignore it, remove it
> from the repository first with "svn rm".
>
>

Re: Problems with propset svn:ignore

Posted by Ryan Schmidt <su...@ryandesign.com>.
On Sep 13, 2008, at 7:56 AM, N D wrote:

> I have a question on similar lines.
> My repository has been migrated to SVN. In the migration procees  
> all the .cvsignore files are also in SVN. I have found a script:
> #! /bin/sh
>
> # Scan the given directory (or current directory by default)  
> recursively and,
>
> # for every .cvsignore file found, tell Subversion to ignore the  
> presence in
>
> # that directory of any files listed in the .cvsignore file.
>
> # This stops Subversion from complaining about automatically  
> generated files
>
> # that have every right to be in the working copy, though not in  
> the repository.
>
> # The .cvsignore files were inherited from the days libpqxx was  
> kept in a CVS
>
> # repository, but they're also a lot more convenient than the way  
> Subversion
>
> # does this by itself.
>
> DIR="$1"
>
> if test -z "$DIR" ; then
>
> DIR="."
>
> fi
>
> for i in `find "$DIR" -name .cvsignore` ; do
>
> dir="`echo "$i" | sed -e 's|/\.cvsignore$||'`"
>
> svn propset svn:ignore --non-interactive --file "$i" "$dir"
>
> done
>
> I am thinking to run this script on the svn environment. I expect  
> that all the files as listed by the .cvsignore file would be ignore  
> in future by SVN. But as Andy says it 'Once an item is versioned,  
> Subversion will not ignore it.', I doubt what I expect wil really  
> happen. Can any one comment/add/help?

Once an item is versioned, Subversion will not ignore it.

"Ignore" only applies to items which are not in the repository.

If you want an item to be ignored, do not add it to the repository.

If it's already in the repository, and you want to ignore it, remove  
it from the repository first with "svn rm".


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Problems with propset svn:ignore

Posted by N D <ni...@gmail.com>.
Hi all,

I have a question on similar lines.
My repository has been migrated to SVN. In the migration procees all the
.cvsignore files are also in SVN. I have found a script:

#! /bin/sh

# Scan the given directory (or current directory by default) recursively
and,

# for every .cvsignore file found, tell Subversion to ignore the presence in


# that directory of any files listed in the .cvsignore file.

# This stops Subversion from complaining about automatically generated files


# that have every right to be in the working copy, though not in the
repository.

# The .cvsignore files were inherited from the days libpqxx was kept in a
CVS

# repository, but they're also a lot more convenient than the way Subversion


# does this by itself.

DIR="$1"

if test -z "$DIR" ; then

DIR="."

fi

for i in `find "$DIR" -name .cvsignore` ; do

dir="`echo "$i" | sed -e 's|/\.cvsignore$||'`"

svn propset svn:ignore --non-interactive --file "$i" "$dir"

done
I am thinking to run this script on the svn environment. I expect that all
the files as listed by the .cvsignore file would be ignore in future by SVN.
But as Andy says it 'Once an item is versioned, Subversion will not ignore
it.', I doubt what I expect wil really happen. Can any one comment/add/help?

On Sat, Sep 13, 2008 at 2:51 PM, Benjamin Buch <be...@gmx.de> wrote:

>
> Am 13.09.2008 um 12:50 schrieb Andy Levy:
>
> Once an item is versioned, Subversion will not ignore it.
>>
>> Your use case is so common it's in the FAQ.
>> http://subversion.tigris.org/faq.html#ignore-commit
>>
>
> Thanks!
>
> -benjamin
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: users-help@subversion.tigris.org
>
>

Re: Problems with propset svn:ignore

Posted by Benjamin Buch <be...@gmx.de>.
Am 13.09.2008 um 12:50 schrieb Andy Levy:

> Once an item is versioned, Subversion will not ignore it.
>
> Your use case is so common it's in the FAQ.
> http://subversion.tigris.org/faq.html#ignore-commit

Thanks!

-benjamin

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Problems with propset svn:ignore

Posted by Andy Levy <an...@gmail.com>.
On Sat, Sep 13, 2008 at 06:43, Benjamin Buch <be...@gmx.de> wrote:
> I'd like to exclude a settings-file in my working copy from being versioned.
> I guess this is a common task... ;-)
>
> The original settings-file for deployment is versioned, so after a checkout
> I have it in the working directory.
> I just don't want to submit any changes I make on the settings-file.
>
> What I did was:
>
> svn propset svn:ignore 'settings.py' .
>
> a 'svn propget svn:ignore .' gives me 'settings.py', so I thought this file
> would be ignored.
> But when I make changes to settings.py in my working directory, 'svn status'
> gives me
>
> M settings.py
>
> , so subversion knows settings.py has been modified, and the modifications
> will be submitted at the next commit.
>
> Now I'm a little confused...
> I thought svn would ignore settings.py?

Once an item is versioned, Subversion will not ignore it.

Your use case is so common it's in the FAQ.
http://subversion.tigris.org/faq.html#ignore-commit

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org