svn commit: r47643 - in svnadmin/hooks: . scripts

Hiroki Sato <[email protected]>
Newsgroups gmane.os.freebsd.devel.cvs.doc
Message-ID <[email protected]>
Author: hrs
Date: Fri Oct 23 03:35:26 2015
New Revision: 47643
URL: https://svnweb.freebsd.org/changeset/doc/47643

Log:
  Add text/troff to the list of allowed binary files.
  
  Approved by:	doceng (implicit)

Modified:
  svnadmin/hooks/pre-commit
  svnadmin/hooks/scripts/verify.py

Modified: svnadmin/hooks/pre-commit
==============================================================================
--- svnadmin/hooks/pre-commit	Thu Oct 22 21:23:02 2015	(r47642)
+++ svnadmin/hooks/pre-commit	Fri Oct 23 03:35:26 2015	(r47643)
@@ -78,7 +78,8 @@ sizelimit.py "$REPO" "$TXN" 1024000 || e
 # POLICY: mime-type must be unset, text/*, application/* or image/*
 # POLICY: if a file does has fbsd:nokeywords, then svn:keywords must not be set
 # POLICY: if a file has binary chars and no fbsd:notbinary, then pretend its not binary
-# POLICY: if a file is binary, then it must have mime application/* or image/*
+# POLICY: if a file is binary, then it must have mime application/*, image/*,
+#         or text/{sgml,xml,troff}.
 # POLICY: if a file does not have fbsd:nokeywords, or is binary then svn:keywords must be set
 # POLICY: if svn:keywords is set, $ FreeBSD $ must be present and condensed.
 # POLICY: If a file has text/*, then it must have eol-style

Modified: svnadmin/hooks/scripts/verify.py
==============================================================================
--- svnadmin/hooks/scripts/verify.py	Thu Oct 22 21:23:02 2015	(r47642)
+++ svnadmin/hooks/scripts/verify.py	Fri Oct 23 03:35:26 2015	(r47643)
@@ -13,7 +13,8 @@ from svn import core, fs, delta, repos
 # POLICY: mime-type must be unset, text/*, application/* or image/*
 # POLICY: if a file does has fbsd:nokeywords, then svn:keywords must not be set
 # POLICY: if a file has binary chars and no fbsd:notbinary, then pretend its not binary
-# POLICY: if a file is binary, then it must have mime application/* or image/*
+# POLICY: if a file is binary, then it must have mime application/*, image/*,
+#         or text/{sgml,xml,troff}.
 # POLICY: if a file does not have fbsd:nokeywords, or is binary then svn:keywords must be set
 # POLICY: if svn:keywords is set, $ FreeBSD $ must be present and condensed.
 
@@ -186,7 +187,7 @@ class ChangeReceiver(delta.Editor):
 
     # POLICY: if a file is binary, then it must have mime application/* or image/*
     if binary:
-      if not mimetype.startswith('application/') and not mimetype.startswith('image/') and not mimetype.startswith('text/sgml') and not mimetype.startswith('text/html') and not mimetype.startswith('text/xml'):
+      if not mimetype.startswith('application/') and not mimetype.startswith('image/') and not mimetype.startswith('text/sgml') and not mimetype.startswith('text/html') and not mimetype.startswith('text/xml') and not mimetype.startswith('text/troff'):
 	self.do_fail('Path "%s" contains binary but has svn:mime-type "%s"\n' % (path, mimetype))
 	sys.stderr.write('Try application/* (application/octet-stream) or image/* instead.\n')
 
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-doc-all
To unsubscribe, send any mail to "[email protected]"
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.