updatehook branch: add kwexpander and updatekw modules
WARNING: Do not use this branch for production!
Update hook changes to working directory are detected by hg.
The only /hook/ to escape hg's attention seems to be pretxcommit.
And that probably only due to bug.
Kept branch for archiving purposes.
# $Hg: updatekw.py,v$fromhgkwimportkwexpanderdefupdatekw(ui=None,repo=None,hooktype='',**args):'''Important: returns False on success, True on failure.'''ifnotuiornotrepoorhooktype!='update':# bail out with errorreturnTrueparent1=repo.dirstate.parents()[0]node=repo.changectx(parent1)(modified,added,removed,deleted,unknown,ignored,clean)=repo.status(node1=parent1)candidates=modified+added+cleanreturnkwexpander.expandkw(ui,repo,parent1,node,candidates)