Mercurial > hg
comparison hgext/convert/convcmd.py @ 18376:13d73bf6be29
convert: make toposort order stable when multiple orderings are possible
The output of some tests are changed. Not necessarily to the better, just other
valid permutations.
author | Mads Kiilerich <mads@kiilerich.com> |
---|---|
date | Thu, 13 Dec 2012 23:15:51 +0100 |
parents | 5965997b7023 |
children | 05acdf8e1f23 |
comparison
equal
deleted
inserted
replaced
18375:cfbd33020066 | 18376:13d73bf6be29 |
---|---|
173 """Return a (children, roots) tuple where 'children' maps parent | 173 """Return a (children, roots) tuple where 'children' maps parent |
174 revision identifiers to children ones, and 'roots' is the list of | 174 revision identifiers to children ones, and 'roots' is the list of |
175 revisions without parents. 'parents' must be a mapping of revision | 175 revisions without parents. 'parents' must be a mapping of revision |
176 identifier to its parents ones. | 176 identifier to its parents ones. |
177 """ | 177 """ |
178 visit = parents.keys() | 178 visit = sorted(parents) |
179 seen = set() | 179 seen = set() |
180 children = {} | 180 children = {} |
181 roots = [] | 181 roots = [] |
182 | 182 |
183 while visit: | 183 while visit: |