changeset 22823:18ac67b0814c

rebase: transform the smartset to a list before comparing with a list This is highly suboptimal but smartsets are not comparable to lists yet.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Tue, 07 Oct 2014 00:31:53 -0700
parents 7a06ad9518c0
children 9271630f4720
files hgext/rebase.py
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/rebase.py	Tue Oct 07 00:41:58 2014 -0700
+++ b/hgext/rebase.py	Tue Oct 07 00:31:53 2014 -0700
@@ -276,7 +276,10 @@
                     '(children(ancestor(%ld, %d)) and ::(%ld))::',
                     base, dest, base)
                 if not rebaseset:
-                    if base == [dest.rev()]:
+                    # transform to list because smartsets are not comparable to
+                    # lists. This should be improved to honor lazyness of
+                    # smartset.
+                    if list(base) == [dest.rev()]:
                         if basef:
                             ui.status(_('nothing to rebase - %s is both "base"'
                                         ' and destination\n') % dest)