--- a/hgext/convert/convcmd.py Fri Mar 13 14:20:13 2015 -0400
+++ b/hgext/convert/convcmd.py Fri Mar 13 17:00:06 2015 -0400
@@ -515,7 +515,11 @@
sortmode = [m for m in sortmodes if opts.get(m)]
if len(sortmode) > 1:
raise util.Abort(_('more than one sort mode specified'))
- sortmode = sortmode and sortmode[0] or defaultsort
+ if sortmode:
+ sortmode = sortmode[0]
+ else:
+ sortmode = defaultsort
+
if sortmode == 'sourcesort' and not srcc.hasnativeorder():
raise util.Abort(_('--sourcesort is not supported by this data source'))
if sortmode == 'closesort' and not srcc.hasnativeclose():