Windows, svn propset svn:ignore *

5 views
Skip to first unread message

Daniel Sahlberg

unread,
Aug 26, 2022, 3:59:52 AMAug 26
to Subversion
Hi,

Using Subversion "trunk" on Windows built from TortoiseSVN.

I would like to set the svn:ignore property to * on a certain directory. (I'm trying to ignore everything since I'd only want to explicitly add a few subdirectories).

I thought this would do the trick
C:\wc>svn propset svn:ignore * directoryname

But alas it expands the * to all files in the current directory. I'd like to quote the * so the property is set to exactly *. I've found ways to quote the * (for example '*') but in those cases the property is set to also include the quotes.

I've digged around and found a few messages in the archive indicating that Subversion on Windows is using setargv.obj and then the following thread on Stackoverflow [1] indicating that setargv.obj doesn't have a way to avoid wildcard expansion.

Does anyone have a trick up the sleve?

The following seems to work but it feels a bit unintuitive:
echo * | svn propset -F - svn:ignore directoryname

Kind regards,
Daniel




Jon Daley via users

unread,
Aug 26, 2022, 9:15:13 AMAug 26
to Daniel Sahlberg, Subversion
I don't use Windows, so I can't help you on the escaping of the *, but I
often use propedit, rather than propset (partly because I can never
remember the order of the directory and the property value), so that would
be easy enough for a one-off solution.

Also, if you are using TortoiseSVN, can't you just right-click the
directory and set the property that way and avoid the command-line usage
entirely?
--
Jon Daley
https://jon.limedaley.com
~~
You're just jealous because the voices are talking to me.

Daniel Sahlberg

unread,
Aug 28, 2022, 8:40:29 AMAug 28
to Jon Daley, Subversion
Den fre 26 aug. 2022 kl 15:13 skrev Jon Daley <subve...@jon.limedaley.com>:
I don't use Windows, so I can't help you on the escaping of the *, but I
often use propedit, rather than propset (partly because I can never
remember the order of the directory and the property value), so that would
be easy enough for a one-off solution.

Also, if you are using TortoiseSVN, can't you just right-click the
directory and set the property that way and avoid the command-line usage
entirely?

I missed a critical point: This is run as part of an automated script (a BAT file). Both the suggestions above work fine, except they require manual input in the middle of the script which I'm trying to avoid.

Thanks for bringing up these options!

/Daniel

Branko Čibej

unread,
Aug 28, 2022, 8:57:09 AMAug 28
to us...@subversion.apache.org
Write the * to a temporary file and use 'svn propset -F'.

-- Brane

Daniel Shahaf

unread,
Aug 28, 2022, 4:00:16 PMAug 28
to us...@subversion.apache.org
Jon Daley via users wrote on Fri, 26 Aug 2022 13:13 +00:00:
> I don't use Windows, so I can't help you on the escaping of the *, but I
> often use propedit, rather than propset (partly because I can never
> remember the order of the directory and the property value),

Usually (not just in svn) the directory / local file target is last.
This makes it easy to pass multiple targets, or to invoke the command
via xargs(1), etc..

Also, it plays well with various shells' M-. keybinding to insert the
last command's last word again.
Reply all
Reply to author
Forward
0 new messages