[PATCH 3 of 4 accept-scripts] accept: consistently return a boolean
Augie Fackler
raf at durin42.com
Wed Jun 12 04:52:24 UTC 2019
# HG changeset patch
# User Augie Fackler <raf at durin42.com>
# Date 1560312768 14400
# Wed Jun 12 00:12:48 2019 -0400
# Node ID eca3ad69186b71aceb657be4e884f2a199fa784c
# Parent 4ca38ec4124f43199bc03472af423af62cb72c31
accept: consistently return a boolean
diff --git a/accept.py b/accept.py
--- a/accept.py
+++ b/accept.py
@@ -124,7 +124,7 @@ class commitqueue(object):
def accepted(self, commit):
al = self.accepters(commit)
if len(al) >= 2:
- return al
+ return True
return False
def accepters(self, commit):
diff --git a/accepted b/accepted
--- a/accepted
+++ b/accepted
@@ -9,4 +9,4 @@ cq = accept.commitqueue(config.load().so
for n in cq.commits():
a = cq.accepted(n)
if a:
- print n, " ".join(a)
+ print n, " ".join(cq.accepters(n))
More information about the Mercurial-devel
mailing list