./jcheck.py
Print this page
@@ -95,10 +95,18 @@
if not cf.has_key(pn):
raise util.Abort("%s: Missing property: %s" % (fn, pn))
return cf
+# Parse sub repos
+
+def parse_subrepos(l):
+ sr = { }
+ sr = re.split(',', l)
+ return sr
+
+
# Author validation
author_cache = { } ## Should really cache more permanently
def validate_author(an, pn):
@@ -349,10 +357,13 @@
if self.conf.get("bugids") == "ignore":
self.bugids_ignore = True
if not self.bugids_ignore:
# only identify bug ids if we are going to use them
self.repo_bugids = repo_bugids(ui, repo)
+ self.subrepos = [ ]
+ if self.conf.get("subrepos") != None:
+ self.subrepos = parse_subrepos(self.conf.get("subrepos"))
self.blacklist = dict.fromkeys(changeset_blacklist)
self.read_blacklist(blacklist_file)
# hg < 1.0 does not have localrepo.tagtype()
self.tagtype = getattr(self.repo, 'tagtype', lambda k: 'global')
@@ -472,10 +483,14 @@
if ctx.rev() == 0:
## This is loathsome
if f.startswith("test/java/rmi"): continue
if f.startswith("test/com/sun/javadoc/test"): continue
if f.startswith("docs/technotes/guides"): continue
+ ## check file does not start with subrepo path
+ for sr in self.subrepos:
+ if f.startswith(sr):
+ self.error(ctx, "%s: subrepo file not permitted" % f)
fx = ctx.filectx(f)
if normext_re.match(f) and not self.whitespace_lax:
data = fx.data()
m = badwhite_re.search(data)
if m: