You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Pericius <pe...@gmail.com> on 2009/08/30 23:25:07 UTC
Ignore on commit
How to always stop particular files (already versioned) from being
commited? Yes, I am aware these files should be templates, but that
was not my call.
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2388709
To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].
Re: Ignore on commit
Posted by Ryan Schmidt <su...@ryandesign.com>.
On Aug 31, 2009, at 05:37, Andy Levy wrote:
> On Sun, Aug 30, 2009 at 19:25, Pericius wrote:
>
>> How to always stop particular files (already versioned) from being
>> commited? Yes, I am aware these files should be templates, but that
>> was not my call.
>
> Only by not specifying them as being part of the commit.
You can enforce it on the server side by writing a pre-commit hook. In
it, you could use "svnlook changed" to see if any of your prohibited
files are part of the commit, and if so, reject it. If you want to
allow occasional commits to these files by people who know what
they're doing, you could add mechanisms to allow the commit to happen,
for example based on the username or by checking for a particular
keyword in the log message.
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2388836
To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].
Re: Ignore on commit
Posted by Andy Levy <an...@gmail.com>.
On Sun, Aug 30, 2009 at 19:25, Pericius<pe...@gmail.com> wrote:
> How to always stop particular files (already versioned) from being
> commited? Yes, I am aware these files should be templates, but that
> was not my call.
Only by not specifying them as being part of the commit.
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2388832
To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].
RE: Ignore on commit
Posted by yasin motcu <ya...@gmail.com>.
as said you can use svnlook changed command, and you can use this simple python code in pre-commit hook to prevent.
def checkifpomxml(str):
if(str.endswtih('pom.xml\n'))
return 0
files = '%s changed -t "%s" "%s" % SVNLOOK,txn,repos)'
f =os.popen(files,'r')
for line in f:
control=checkifpomxml(line)
if control==0:
sys.stderr.write("u cannot commit this file")
sys.exit(1)
> How to always stop particular files (already versioned) from being
> commited? Yes, I am aware these files should be templates, but that
> was not my call.
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2390559
To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].