comparison mercurial/revset.py @ 17100:ee2370d866fc

revset: ensure we are reversing a list (issue3530)
author Bryan O'Sullivan <bryano@fb.com>
date Wed, 04 Jul 2012 09:38:07 -0700
parents 42c472877825
children d9a046ae4d8e
comparison
equal deleted inserted replaced
17099:1c55d1add24f 17100:ee2370d866fc
1149 def reverse(repo, subset, x): 1149 def reverse(repo, subset, x):
1150 """``reverse(set)`` 1150 """``reverse(set)``
1151 Reverse order of set. 1151 Reverse order of set.
1152 """ 1152 """
1153 l = getset(repo, subset, x) 1153 l = getset(repo, subset, x)
1154 if not isinstance(l, list):
1155 l = list(l)
1154 l.reverse() 1156 l.reverse()
1155 return l 1157 return l
1156 1158
1157 def roots(repo, subset, x): 1159 def roots(repo, subset, x):
1158 """``roots(set)`` 1160 """``roots(set)``