branch | updatehook |
changeset 7 | e5f131217f87 |
child 20 | 6dc2b4268920 |
5:85d1f5bf7cfc | 7:e5f131217f87 |
---|---|
1 # $Hg: pretxnkw.py,v$ |
|
2 |
|
3 from hgkw import kwexpander |
|
4 |
|
5 def pretxnkw(ui=None, repo=None, hooktype='', **args): |
|
6 '''Important: returns False on success, True on failure.''' |
|
7 |
|
8 node = args['node'][0:12] |
|
9 |
|
10 if not ui or not repo or not node or hooktype != 'pretxncommit': |
|
11 # bail out with error |
|
12 return True |
|
13 |
|
14 modified, added = repo.status()[1:3] |
|
15 candidates = modified + added |
|
16 |
|
17 return kwexpander.expandkw(ui, repo, repo.changelog.tip(), node) |