merge.update: use `first` instead of direct indexing
authorPierre-Yves David <pierre-yves.david@fb.com>
Tue, 07 Oct 2014 00:41:58 -0700
changeset 22822 7a06ad9518c0
parent 22821 5d4c17d11d7e
child 22823 18ac67b0814c
merge.update: use `first` instead of direct indexing This makes it compatible with all smartset classes.
mercurial/merge.py
--- a/mercurial/merge.py	Tue Oct 07 00:33:47 2014 -0700
+++ b/mercurial/merge.py	Tue Oct 07 00:41:58 2014 -0700
@@ -1041,7 +1041,7 @@
 
                     # get the max revision for the given successors set,
                     # i.e. the 'tip' of a set
-                    node = repo.revs("max(%ln)", successors)[0]
+                    node = repo.revs("max(%ln)", successors).first()
                     pas = [p1]
 
         overwrite = force and not branchmerge