Mercurial > public > mercurial-scm > hg
comparison mercurial/cmdutil.py @ 23501:424d669118d3 stable
log: fix log revset instability
The log/graphlog revset was not producing stable results since it was
iterating over a dict. Now we sort before iterating to guarantee a fixed order.
This fixes some potential flakiness in the tests.
author | Durham Goode <durham@fb.com> |
---|---|
date | Mon, 08 Dec 2014 15:41:54 -0800 |
parents | 9601229ed361 |
children | 32e68271a037 f4e6475950f1 |
comparison
equal
deleted
inserted
replaced
23500:9601229ed361 | 23501:424d669118d3 |
---|---|
1793 filematcher = _makenofollowlogfilematcher(repo, pats, opts) | 1793 filematcher = _makenofollowlogfilematcher(repo, pats, opts) |
1794 if filematcher is None: | 1794 if filematcher is None: |
1795 filematcher = lambda rev: match | 1795 filematcher = lambda rev: match |
1796 | 1796 |
1797 expr = [] | 1797 expr = [] |
1798 for op, val in opts.iteritems(): | 1798 for op, val in sorted(opts.iteritems()): |
1799 if not val: | 1799 if not val: |
1800 continue | 1800 continue |
1801 if op not in opt2revset: | 1801 if op not in opt2revset: |
1802 continue | 1802 continue |
1803 revop, andor = opt2revset[op] | 1803 revop, andor = opt2revset[op] |