You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by stug23 <pa...@gmail.com> on 2009/11/15 08:41:39 UTC

batch scripting to add svn:ignore values to a directory

A fairly common pattern for automation is to script the creation of a project
(in my case using a Maven archetype), followed by importing the project into
Subversion. After the project is imported the script would then set some
svn:ignore values on a specific sub-directory within the project source code
tree.

All of this should be possible without having to check out the project since
this is a lights-out batch script to create a project and put it into
Subversion.

My current sticking point is trying to get propedit to work with a script. I
tried using sed and could not get past the error "No changes to property
'svn:ignore'". I noted that in the past others posted with respect to this
problem and didn't appear to find a solution.

It does seem a bit peculiar that Subversion doesn't have a simple way to
automate this. Apparently propset has never been granted the ability to
remotely set properties due to philosophical issues. Nonetheless, this task
should be a no-brainer.

Any ideas on how to pull this off would be appreciated.

:handshake:
-- 
View this message in context: http://old.nabble.com/batch-scripting-to-add-svn%3Aignore-values-to-a-directory-tp26357390p26357390.html
Sent from the Subversion Users mailing list archive at Nabble.com.

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2418092

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].

Re: batch scripting to add svn:ignore values to a directory

Posted by stug23 <pa...@gmail.com>.
Do you know if there is a specific reason why svnmucc isn't a standard part
of the Subversion install?

That would make it much easier to enlist the use of svnmucc.

Thanks!


Alan Barrett wrote:
> 
> On Sun, 15 Nov 2009, stug23 wrote:
>> It does seem a bit peculiar that Subversion doesn't have a simple way to
>> automate this. Apparently propset has never been granted the ability to
>> remotely set properties due to philosophical issues. Nonetheless, this
>> task
>> should be a no-brainer.
> 
> svnmucc has a "propset" command.  Use it like this:
> 
>   svnmucc -r ${EXISTING_REVISION} -m "${MESSAGE}" \
> 	propset "${PROPERTY_NAME}" "${NEW_VALUE}" "${URL}"
> 
> svnmucc can be found in the contrib directory of the subversion
> source tree, but it's not built or installed by default.
> 
> --apb (Alan Barrett)
> 
> ------------------------------------------------------
> http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2418659
> 
> To unsubscribe from this discussion, e-mail:
> [users-unsubscribe@subversion.tigris.org].
> 
> 

-- 
View this message in context: http://old.nabble.com/batch-scripting-to-add-svn%3Aignore-values-to-a-directory-tp26357390p26459136.html
Sent from the Subversion Users mailing list archive at Nabble.com.

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2422864

Please start new threads on the <us...@subversion.apache.org> mailing list.
To subscribe to the new list, send an empty e-mail to <us...@subversion.apache.org>.

Re: batch scripting to add svn:ignore values to a directory

Posted by Alan Barrett <ap...@cequrux.com>.
On Sun, 15 Nov 2009, stug23 wrote:
> It does seem a bit peculiar that Subversion doesn't have a simple way to
> automate this. Apparently propset has never been granted the ability to
> remotely set properties due to philosophical issues. Nonetheless, this task
> should be a no-brainer.

svnmucc has a "propset" command.  Use it like this:

  svnmucc -r ${EXISTING_REVISION} -m "${MESSAGE}" \
	propset "${PROPERTY_NAME}" "${NEW_VALUE}" "${URL}"

svnmucc can be found in the contrib directory of the subversion
source tree, but it's not built or installed by default.

--apb (Alan Barrett)

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2418659

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].

Re: batch scripting to add svn:ignore values to a directory

Posted by stug23 <pa...@gmail.com>.
My current script looks something like this:

svn propedit svn:ignore --editor-cmd "sleep 2;sed -f script.sed" URL


