comparison mercurial/ancestor.py @ 11418:67bb9d78f05e

merge: sort arguments to stabilize the ancestor search
author Matt Mackall <mpm@selenic.com>
date Mon, 21 Jun 2010 13:25:42 -0500
parents d6512b3e9ac0
children 4f8067c94729
comparison
equal deleted inserted replaced
11417:6f1d1ed3e19a 11418:67bb9d78f05e
16 pfunc must return a list of parent vertices for a given vertex 16 pfunc must return a list of parent vertices for a given vertex
17 """ 17 """
18 18
19 if a == b: 19 if a == b:
20 return a 20 return a
21
22 a, b = sorted([a, b])
21 23
22 # find depth from root of all ancestors 24 # find depth from root of all ancestors
23 parentcache = {} 25 parentcache = {}
24 visit = [a, b] 26 visit = [a, b]
25 depth = {} 27 depth = {}