You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Martin Fuchs <fu...@gmail.com> on 2005/09/11 09:05:19 UTC

Feature request: svn ignore

To configure the svn:ignore property on the command line one can use
the "svn propset" command. It is even possible to specify the "-F"
option and read a list of file patterns from a prepared file. But this
is a all-or-nothing way: One must always give the full list of file
patterns to "svn propset".

I would like to propose a new command "svn ignore" to extend the list
of ignored file patterns by one or more entries. This is the syntax of
the new command:

svn ignore <path> <file pattern list>

The following example commands give an application case for adding a
new directory to the repository:

svn ignore . Debug
svn ignore . Release
svn ignore . *.log
svn ignore . *.exe
svn ignore . *.pdb *.map
svn ignore . *.ncb *.opt

Each execution of the "svn ignore" command reads the current
svn:ignore property of the current directory "." and extends it by the
listed file patterns.
If the svn:ignore property for the current directory was empty or not
existing before the execution of the command list above, it would
result in the full list of file patterns to ignore:

Debug
Release
*.log
*.exe
*.pdb
*.map
*.ncb
*.opt

What do you think: Shall I create a new entry in the issue tracker for
this feature request?

Regards,

    Martin

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


Re: Feature request: svn ignore

Posted by Vincent Starre <vs...@comcast.net>.
> This can the easily be done with any script, or bash alias for
> example. Why bloat the CUI with duplicating commands?


That's a funamental difference of opinion which can apply to absolutely 
any situation and cannot be argued one way or the other.

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

Re: Feature request: svn ignore