stug23 wrote:
> 
> A fairly common pattern for automation is to script the creation of a
> project (in my case using a Maven archetype), followed by importing the
> project into Subversion. After the project is imported the script would
> then set some svn:ignore values on a specific sub-directory within the
> project source code tree.
> 
> All of this should be possible without having to check out the project
> since this is a lights-out batch script to create a project and put it
> into Subversion.
> 
> My current sticking point is trying to get propedit to work with a script.
> I tried using sed and could not get past the error "No changes to property
> 'svn:ignore'". I noted that in the past others posted with respect to this
> problem and didn't appear to find a solution.
> 
> It does seem a bit peculiar that Subversion doesn't have a simple way to
> automate this. Apparently propset has never been granted the ability to
> remotely set properties due to philosophical issues. Nonetheless, this
> task should be a no-brainer.
> 
> Any ideas on how to pull this off would be appreciated.
> 
> :handshake:
> 

-- 
View this message in context: http://old.nabble.com/batch-scripting-to-add-svn%3Aignore-values-to-a-directory-tp26357390p26357398.html
Sent from the Subversion Users mailing list archive at Nabble.com.

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2418093

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].

Re: batch scripting to add svn:ignore values to a directory

Posted by stug23 <pa...@gmail.com>.
Ryan asked "Why can't you check out a working copy, "svn propset" the
properties, then commit?"

That is what I ended up doing. But this requires extra steps and is kinda
clunky. I do appreciate that Subversion views changing svn:ignore values as
a change to an existing project. But again, this is for automating a 'new'
project import wherein some svn:ignore properties need to be applied to a
specific directory.

I can live with the workaround, thanks for the suggestion.



Ryan Schmidt-60 wrote:
> 
> On Nov 15, 2009, at 02:41, stug23 wrote:
> 
>> A fairly common pattern for automation is to script the creation of a
>> project
>> (in my case using a Maven archetype), followed by importing the project
>> into
>> Subversion. After the project is imported the script would then set some
>> svn:ignore values on a specific sub-directory within the project source
>> code
>> tree.
>> 
>> All of this should be possible without having to check out the project
>> since
>> this is a lights-out batch script to create a project and put it into
>> Subversion.
>> 
>> My current sticking point is trying to get propedit to work with a
>> script. I
>> tried using sed and could not get past the error "No changes to property
>> 'svn:ignore'". I noted that in the past others posted with respect to
>> this
>> problem and didn't appear to find a solution.
>> 
>> It does seem a bit peculiar that Subversion doesn't have a simple way to
>> automate this. Apparently propset has never been granted the ability to
>> remotely set properties due to philosophical issues. Nonetheless, this
>> task
>> should be a no-brainer.
> 
> Why can't you check out a working copy, "svn propset" the properties, then
> commit?
> 
> ------------------------------------------------------
> http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2418274
> 
> To unsubscribe from this discussion, e-mail:
> [users-unsubscribe@subversion.tigris.org].
> 
> 

-- 
View this message in context: http://old.nabble.com/batch-scripting-to-add-svn%3Aignore-values-to-a-directory-tp26357390p26459123.html
Sent from the Subversion Users mailing list archive at Nabble.com.

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2422862

Please start new threads on the <us...@subversion.apache.org> mailing list.
To subscribe to the new list, send an empty e-mail to <us...@subversion.apache.org>.

Re: batch scripting to add svn:ignore values to a directory

Posted by Ryan Schmidt <su...@ryandesign.com>.
On Nov 15, 2009, at 02:41, stug23 wrote:

> A fairly common pattern for automation is to script the creation of a project
> (in my case using a Maven archetype), followed by importing the project into
> Subversion. After the project is imported the script would then set some
> svn:ignore values on a specific sub-directory within the project source code
> tree.
> 
> All of this should be possible without having to check out the project since
> this is a lights-out batch script to create a project and put it into
> Subversion.
> 
> My current sticking point is trying to get propedit to work with a script. I
> tried using sed and could not get past the error "No changes to property
> 'svn:ignore'". I noted that in the past others posted with respect to this
> problem and didn't appear to find a solution.
> 
> It does seem a bit peculiar that Subversion doesn't have a simple way to
> automate this. Apparently propset has never been granted the ability to
> remotely set properties due to philosophical issues. Nonetheless, this task
> should be a no-brainer.

Why can't you check out a working copy, "svn propset" the properties, then commit?

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2418274

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].