[PATCH 4 of 8] wireproto: fix decodelist to properly return empty list
Peter Arrenbrecht
peter.arrenbrecht at gmail.com
Tue Mar 22 10:27:32 CDT 2011
# HG changeset patch
# User Peter Arrenbrecht <peter.arrenbrecht at gmail.com>
# Date 1300776002 -3600
wireproto: fix decodelist to properly return empty list
Needed by tests for next patch introducing known().
diff --git a/mercurial/wireproto.py b/mercurial/wireproto.py
--- a/mercurial/wireproto.py
+++ b/mercurial/wireproto.py
@@ -15,7 +15,9 @@
# list of nodes encoding / decoding
def decodelist(l, sep=' '):
- return map(bin, l.split(sep))
+ if l:
+ return map(bin, l.split(sep))
+ return []
def encodelist(l, sep=' '):
return sep.join(map(hex, l))
More information about the Mercurial-devel
mailing list