qsync: ignore unexistent nodes stable
authorDavid Douard <david.douard@logilab.fr>
Wed, 18 Jul 2012 12:40:41 +0200
branchstable
changeset 394 f2168d0b5700
parent 371 381ce7036d6d
child 395 822e5305e377
qsync: ignore unexistent nodes
hgext/qsync.py
--- a/hgext/qsync.py	Tue Jul 17 19:47:54 2012 +0200
+++ b/hgext/qsync.py	Wed Jul 18 12:40:41 2012 +0200
@@ -86,7 +86,7 @@
                 obsolete = extensions.find('obsolete')
                 newnodes = obsolete.newerversion(repo, oldnode)
                 if newnodes:
-                    newnodes = [n for n in newnodes if n] # remove killing
+                    newnodes = [n for n in newnodes if n and n[0] in repo] # remove killing
                 if not newnodes:
                     # changeset has been killed (eg. reject)
                     pass
@@ -175,7 +175,7 @@
         oldnode = bin(oldhex)
         newnodes = obsolete.newerversion(repo, oldnode)
         if newnodes:
-            newnodes = [n for n in newnodes if n] # remove killing
+            newnodes = [n for n in newnodes if n and n[0] in repo] # remove killing
             if len(newnodes) > 1:
                 newnodes = [short(nodes[0]) for nodes in newnodes]
                 raise util.Abort('%s have more than one newer version: %s'% (oldname, newnodes))