Mercurial > hg > hg-git
changeset 653:4ab616864329
git_handler: note that new commits are returned in topo order
This wasn't obvious to me at first.
author | Siddharth Agarwal <sid0@fb.com> |
---|---|
date | Tue, 18 Feb 2014 20:13:15 -0800 (2014-02-19) |
parents | ed4efc711809 |
children | f221c7b5bdfb |
files | hggit/git_handler.py |
diffstat | 1 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/hggit/git_handler.py +++ b/hggit/git_handler.py @@ -610,7 +610,8 @@ todo.sort(key=commitdate, reverse=True) - # traverse the heads getting a list of all the unique commits + # traverse the heads getting a list of all the unique commits in + # topological order commits = [] seen = set(todo) while todo: @@ -624,6 +625,8 @@ for p in obj.parents: if p not in done: todo.append(p) + # process parents of a commit before processing the + # commit itself, and come back to this commit later break else: commits.append(sha)