If you do not run a project repo using the onnv-gk-tools,
then you may disregard this message.
With my push of
general gk tools update for Hg 1.3.1, including a New Lock System
for bghooks and incremental builds
to the onnv-gk-tools repo and a few subsequent pushes, the tools
now support (and in fact, require) Mercurial v1.3.1 on your gate
machine. For everybody who's been running gate machines at snv_123
or later, now you can get back in sync :-)
What is new in this changeset?
------------------------------
* gate/clone locking and unlocking is now compatible with v1.3.1
* most hooks now run as "bg-changegroup" rather than bg-pretxnchangegroup
(see below)
* background hooks now use a simple locking scheme
(if you have your own bg hooks, you should follow this too)
* update-SUNWonbld.py now creates architecture-specific symlinks
for the other architecture from what you're installing on; ie,
installing the package on an x86 machine will give you symlinks for
opt/onbld/bin/sparc that point to your configure sparc machine, and
vice versa
* addition of a script "lockfilewhiner.py" which you should run out of
cron in order to track any dangling lockfiles from the bg hooks.
Changes to bghook.py, and bg hooks
----------------------------------
Mercurial v1.3.1 introduced a "pending" flag to the pretxn* hooks,
which goes some way towards fixing the reality seen by in-flight
pushes. However, this flag seriously got in the way of the bghook.py
system, so a number of changes were made to move forward.
First amongst those is to move most of the bg-pretxnchangegroup
hooks to be bg-changegroup hooks instead:
[gate-hgrc and gate-closed-hgrc]
< pretxnchangegroup.3 = python:hook.bghook.bghook
---
changegroup.0 = /usr/bin/echo "\n\n\tDO NOT HIT CONTROL C\n\n"
changegroup.1 = /usr/bin/hg push -R /scratch/gate/trees/minirepo
/scratch/gate/trees/minirepo-clone
changegroup.2 = /usr/bin/hg update
changegroup.3 = python:hook.bghook.bghook
changegroup.4 = python:hook.notify.notify
85,91c88,92
< bg-pretxnchangegroup.0 = python:hook.cache.cache
< bg-pretxnchangegroup.1 = python:hook.notify.notify
< bg-pretxnchangegroup.2 = python:hook.gitdiffs.gitdiffs
< bg-pretxnchangegroup.3 = python:hook.webrev.webrev
< bg-pretxnchangegroup.4 = python:hook.gknotify.gknotify
< bg-pretxnchangegroup.5 = python:hook.updatecr.updatecr
< bg-pretxnchangegroup.6 = python:hook.updatedocbugs.updatedocbugs
---
bg-changegroup.0 = python:hook.gitdiffs.gitdiffs
bg-changegroup.1 = python:hook.webrev.webrev
bg-changegroup.2 = python:hook.gknotify.gknotify
bg-changegroup.3 = python:hook.updatecr.updatecr
bg-changegroup.4 = python:hook.updatedocbugs.updatedocbugs
The clone-hgrc also needs modifications:
> [gatehooks]
> gatename = onnv-clone
> lockdir = public/lock
> wlock = onhg, jmcp, ok199659
so that the updateoso.py hook can run correctly (it is also
a bg-changegroup hook).
When run, bghook.py creates a simple lockfile in [repo]/public/lock
named (hookname)-(full changeset hash), and adds a reference to
this into the environment that is passed to each bg hook.
Each hook which we run as a bg-changegroup hook now checks for
that lockfile env variable, and removes the lockfile.
New file - lockfilewhiner.py
----------------------------
The lockfilewhiner.py script is run from cron (we're running it on
the gate machine, and you should run it also) to check for any left-
over lockfiles in [repo]/public/lock. If it find any that have been
there longer than your configured timeout (default is 10 minutes),
then your gk user will receive an email similar to the following
(run by hand) example:
============================================================
$ python lockfilewhiner.py -R /scratch/gate/trees/minirepo -T 5
Dangling push locks for /scratch/gate/trees/minirepo: investigation required
List of dangling lockfiles in /scratch/gate/trees/minirepo/public/lock
gitdiffs-7e9d87a32fe2b5b7bbacb27dd277063c065e81ea
gitdiffs-318f9248f4fc20dbfac8b5ee38e8e69353db66c9
gitdiffs-a5ecd0ed02b0ef9e6d66a4264267dee318176ec7
gknotify-7e9d87a32fe2b5b7bbacb27dd277063c065e81ea
gknotify-318f9248f4fc20dbfac8b5ee38e8e69353db66c9
gknotify-a5ecd0ed02b0ef9e6d66a4264267dee318176ec7
webrev-7e9d87a32fe2b5b7bbacb27dd277063c065e81ea
webrev-a5ecd0ed02b0ef9e6d66a4264267dee318176ec7
webrev-318f9248f4fc20dbfac8b5ee38e8e69353db66c9
gknotify-894903ef004b58ce935dbba1899e94cf5ea9631a
gitdiffs-894903ef004b58ce935dbba1899e94cf5ea9631a
To obtain the changeset details, run the following
commands:
$ hg log -R /scratch/gate/trees/minirepo -r
7e9d87a32fe2b5b7bbacb27dd277063c065e81ea
$ hg log -R /scratch/gate/trees/minirepo -r
318f9248f4fc20dbfac8b5ee38e8e69353db66c9
$ hg log -R /scratch/gate/trees/minirepo -r
a5ecd0ed02b0ef9e6d66a4264267dee318176ec7
$ hg log -R /scratch/gate/trees/minirepo -r
894903ef004b58ce935dbba1899e94cf5ea9631a
============================================================
Finally:
--------
With the addition of a new changegroup.0 shell hook, users will
see a slight difference in messaging when they push:
============================================================
blinder:minirepo_test $ hg push -v
ssh://o...@localhost//scratch/gate/trees/minirepo
running ssh o...@localhost "hg -R /scratch/gate/trees/minirepo serve --stdio"
pushing to ssh://o...@localhost//scratch/gate/trees/minirepo
searching for changes
calling hook preoutgoing.cdm_pbconfirm: hgext_cdm.pbconfirm
Are you sure you wish to push? [y/N]: y
1 changesets found
remote: adding changesets
remote: adding manifests
remote: adding file changes
remote: added 1 changesets with 1 changes to 1 files
remote:
remote:
remote: DO NOT HIT CONTROL C
remote:
remote:
remote: pushing to /scratch/gate/trees/minirepo-clone
remote: searching for changes
remote: adding changesets
remote: adding manifests
remote: adding file changes
remote: added 1 changesets with 1 changes to 1 files
remote: 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
remote: Preparing notification email...
remote: ...notification sent
============================================================
If you have any questions, or come across issues with the new
or changed files, please don't hesitate to let me know.
Best regards.
James C. McPherson
--
Senior Kernel Software Engineer, Solaris
Sun Microsystems
http://blogs.sun.com/jmcp http://www.jmcp.homeunix.com/blog
_______________________________________________
tools-discuss mailing list
tools-discuss@opensolaris.org