From John.Coomes at oracle.com Mon Mar 10 23:02:13 2014 From: John.Coomes at oracle.com (John Coomes) Date: Mon, 10 Mar 2014 16:02:13 -0700 Subject: jcheck review request - pushkey hook Message-ID: <21278.17525.834279.967878@mykonos.us.oracle.com> A server-side hook to check pushkeys: http://cr.openjdk.java.net/~jcoomes/tools/jcheck/pushkey-hook/ -John From mark.reinhold at oracle.com Mon Mar 10 23:26:54 2014 From: mark.reinhold at oracle.com (mark.reinhold at oracle.com) Date: Mon, 10 Mar 2014 16:26:54 -0700 Subject: jcheck review request - pushkey hook In-Reply-To: <21278.17525.834279.967878@mykonos.us.oracle.com> References: <21278.17525.834279.967878@mykonos.us.oracle.com> Message-ID: <20140310162654.830460@eggemoggin.niobe.net> 2014/3/10 9:02 -0700, john.coomes at oracle.com: > A server-side hook to check pushkeys: > > http://cr.openjdk.java.net/~jcoomes/tools/jcheck/pushkey-hook/ Why does this belong in jcheck, rather than in a separate hook? - Mark From John.Coomes at oracle.com Tue Mar 11 16:31:21 2014 From: John.Coomes at oracle.com (John Coomes) Date: Tue, 11 Mar 2014 09:31:21 -0700 Subject: jcheck review request - pushkey hook In-Reply-To: <20140310162654.830460@eggemoggin.niobe.net> References: <21278.17525.834279.967878@mykonos.us.oracle.com> <20140310162654.830460@eggemoggin.niobe.net> Message-ID: <21279.14937.945238.123233@mykonos.us.oracle.com> mark.reinhold at oracle.com (mark.reinhold at oracle.com) wrote: > 2014/3/10 9:02 -0700, john.coomes at oracle.com: > > A server-side hook to check pushkeys: > > > > http://cr.openjdk.java.net/~jcoomes/tools/jcheck/pushkey-hook/ > > Why does this belong in jcheck, rather than in a separate hook? I think that before long we'll want a more flexible policy, and for that we could tap into the existing jcheck conf mechanism (e.g., allow pushkeys when jcheck tags=lax, or maybe use a separate pushkeys=lax config item). We may also want to check pushkeys like we currently check tags. Finally, I think we should allow projects/repos that aren't using jcheck to manage pushkeys as they choose. -John From mark.reinhold at oracle.com Tue Mar 11 20:24:00 2014 From: mark.reinhold at oracle.com (mark.reinhold at oracle.com) Date: Tue, 11 Mar 2014 13:24:00 -0700 Subject: jcheck review request - pushkey hook In-Reply-To: <21279.14937.945238.123233@mykonos.us.oracle.com> References: <21278.17525.834279.967878@mykonos.us.oracle.com>, <20140310162654.830460@eggemoggin.niobe.net>, <21279.14937.945238.123233@mykonos.us.oracle.com> Message-ID: <20140311132400.369530@eggemoggin.niobe.net> 2014/3/11 2:31 -0700, john.coomes at oracle.com: > mark.reinhold at oracle.com (mark.reinhold at oracle.com) wrote: >> Why does this belong in jcheck, rather than in a separate hook? > > I think that before long we'll want a more flexible policy, and for > that we could tap into the existing jcheck conf mechanism (e.g., allow > pushkeys when jcheck tags=lax, or maybe use a separate pushkeys=lax > config item). We may also want to check pushkeys like we currently > check tags. Finally, I think we should allow projects/repos that > aren't using jcheck to manage pushkeys as they choose. Okay, fair enough. It'd be helpful to have a comment in jcheck.py to indicate that prepushkey is an entry point that may be invoked externally, lest it disappear in some future refactoring. - Mark From John.Coomes at oracle.com Tue Mar 11 21:31:37 2014 From: John.Coomes at oracle.com (John Coomes) Date: Tue, 11 Mar 2014 14:31:37 -0700 Subject: jcheck review request - pushkey hook In-Reply-To: <20140311132400.369530@eggemoggin.niobe.net> References: <21278.17525.834279.967878@mykonos.us.oracle.com> <20140310162654.830460@eggemoggin.niobe.net> <21279.14937.945238.123233@mykonos.us.oracle.com> <20140311132400.369530@eggemoggin.niobe.net> Message-ID: <21279.32953.311431.628229@mykonos.us.oracle.com> mark.reinhold at oracle.com (mark.reinhold at oracle.com) wrote: > 2014/3/11 2:31 -0700, john.coomes at oracle.com: > > mark.reinhold at oracle.com (mark.reinhold at oracle.com) wrote: > >> Why does this belong in jcheck, rather than in a separate hook? > > > > I think that before long we'll want a more flexible policy, and for > > that we could tap into the existing jcheck conf mechanism (e.g., allow > > pushkeys when jcheck tags=lax, or maybe use a separate pushkeys=lax > > config item). We may also want to check pushkeys like we currently > > check tags. Finally, I think we should allow projects/repos that > > aren't using jcheck to manage pushkeys as they choose. > > Okay, fair enough. > > It'd be helpful to have a comment in jcheck.py to indicate that > prepushkey is an entry point that may be invoked externally, lest > it disappear in some future refactoring. Sure, done: # This is invoked on servers to check pushkeys; it's not needed on clients. def prepushkey(ui, repo, hooktype, namespace, key, old=None, new=None, **opts): ... -John From john.coomes at oracle.com Tue Mar 11 21:37:51 2014 From: john.coomes at oracle.com (john.coomes at oracle.com) Date: Tue, 11 Mar 2014 21:37:51 +0000 Subject: hg: code-tools/jcheck: Add a hook to check pushkeys Message-ID: <201403112137.s2BLbqgc014147@aojmv0008> Changeset: 5cc7a44300dd Author: jcoomes Date: 2014-03-11 14:29 -0700 URL: http://hg.openjdk.java.net/code-tools/jcheck/rev/5cc7a44300dd Add a hook to check pushkeys Add a server-side prepushkey hook to disable pushing keys, except for phases data. Bookmarks (e.g, '@') can become stale when old hg versions are used on the client, leading to surprising behavior. ! jcheck.py From john.coomes at oracle.com Tue Mar 11 21:37:54 2014 From: john.coomes at oracle.com (john.coomes at oracle.com) Date: Tue, 11 Mar 2014 21:37:54 +0000 Subject: hg: code-tools/jcheck/dist: jcheck 5cc7a44300dd 2014-03-11 14:29:53 -0700 Message-ID: <201403112137.s2BLbsGb014221@aojmv0008> Changeset: 61ae6f01a897 Author: jcoomes Date: 2014-03-11 14:29 -0700 URL: http://hg.openjdk.java.net/code-tools/jcheck/dist/rev/61ae6f01a897 jcheck 5cc7a44300dd 2014-03-11 14:29:53 -0700 ! jcheck.py