You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by "Hensley, Richard" <Ri...@McKesson.com> on 2007/02/28 23:09:03 UTC

svn:ignore question (with test script)

I have a case where I'm trying to ignore some directories during add,
and I don't quite know why it's not working the way I expect. Here is a
sample script that demonstrates my question.

#!/bin/sh
DIR=testrepos
REPOS=file:///rhensle/test/testrepos

rm -rf $DIR
rm -rf wc
svnadmin create $DIR
svn mkdir $REPOS/trunk -m commit1
svn co $REPOS/trunk wc
echo tmp > ig
echo log >> ig
echo .xyz >> ig
svn propset svn:ignore -F ig wc
svn commit wc -m commit2
echo running prop get
svn propget svn:ignore wc
cd wc
mkdir log
mkdir tmp
mkdir this
echo stuff > this/x.txt
echo morestuff > .xyz
echo junk > log/x.txt
echo morejunk > tmp/more.txt
echo "running stat"
svn stat
echo "running add"
svn add *

With this script, I got the following output:

$ ./test

Committed revision 1.
Checked out revision 1.
property 'svn:ignore' set on 'wc'
Sending        wc

Committed revision 2.
running prop get
tmp
log
.xyz

running stat
?      this
running add
A         log
A         log\x.txt
A         this
A         this\x.txt
A         tmp
A         tmp\more.txt

I expected the following output for the running add part because I
ignored tmp and log.
A         this
A         this\x.txt

Since I didn't get that output, I obvious don't understand what I did. 

Can anybody explain this to me?

Richard

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


Re: svn:ignore question (with test script)

Posted by Ryan Schmidt <su...@ryandesign.com>.
On Feb 28, 2007, at 17:09, Hensley, Richard wrote:

[snip]

> echo "running stat"
> svn stat
> echo "running add"
> svn add *
>
> With this script, I got the following output:

[snip]

> running stat
> ?      this
> running add
> A         log
> A         log\x.txt
> A         this
> A         this\x.txt
> A         tmp
> A         tmp\more.txt
>
> I expected the following output for the running add part because I
> ignored tmp and log.
> A         this
> A         this\x.txt
>
> Since I didn't get that output, I obvious don't understand what I did.
>
> Can anybody explain this to me?

Your shell (not Subversion) expands the asterisk. By the time the  
shell is through with it, the command Subversion sees is:

svn add log this tmp

And since, as far as Subversion can tell, you explicitly told it to  
add those items, it will do so, even though it would have ignored  
them, had you not specified them explicitly.


-- 

To reply to the mailing list, please use your mailer's Reply To All  
function


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