[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

RE: Ignore on commit

From: yasin motcu <yasinmotcu_at_gmail.com>
Date: Thu, 3 Sep 2009 01:17:48 -0700 (PDT)

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_at_subversion.tigris.org].
Received on 2009-09-03 14:46:58 CEST

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.