Proposal: jcheck restrict addition of subrepo files
Chris Hegarty
chris.hegarty at oracle.com
Tue May 14 03:53:39 PDT 2013
Hi,
Recently I ran into an issue in a staging forest where a developer, when
working on a partial forest, accidentally created a directory structure
in a repository that conflicted with that of one of the sub/inner forest
repositories.
For example, hypothetically, if a developer was working solely on the
top level repo, they could accidentally add jdk/Test.java. This would
cause problems when trying to clone the full forest, that contains the
jdk repo.
Granted this doesn't occur that often, but when it does it consumes
unnecessary cycles, and can be disruptive.
I've prototyped a very limited solution whereby a repo, through its
jcheck conf, can define what inner|sub|containing repos are part of its
forest. jcheck can then trivially prevent files being added that would
conflict with this.
Trivial jcheck webrev (python level:novice) :
http://cr.openjdk.java.net/~chegar/jcheck_subrepos_webrev.00/webrev/jcheck.py.udiff.html
Example update to .jcheck/conf in the jdk8 top level repo:
diff -r 69b773a221b9 .jcheck/conf
--- a/.jcheck/conf Thu May 09 10:03:08 2013 -0700
+++ b/.jcheck/conf Tue May 14 11:25:33 2013 +0100
@@ -1,1 +1,2 @@ project=jdk8
project=jdk8
+subrepos=corba,jaxp,jaxws,langtools,jdk,hotspot,nashorn
Note: Since jcheck current ignores name/value pairs in the conf that are
not needed, no special co-ordination would be required between updating
the jcheck/conf in individual forests and the release of an updated
jcheck version. The enforcement will only happen over time, when both of
the above have occurred.
Thanks,
-Chris.
More information about the hg-tools-dev
mailing list