changeset 6762 | f67d1468ac50 |
parent 6746 | 1dca460e7d1e |
child 6836 | c016dc1a8e91 |
--- a/mercurial/util.py Fri Jun 27 14:53:30 2008 -0500 +++ b/mercurial/util.py Fri Jun 27 18:28:45 2008 -0500 @@ -252,6 +252,12 @@ """return the uniq elements of iterable g""" return dict.fromkeys(g).keys() +def sort(l): + if not isinstance(l, list): + l = list(l) + l.sort() + return l + class Abort(Exception): """Raised if a command needs to print an error and exit."""