comparison mercurial/merge.py @ 22822:7a06ad9518c0

merge.update: use `first` instead of direct indexing This makes it compatible with all smartset classes.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Tue, 07 Oct 2014 00:41:58 -0700
parents 16a46003b50c
children 18b3869179f9
comparison
equal deleted inserted replaced
22821:5d4c17d11d7e 22822:7a06ad9518c0
1039 # and the usual case (len = 1) 1039 # and the usual case (len = 1)
1040 successors = [n for sub in successors for n in sub] 1040 successors = [n for sub in successors for n in sub]
1041 1041
1042 # get the max revision for the given successors set, 1042 # get the max revision for the given successors set,
1043 # i.e. the 'tip' of a set 1043 # i.e. the 'tip' of a set
1044 node = repo.revs("max(%ln)", successors)[0] 1044 node = repo.revs("max(%ln)", successors).first()
1045 pas = [p1] 1045 pas = [p1]
1046 1046
1047 overwrite = force and not branchmerge 1047 overwrite = force and not branchmerge
1048 1048
1049 p2 = repo[node] 1049 p2 = repo[node]