hgext3rd/topic/flow.py
changeset 3282 3675fe74521d
parent 3235 8a772f0c54d9
child 4245 419801742d08
--- a/hgext3rd/topic/flow.py	Tue Dec 12 01:27:12 2017 +0100
+++ b/hgext3rd/topic/flow.py	Tue Dec 12 02:16:58 2017 +0100
@@ -32,13 +32,14 @@
 
 def rejectuntopicedchangeset(repo, tr):
     """Reject the push if there are changeset without topic"""
-    if not tr.changes['revs']: # no new revs
+    if 'node' not in tr.hookargs: # no new revs
         return
 
+    startnode = node.bin(tr.hookargs['node'])
+
     mode = repo.ui.config('experimental', 'topic-mode.server', 'ignore')
 
-    revs = list(tr.changes['revs'])
-    untopiced = repo.revs('not public() and (%ld:) - hidden() - topic()', revs)
+    untopiced = repo.revs('not public() and (%n:) - hidden() - topic()', startnode)
     if untopiced:
         num = len(untopiced)
         fnode = repo[untopiced.first()].hex()[:10]