資源簡介
包含內容:
郵件通知
強制寫日志
禁止修改log
..............

代碼片段和文件信息
#!/usr/bin/python
#?-*-?coding:?utf-8?-*-
#?====================================================================
#?Copyright?(c)?2000-2005?Collab?Net.??All?rights?reserved.
#
#?This?software?is?licensed?as?described?in?the?file?COPYING?which
#?you?should?have?received?as?part?of?this?distribution.??The?terms
#?are?also?available?at?http://subversion.tigris.org/license-1.html.
#?If?newer?versions?of?this?license?are?posted?there?you?may?use?a
#?newer?version?instead?at?your?option.
#
#?This?software?consists?of?voluntary?contributions?made?by?many
#?individuals.??For?exact?contribution?history?see?the?revision
#?history?and?logs?available?at?http://subversion.tigris.org/.
#?====================================================================
#?This?script?can?be?called?from?a?pre-commit?hook?on?either?Windows?or?a?Unix
#?like?operating?system.??It?implements?the?checks?required?to?ensure?that?the
#?repository?acts?in?a?way?which?is?compatible?with?a?case?preserving?but
#?case?insensitive?file?system.
#
#?When?a?file?is?added?this?script?checks?the?file?tree?in?the?repository?for
#?files?which?would?be?the?same?name?on?a?case?insensitive?file?system?and
#?rejects?the?commit.
#
#?On?a?Unix?system?put?this?script?in?the?hooks?directory?and?add?this?to?the
#?pre-commit?script:
#
#??$REPOS/hooks/check-case-insensitive.py?“$REPOS“?“$TXN“?||?exit?1
#
#?On?a?windows?machine?add?this?to?pre-commit.bat:
#
#??python?ript>\check-case-insensitive.py?%1?%2
#??if?errorlevel?1?goto?:ERROR
#??exit?0
#??:ERROR
#??echo?Error?found?in?commit?1>&2
#??exit?1
#
#?Make?sure?the?python?bindigs?are?installed?and?working?on?Windows.??The?zip
#?file?can?be?downloaded?from?the?Subversion?site.??The?bindings?depend?on
#?dll‘s?shipped?as?part?of?the?Subversion?binaries?if?the?script?cannot?load
#?the?_fs?dll?it?is?because?it?cannot?find?the?other?Subversion?dll‘s.
#
#?If?you?have?any?problems?with?this?script?feel?free?to?contact
#?Martin?Tomes:?martin?at?tomes?dot?org?dot?uk
import?sys
#?Set?this?to?point?to?your?install?of?the?Subversion?languange?bindings
#?for?Python:
#SVNLIB_DIR?=?r“C:/svnpy/svn-win32-1.2.0/python/“
SVNLIB_DIR?=?r“/usr/local/lib/svn-python/“
if?SVNLIB_DIR:
??sys.path.insert(0?SVNLIB_DIR)
import?os.path
import?string
from?svn?import?fs?core?repos?delta
#?Set?this?True?for?debug?output.
debug?=?False
#?An?existat?of?0?means?all?is?well?1?means?there?are?name?conflicts.
exitstat?=?0
#?This?is?stolen?from?the?svnlook.py?example.??All?that?is?not?needed?has?been
#?stripped?out?and?it?returns?data?rather?than?printing?it.
class?SVNLook:
??def?__init__(self?pool?path?cmd?rev?txn):
????self.pool?=?pool
????repos_ptr?=?repos.open(path?pool)
????self.fs_ptr?=?repos.fs(repos_ptr)
????if?txn:
??????self.txn_ptr?=?fs.open_txn(self.fs_ptr?txn?pool)
????else:
??????self.txn_ptr?=?None
??????if?rev?is?None:
????????rev?=?fs.youngest_rev(self.fs_ptr?pool)
????self.rev?=?rev
??def?cmd_changed(self):
????return?self._print_tree(Change
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件???????2809??2009-03-18?21:23??hooks\post-commit..txt
?????文件????????390??2009-03-18?21:23??hooks\post-commit.bat
?????文件???????2813??2009-03-18?21:23??hooks\post-commit.tmpl
?????文件???????1696??2009-03-18?21:23??hooks\post-lock..txt
?????文件???????1696??2009-03-18?21:23??hooks\post-lock.tmpl
?????文件???????2343??2009-03-18?21:23??hooks\post-revprop-change..txt
?????文件???????2341??2009-03-18?21:23??hooks\post-revprop-change.tmpl
?????文件???????1625??2009-03-18?21:23??hooks\post-unlock..txt
?????文件???????1625??2009-03-18?21:24??hooks\post-unlock.tmpl
?????文件???????3297??2009-03-18?21:24??hooks\pre-commit..txt
?????文件????????963??2009-03-18?21:24??hooks\pre-commit.bat
?????文件???????3297??2009-03-18?21:24??hooks\pre-commit.tmpl
?????文件???????2115??2009-03-18?21:24??hooks\pre-lock.txt
?????文件???????2115??2009-03-18?21:24??hooks\pre-lock..txt
?????文件???????2764??2009-03-18?21:24??hooks\pre-revprop-change..txt
?????文件????????455??2009-03-18?21:24??hooks\pre-revprop-change.bat
?????文件???????2764??2009-03-18?21:25??hooks\pre-revprop-change.tmpl
?????文件???????2062??2009-03-18?21:25??hooks\pre-unlock..txt
?????文件???????2062??2009-03-18?21:25??hooks\pre-unlock.tmpl
?????文件???????3195??2009-03-18?21:25??hooks\start-commit..txt
?????文件???????3195??2009-03-18?21:25??hooks\start-commit.tmpl
?????文件???????5199??2009-03-18?21:28??hooks\sc
?????文件???????3089??2009-03-18?21:28??hooks\sc
?????文件???????3083??2009-03-18?21:28??hooks\sc
?????文件???????3089??2009-03-18?21:28??hooks\sc
?????文件??????11552??2009-03-18?21:28??hooks\sc
?????文件????????844??2009-03-18?21:26??hooks\sc
?????文件???????1499??2009-03-18?21:26??hooks\sc
?????文件???????8397??2009-03-18?21:26??hooks\sc
?????文件??????10090??2009-03-18?21:26??hooks\sc
............此處省略29個文件信息
- 上一篇:linux下bmp圖像顯示
- 下一篇:E18-D80NK紅外反射傳感器模塊說明書
評論
共有 條評論