comparison mercurial/revset.py @ 32885:8e02829bec61

revset: fix negative ancestor spec to not return changectx objects The order was unstable because of this.
author Yuya Nishihara <yuya@tcha.org>
date Sun, 18 Jun 2017 12:25:23 +0900
parents 4710cc4dac99
children 27932a76a88d
comparison
equal deleted inserted replaced
32884:9d472b219fb0 32885:8e02829bec61
390 if len(c) == 0: 390 if len(c) == 0:
391 break 391 break
392 if len(c) > 1: 392 if len(c) > 1:
393 raise error.RepoLookupError( 393 raise error.RepoLookupError(
394 _("revision in set has more than one child")) 394 _("revision in set has more than one child"))
395 r = c[0] 395 r = c[0].rev()
396 else: 396 else:
397 cs.add(r) 397 cs.add(r)
398 return subset & cs 398 return subset & cs
399 399
400 def ancestorspec(repo, subset, x, n, order): 400 def ancestorspec(repo, subset, x, n, order):