Posted by Kalin KOZHUHAROV <ka...@thinrope.net>.
Martin Fuchs wrote:
> 2005/9/11, Vincent Starre <vs...@comcast.net>:
> 
>>This completely misses its own point. What you really want is an 'svn
>>propappend', taking a --delimiter argument (defaulting to \n), and an
>>optional --word-split (meaning "also add the delimiter after each argument"
>>from past talks on IRC, I believe this has already been proposed.
> 
> 
> OK - a command "svn propappend" would also do the work. But why not
> also implement "svn ignore" as a handy shortcut? And IMHO it would not
> be very difficult just to call the more general "propappend" routine
> in the implementation.

This can the easily be done with any script, or bash alias for
example. Why bloat the CUI with duplicating commands?

Kalin.

-- 
|[ ~~~~~~~~~~~~~~~~~~~~~~ ]|
+-> http://ThinRope.net/ <-+
|[ ______________________ ]|



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

Re: Feature request: svn ignore

Posted by Martin Fuchs <fu...@gmail.com>.
2005/9/11, Vincent Starre <vs...@comcast.net>:
> This completely misses its own point. What you really want is an 'svn
> propappend', taking a --delimiter argument (defaulting to \n), and an
> optional --word-split (meaning "also add the delimiter after each argument"
> from past talks on IRC, I believe this has already been proposed.

OK - a command "svn propappend" would also do the work. But why not
also implement "svn ignore" as a handy shortcut? And IMHO it would not
be very difficult just to call the more general "propappend" routine
in the implementation.

Regards,

  Martin

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


Re: Feature request: svn ignore

Posted by Martin Fuchs <fu...@gmail.com>.
Hello again,

2005/9/11, Vincent Starre <vs...@comcast.net>:
> This completely misses its own point. What you really want is an 'svn
> propappend', taking a --delimiter argument (defaulting to \n), and an
> optional --word-split (meaning "also add the delimiter after each argument"
> from past talks on IRC, I believe this has already been proposed.

I looked, but could not find an entry about "svn propappend" or "svn
propset --append" in the issue tracker. So I don't think there is
currently working someone on this.
I could only find the following thread in the mailing list archive:

http://svn.haxx.se/dev/archive-2005-02/0107.shtml

It merely ended with the concession to add a script to the "contrib"
folder, which covers the proposed functionality. But seems nothing in
that direction happened until now.
My personal opinion is, it would be better to integrate the command
(or a new option for the propset command) directly in the svn command
line client instead of some python script. The script solution may be
convenient for some power users working in Unix environments. But the
"ordinary user" just looks into the "svn help" output to find a
functionality to configure the files to ignore, and expects such a
functionality directly in the svn executable.
By the way - TortoiseSVN already includes the "ignore files/folders"
function. You can launch it using the explorer context menu, or you
can launch it in the "commit" dialog. Very convenient!  :-)
But what is missing is the possibility to achieve the same from the
command line.

Regards,

    Martin

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


Re: Feature request: svn ignore

Posted by Vincent Starre <vs...@comcast.net>.
This completely misses its own point. What you really want is an 'svn 
propappend', taking a --delimiter argument (defaulting to \n), and an 
optional --word-split (meaning "also add the delimiter after each argument"
from past talks on IRC, I believe this has already been proposed.

Martin Fuchs wrote:

>To configure the svn:ignore property on the command line one can use
>the "svn propset" command. It is even possible to specify the "-F"
>option and read a list of file patterns from a prepared file. But this
>is a all-or-nothing way: One must always give the full list of file
>patterns to "svn propset".
>
>I would like to propose a new command "svn ignore" to extend the list
>of ignored file patterns by one or more entries. This is the syntax of
>the new command:
>
>svn ignore <path> <file pattern list>
>
>The following example commands give an application case for adding a
>new directory to the repository:
>
>svn ignore . Debug
>svn ignore . Release
>svn ignore . *.log
>svn ignore . *.exe
>svn ignore . *.pdb *.map
>svn ignore . *.ncb *.opt
>
>Each execution of the "svn ignore" command reads the current
>svn:ignore property of the current directory "." and extends it by the
>listed file patterns.
>If the svn:ignore property for the current directory was empty or not
>existing before the execution of the command list above, it would
>result in the full list of file patterns to ignore:
>
>Debug
>Release
>*.log
>*.exe
>*.pdb
>*.map
>*.ncb
>*.opt
>
>What do you think: Shall I create a new entry in the issue tracker for
>this feature request?
>
>Regards,
>
>    Martin
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
>For additional commands, e-mail: users-help@subversion.tigris.org
>
>
>  
>


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

Re: Feature request: svn ignore

Posted by Martin Fuchs <fu...@gmail.com>.
2005/9/11, Ryan Schmidt <su...@ryandesign.com>:
> When I think about some of the other subcommands, I notice that the
> directory on which they operate is specified last, and that if this
> is omitted, they operate on . by default. In your svn ignore
> proposal, the directory is specified first, which is inconsistent and
> doesn't allow this (probably oft-desired) default case. To fix it
> would require, however, that you only specify one glob per svn ignore
> invocation.

Correct. That is why I chose to put the directory at the first
position. Another possibility would be the following syntax:

svn ignore [-d path] <file pattern list>

This would make the target directory optional. In the common case
(modifying the properties of the current directory) one can just omit
it:

svn ignore Debug Release "*.log" "*.exe" "*.pdb" "*.map" "*.ncb" "*.opt"

> In any case, you'll have to protect the glob with quotes, else the
> shell will want to expand it before passing it to svn ignore.

Correct. That's at least the standard behaviour of shell commands on
Unix systems.

> If you can add entries to svn:ignore this way, do we also need a way
> to remove entries from there?
> 
> svn unignore '*.log'
> or
> svn remember '*.log'

We could just use an option like "-u" to switch from "ignore" to
"unignore" mode:

svn ignore [-d path] -u <file pattern list>

Regards,

     Martin

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


Re: Feature request: svn ignore

Posted by Ryan Schmidt <su...@ryandesign.com>.
On Sep 11, 2005, at 11:05, Martin Fuchs wrote:

> I would like to propose a new command "svn ignore" to extend the list
> of ignored file patterns by one or more entries. This is the syntax of
> the new command:
>
> svn ignore <path> <file pattern list>
>
> The following example commands give an application case for adding a
> new directory to the repository:
>
> svn ignore . Debug
> svn ignore . Release
> svn ignore . *.log
> svn ignore . *.exe
> svn ignore . *.pdb *.map
> svn ignore . *.ncb *.opt

When I think about some of the other subcommands, I notice that the  
directory on which they operate is specified last, and that if this  
is omitted, they operate on . by default. In your svn ignore  
proposal, the directory is specified first, which is inconsistent and  
doesn't allow this (probably oft-desired) default case. To fix it  
would require, however, that you only specify one glob per svn ignore  
invocation.

In any case, you'll have to protect the glob with quotes, else the  
shell will want to expand it before passing it to svn ignore.

svn ignore '*.log'
svn ignore '*.exe' some/dir/

If you can add entries to svn:ignore this way, do we also need a way  
to remove entries from there?

svn unignore '*.log'
or
svn remember '*.log'

You can, you know, always use svn propedit instead of svn propset. I  
think that probably covers your intended uses without the need to  
introduce a new special-case command.



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

Re: Feature request: svn ignore

Posted by Martin Fuchs <fu...@gmail.com>.
Hi Dave,

2005/9/11, Dale R. Worley <dw...@pingtel.com>:
> On Sun, 2005-09-11 at 10:04 -0600, Bob Proulx wrote:
> > I was catching up on reading this list today with the specific purpose
> > of suggesting such functionality myself!  I have been filling out
> > trees of directories a lot lately and the need to fully set without
> > appending the svn:ignore property has been tedious.  Thanks for
> > starting the discussion on this feature.
> 
> I wrote the attached script to add elements to svn:ignore.  In addition
> to the functionality people have been talking about, I set it up to
> automatically determine which directory's svn:ignore needs to be
> notified, and it keeps the svn:ignore entries in alphabetical order.

thanks very much for your script. Well, it's "only" a unix compatible
shell script. But do you mind trying to get it into the "contrib"
folder of the SVN distribution like discussed in the last mail?

Regards,

   Martin

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


Re: Feature request: svn ignore

Posted by "Dale R. Worley" <dw...@pingtel.com>.
On Sun, 2005-09-11 at 10:04 -0600, Bob Proulx wrote:
> I was catching up on reading this list today with the specific purpose
> of suggesting such functionality myself!  I have been filling out
> trees of directories a lot lately and the need to fully set without
> appending the svn:ignore property has been tedious.  Thanks for
> starting the discussion on this feature.

I wrote the attached script to add elements to svn:ignore.  In addition
to the functionality people have been talking about, I set it up to
automatically determine which directory's svn:ignore needs to be
notified, and it keeps the svn:ignore entries in alphabetical order.

Dale


Re: Feature request: svn ignore

Posted by Bob Proulx <bo...@proulx.com>.
Martin Fuchs wrote:
> I would like to propose a new command "svn ignore" to extend the list
> of ignored file patterns by one or more entries. This is the syntax of
> the new command:
> 
> svn ignore <path> <file pattern list>

I was catching up on reading this list today with the specific purpose
of suggesting such functionality myself!  I have been filling out
trees of directories a lot lately and the need to fully set without
appending the svn:ignore property has been tedious.  Thanks for
starting the discussion on this feature.

Bob

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

Re: Feature request: svn ignore

Posted by Vincent Starre <vs...@comcast.net>.
Martin Fuchs wrote:

>2005/9/11, Erik Huelsmann <eh...@gmail.com>:
>  
>
>>On 9/11/05, Martin Fuchs <fu...@gmail.com> wrote:
>>    
>>
>>>To configure the svn:ignore property on the command line one can use
>>>the "svn propset" command. It is even possible to specify the "-F"
>>>option and read a list of file patterns from a prepared file. But this
>>>is a all-or-nothing way: One must always give the full list of file
>>>patterns to "svn propset".
>>>      
>>>
>>How about "svn propedit" which lets you edit+extend the current property value?
>>    
>>
>
>The problem with "svn propedit" is, you can't use it in batch files -
>it needs an  interactive input. Well, may be one could use it in
>conjunction with SED. But my main environment is Windows, so that's a
>bit of a problem.  ;-)
>
>Regards,
>
>   Martin
>
>  
>
While this certainly is no excuse, and I still think svn should have a 
"propappend" command, it's worth pointing out that perl does exist on 
windows ;)

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

Re: Feature request: svn ignore

Posted by Martin Fuchs <fu...@gmail.com>.
2005/9/11, Erik Huelsmann <eh...@gmail.com>:
> On 9/11/05, Martin Fuchs <fu...@gmail.com> wrote:
> > To configure the svn:ignore property on the command line one can use
> > the "svn propset" command. It is even possible to specify the "-F"
> > option and read a list of file patterns from a prepared file. But this
> > is a all-or-nothing way: One must always give the full list of file
> > patterns to "svn propset".
> 
> How about "svn propedit" which lets you edit+extend the current property value?

The problem with "svn propedit" is, you can't use it in batch files -
it needs an  interactive input. Well, may be one could use it in
conjunction with SED. But my main environment is Windows, so that's a
bit of a problem.  ;-)

