# $Hg$importkwexpanderdefupdatekw(ui,repo,hooktype,**args):'''Collects candidates for keyword expansion on update and passes them to kwexpander.'''ifhooktype!='update':# bail out with errorreturnTruen1,n2=args['parent1'],args['parent2']r1=repo.changelog.lookup(n1)ifn2:r2=repo.changelog.lookup(n2)# next line for debugging only (check merges)ui.warn('parent2: %s\n'%n2)else:r2=None(modified,added,removed,deleted,unknown,ignored,clean)=repo.status(node1=r1,node2=r2)candidates=modified+added+cleanifcandidates:returnkwexpander.expandkw(ui,repo,r1,n1,candidates,update=True)