You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by craigp <cr...@yahoo.com> on 2006/12/29 11:13:01 UTC

bug: svn add does not check svn:ignore (win32 v 1.4.2)

problem: 

svn add does not seem to check the svn:ignore property.

repro:

add CVS dir, foo.htm, bar.html in working dir
set svn:ignore prop on working dir to CVS *.htm

>svn status
?      bar.html

>svn status --no-ignore
?      bar.html
I      foo.htm
I      CVS

>svn add *
A         bar.html
A         CVS
A         CVS\Entries
A         CVS\Entries.Extra
A         CVS\Entries.Extra.Old
A         CVS\Entries.Old
A         CVS\Repository
A         CVS\Root
A         foo.htm

expected behaviour: 

svn should only add bar.html. foo.html and CVS/* should only be added
iff --no-ignore switch is added to 'svn add' cmd.

thanks,
--craig


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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

Re: bug: svn add does not check svn:ignore (win32 v 1.4.2)

Posted by "B. Smith-Mannschott" <be...@gmail.com>.
On Dec 29, 2006, at 12:13, craigp wrote:

> problem:
>
> svn add does not seem to check the svn:ignore property.
>
> repro:
>
> add CVS dir, foo.htm, bar.html in working dir
> set svn:ignore prop on working dir to CVS *.htm
>

- *.htm will not match bar.html because it won't match the final "l".  
Use *.html

- Each pattern should be on its own line in svn:ignore

   <http://svnbook.red-bean.com/nightly/en/ 
svn.advanced.props.html#svn.advanced.props.special.ignore>

// ben

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

Re: bug: svn add does not check svn:ignore (win32 v 1.4.2)

Posted by Andy Levy <an...@gmail.com>.
On 12/30/06, craigp <cr...@yahoo.com> wrote:
> >svn add . --force
>
> ok, thanks. that works, although it's a bit odd.  i now see that command in the
> docs under svn add, but i didn't see the shell filename-expansion override
> phenomenon explained under svn:ignore. for consistency's sake, i think it may
> not be a bad idea to allow:

It is, in a way (depends on how you read it I guess):
"Subversion uses the ignore patterns to determine which files should
not be swept into the version control system as part of a larger
recursive addition or import operation."

svn add . svn import, etc. are recursive addition/import operations.
svn add * is not, it's explicitly adding individual items.

Note that not all shells do this expansion. Certainly most do, but not all.

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

Re: bug: svn add does not check svn:ignore (win32 v 1.4.2)

Posted by craigp <cr...@yahoo.com>.
>svn add . --force

ok, thanks. that works, although it's a bit odd.  i now see that command in the
docs under svn add, but i didn't see the shell filename-expansion override
phonemonen explained under svn:ignore. for consistency's sake, i think it may
not be a bad idea to allow:

>svn add

without an arg, which would then work similarly as

>svn status

(and both currently work the same with a *), but as you point out, i can add
the --force flag. it's just not as intuitive; personally i'd prefer having to
specify --no-ignore explicitly rather than what amounts to an implicit
overriding.

thanks again,
--craig


--- Andy Levy <an...@gmail.com> wrote:

> On 12/29/06, craigp <cr...@yahoo.com> wrote:
> > problem:
> >
> > svn add does not seem to check the svn:ignore property.
> >
> > repro:
> >
> > add CVS dir, foo.htm, bar.html in working dir
> > set svn:ignore prop on working dir to CVS *.htm
> >
> > >svn status
> > ?      bar.html
> >
> > >svn status --no-ignore
> > ?      bar.html
> > I      foo.htm
> > I      CVS
> >
> > >svn add *
> > A         bar.html
> > A         CVS
> > A         CVS\Entries
> > A         CVS\Entries.Extra
> > A         CVS\Entries.Extra.Old
> > A         CVS\Entries.Old
> > A         CVS\Repository
> > A         CVS\Root
> > A         foo.htm
> >
> > expected behaviour:
> >
> > svn should only add bar.html. foo.html and CVS/* should only be added
> > iff --no-ignore switch is added to 'svn add' cmd.
> 
> This isn't a bug - Subversion is doing precisely what you've asked it to do.
> 
> Your shell is expanding the asterisk to all the filenames found. If
> you explicitly pass an ignored filename to svn add (which, by doing
> svn add *, you have effectively done), it will be added - Subversion
> takes you at your word that you really do want to add it. This is by
> design.
> 
> Had you done svn add . --force in an already-controlled directory,
> svn:ignore would have been honored.
> 
> I can't reach svnbook.org to double-check it, but I believe this is
> documented.
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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

Re: bug: svn add does not check svn:ignore (win32 v 1.4.2)

Posted by craigp <cr...@yahoo.com>.
>svn add . --force

ok, thanks. that works, although it's a bit odd.  i now see that command in the
docs under svn add, but i didn't see the shell filename-expansion override
phenomenon explained under svn:ignore. for consistency's sake, i think it may
not be a bad idea to allow:

>svn add

without an arg, which would then work similarly as

>svn status

(and both currently work the same with a *), but as you point out, i can add
the --force flag. it's just not as intuitive; personally i'd prefer having to
specify --no-ignore explicitly rather than what amounts to an implicit
overriding.

thanks again,
--craig


--- Andy Levy <an...@gmail.com> wrote:

> On 12/29/06, craigp <cr...@yahoo.com> wrote:
> > problem:
> >
> > svn add does not seem to check the svn:ignore property.
> >
> > repro:
> >
> > add CVS dir, foo.htm, bar.html in working dir
> > set svn:ignore prop on working dir to CVS *.htm
> >
> > >svn status
> > ?      bar.html
> >
> > >svn status --no-ignore
> > ?      bar.html
> > I      foo.htm
> > I      CVS
> >
> > >svn add *
> > A         bar.html
> > A         CVS
> > A         CVS\Entries
> > A         CVS\Entries.Extra
> > A         CVS\Entries.Extra.Old
> > A         CVS\Entries.Old
> > A         CVS\Repository
> > A         CVS\Root
> > A         foo.htm
> >
> > expected behaviour:
> >
> > svn should only add bar.html. foo.html and CVS/* should only be added
> > iff --no-ignore switch is added to 'svn add' cmd.
> 
> This isn't a bug - Subversion is doing precisely what you've asked it to do.
> 
> Your shell is expanding the asterisk to all the filenames found. If
> you explicitly pass an ignored filename to svn add (which, by doing
> svn add *, you have effectively done), it will be added - Subversion
> takes you at your word that you really do want to add it. This is by
> design.
> 
> Had you done svn add . --force in an already-controlled directory,
> svn:ignore would have been honored.
> 
> I can't reach svnbook.org to double-check it, but I believe this is
> documented.
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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

Re: bug: svn add does not check svn:ignore (win32 v 1.4.2)

Posted by Andy Levy <an...@gmail.com>.
On 12/29/06, craigp <cr...@yahoo.com> wrote:
> problem:
>
> svn add does not seem to check the svn:ignore property.
>
> repro:
>
> add CVS dir, foo.htm, bar.html in working dir
> set svn:ignore prop on working dir to CVS *.htm
>
> >svn status
> ?      bar.html
>
> >svn status --no-ignore
> ?      bar.html
> I      foo.htm
> I      CVS
>
> >svn add *
> A         bar.html
> A         CVS
> A         CVS\Entries
> A         CVS\Entries.Extra
> A         CVS\Entries.Extra.Old
> A         CVS\Entries.Old
> A         CVS\Repository
> A         CVS\Root
> A         foo.htm
>
> expected behaviour:
>
> svn should only add bar.html. foo.html and CVS/* should only be added
> iff --no-ignore switch is added to 'svn add' cmd.

This isn't a bug - Subversion is doing precisely what you've asked it to do.

Your shell is expanding the asterisk to all the filenames found. If
you explicitly pass an ignored filename to svn add (which, by doing
svn add *, you have effectively done), it will be added - Subversion
takes you at your word that you really do want to add it. This is by
design.

Had you done svn add . --force in an already-controlled directory,
svn:ignore would have been honored.

I can't reach svnbook.org to double-check it, but I believe this is documented.

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