equal
deleted
inserted
replaced
30 nodes = [cl.node(r) for r in topublish] |
30 nodes = [cl.node(r) for r in topublish] |
31 repo._phasecache.advanceboundary(repo, tr, phases.public, nodes) |
31 repo._phasecache.advanceboundary(repo, tr, phases.public, nodes) |
32 |
32 |
33 def rejectuntopicedchangeset(repo, tr): |
33 def rejectuntopicedchangeset(repo, tr): |
34 """Reject the push if there are changeset without topic""" |
34 """Reject the push if there are changeset without topic""" |
35 if not tr.changes['revs']: # no new revs |
35 if 'node' not in tr.hookargs: # no new revs |
36 return |
36 return |
|
37 |
|
38 startnode = node.bin(tr.hookargs['node']) |
37 |
39 |
38 mode = repo.ui.config('experimental', 'topic-mode.server', 'ignore') |
40 mode = repo.ui.config('experimental', 'topic-mode.server', 'ignore') |
39 |
41 |
40 revs = list(tr.changes['revs']) |
42 untopiced = repo.revs('not public() and (%n:) - hidden() - topic()', startnode) |
41 untopiced = repo.revs('not public() and (%ld:) - hidden() - topic()', revs) |
|
42 if untopiced: |
43 if untopiced: |
43 num = len(untopiced) |
44 num = len(untopiced) |
44 fnode = repo[untopiced.first()].hex()[:10] |
45 fnode = repo[untopiced.first()].hex()[:10] |
45 if num == 1: |
46 if num == 1: |
46 msg = _("%s") % fnode |
47 msg = _("%s") % fnode |