Regards,

   Martin

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


Re: Feature request: svn ignore

Posted by Erik Huelsmann <eh...@gmail.com>.
On 9/11/05, Martin Fuchs <fu...@gmail.com> wrote:> To configure the svn:ignore property on the command line one can use> the "svn propset" command. It is even possible to specify the "-F"> option and read a list of file patterns from a prepared file. But this> is a all-or-nothing way: One must always give the full list of file> patterns to "svn propset".
How about "svn propedit" which lets you edit+extend the current property value?
bye,
Erik.

Re: Feature request: svn ignore

Posted by Mark Parker <ma...@msdhub.com>.
Dale R. Worley wrote:
> Windows batch files are less powerful than Unix scripting, but I expect
> that you can do something like that one Windows as well.
> 
> Dale

svn propget svn:ignore %dir% > temp-file
echo %file% >> temp-file
svn propset svn:ignore -F temp-file %dir%

I didn't test this, but I believe it should work.

Mark


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

Re: Feature request: svn ignore

Posted by "Dale R. Worley" <dw...@pingtel.com>.
On Sun, 2005-09-11 at 11:05 +0200, Martin Fuchs wrote:
> svn ignore . Debug
> svn ignore . Release
> svn ignore . *.log
> svn ignore . *.exe
> svn ignore . *.pdb *.map
> svn ignore . *.ncb *.opt

Of course, you would have to quote the wildcards:

svn ignore . '*.log'

etc.

Although it seems that you could implement a "propappend" fairly easily
yourself with soemthing like

( echo $FILE ; svn propget svn:ignore $DIR ) >temp-file
svn propset svn:ignore -F temp-file $DIR

Windows batch files are less powerful than Unix scripting, but I expect
that you can do something like that one Windows as well.

Dale



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