You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by craigp <cr...@yahoo.com> on 2006/12/25 03:58:20 UTC

bug: svn add does not check svn:ignore (win32 v 1.4,2)

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: only add bar.html; foo.html and CVS/* should only be added
if --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: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: bug: svn add does not check svn:ignore (win32 v 1.4,2)

Posted by Daniel Rall <dl...@collab.net>.
On Fri, 29 Dec 2006, Ionel GARDAIS wrote:

> OK so on the one hand, 'svn add *' makes the shell
> expand the wildcard to all filenames and svn:ignore is
> ignored because files are explicitly listed on the
> commandline.
> On the other hand, svn does not understand '*' as a
> glob.
> 
> How to simply do a bulk add ?
> I think of a script that do a 'svn status' then 'grep'
> it to retrieve all lines that start with a question
> mark and finally issue a 'svn add' (one for all files
> or one fo each). It looks hard for such a simple
> thing.
> 
> Or maybe I drunk too much Champagne ...

You understand the situation just fine.  :)

RE : Re: bug: svn add does not check svn:ignore (win32 v 1.4,2)

Posted by Ionel GARDAIS <ig...@yahoo.fr>.
OK so on the one hand, 'svn add *' makes the shell
expand the wildcard to all filenames and svn:ignore is
ignored because files are explicitly listed on the
commandline.
On the other hand, svn does not understand '*' as a
glob.

How to simply do a bulk add ?
I think of a script that do a 'svn status' then 'grep'
it to retrieve all lines that start with a question
mark and finally issue a 'svn add' (one for all files
or one fo each). It looks hard for such a simple
thing.

Or maybe I drunk too much Champagne ...

Cheers,
Ionel


--- Daniel Rall <dl...@collab.net> a écrit :

> On Fri, 29 Dec 2006, Ionel GARDAIS wrote:
> 
> > And the only solution is to escape the '*' with a
> '\'
> > ?
> > As most shells do wildcard expansion on their own,
> I
> > understand Craig's point of view where the
> svn:ignore
> > property should be used even if the file is
> explicitly
> > named on the command line.
> 
> If you did escape '*', Subversion is not going to
> understand it as a
> glob.  Instead, Subversion will consider it a file
> name (for a missing
> file).
> 
> Craig wants Subversion to ignore anything from the
> list of patterns
> named in the "svn:ignore" property, regardless of
> whether they're
> listed explicitly on the command-line.
> 
> > And a "--no-ignore" switch will need to be used to
> > override this.
> 


__________________________________________________
Do You Yahoo!?
En finir avec le spam? Yahoo! Mail vous offre la meilleure protection possible contre les messages non sollicités 
http://mail.yahoo.fr Yahoo! Mail 

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

Re: bug: svn add does not check svn:ignore (win32 v 1.4,2)

Posted by Daniel Rall <dl...@collab.net>.
On Fri, 29 Dec 2006, Ionel GARDAIS wrote:

> And the only solution is to escape the '*' with a '\'
> ?
> As most shells do wildcard expansion on their own, I
> understand Craig's point of view where the svn:ignore
> property should be used even if the file is explicitly
> named on the command line.

If you did escape '*', Subversion is not going to understand it as a
glob.  Instead, Subversion will consider it a file name (for a missing
file).

Craig wants Subversion to ignore anything from the list of patterns
named in the "svn:ignore" property, regardless of whether they're
listed explicitly on the command-line.

> And a "--no-ignore" switch will need to be used to
> override this.

RE : Re: bug: svn add does not check svn:ignore (win32 v 1.4,2)

Posted by Ionel GARDAIS <ig...@yahoo.fr>.
And the only solution is to escape the '*' with a '\'
?
As most shells do wildcard expansion on their own, I
understand Craig's point of view where the svn:ignore
property should be used even if the file is explicitly
named on the command line.
And a "--no-ignore" switch will need to be used to
override this.

Ionel


--- Justin Erenkrantz <ju...@erenkrantz.com> a
écrit :

> On 12/29/06, craigp <cr...@yahoo.com> wrote:
> > that's not how i would have expected it to work.
> if i specifically set it to
> > ignore, say, everything that matches 'CVS', then
> it shouldn't add anything that
> > matches 'CVS' unless i explicitly override it.
> isn't that what svn:ignore is
> > for? if not, what use is it, and is there some
> other way to filter a large set
> > of files other than writing my own script?
> 
> But, you *are* overriding it by passing CVS on the
> command line.  -- justin
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> dev-unsubscribe@subversion.tigris.org
> For additional commands, e-mail:
> dev-help@subversion.tigris.org
> 
> 


__________________________________________________
Do You Yahoo!?
En finir avec le spam? Yahoo! Mail vous offre la meilleure protection possible contre les messages non sollicités 
http://mail.yahoo.fr Yahoo! Mail 

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

Re: bug: svn add does not check svn:ignore (win32 v 1.4,2)

Posted by Justin Erenkrantz <ju...@erenkrantz.com>.
On 12/29/06, craigp <cr...@yahoo.com> wrote:
> that's not how i would have expected it to work. if i specifically set it to
> ignore, say, everything that matches 'CVS', then it shouldn't add anything that
> matches 'CVS' unless i explicitly override it. isn't that what svn:ignore is
> for? if not, what use is it, and is there some other way to filter a large set
> of files other than writing my own script?

But, you *are* overriding it by passing CVS on the command line.  -- justin

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

Re: bug: svn add does not check svn:ignore (win32 v 1.4,2)

Posted by craigp <cr...@yahoo.com>.
that's not how i would have expected it to work. if i specifically set it to
ignore, say, everything that matches 'CVS', then it shouldn't add anything that
matches 'CVS' unless i explicitly override it. isn't that what svn:ignore is
for? if not, what use is it, and is there some other way to filter a large set
of files other than writing my own script?

thanks,
--craig

--- Mark Phippard <ma...@gmail.com> wrote:

> On 12/24/06, craigp <cr...@yahoo.com> wrote:
> >
> > 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: only add bar.html; foo.html and CVS/* should only be
> > added
> > if --no-ignore switch is added to 'svn add' cmd.
> 
> 
> Let's simplify this a bit.  If you ran this command:
> 
> svn add foo.htm
> 
> Then the file would be added even though *.htm matches the ignore pattern.
> It does this because you explicitly said to add the file.
> 
> When you run svn add *, the * is not passed into Subversion, where it then
> figures out the files.  Instead, the command shell expands the * and passes
> the resolved value to the command.  So the net effect is that the command
> that actually gets run is this:
> 
> svn add bar.html CVS foo.htm
> 
> In which case, the expected behavior would be for all of the items to be
> added.
> 
> -- 
> Thanks
> 
> Mark Phippard
> http://markphip.blogspot.com/
> 


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

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

Re: bug: svn add does not check svn:ignore (win32 v 1.4,2)

Posted by Mark Phippard <ma...@gmail.com>.
On 12/24/06, craigp <cr...@yahoo.com> wrote:
>
> 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: only add bar.html; foo.html and CVS/* should only be
> added
> if --no-ignore switch is added to 'svn add' cmd.


Let's simplify this a bit.  If you ran this command:

svn add foo.htm

Then the file would be added even though *.htm matches the ignore pattern.
It does this because you explicitly said to add the file.

When you run svn add *, the * is not passed into Subversion, where it then
figures out the files.  Instead, the command shell expands the * and passes
the resolved value to the command.  So the net effect is that the command
that actually gets run is this:

svn add bar.html CVS foo.htm

In which case, the expected behavior would be for all of the items to be
added.

-- 
Thanks

Mark Phippard
http://markphip.blogspot.com/