changeset 4251:e76e52145c3d

transplant: fix ignoring empty changesets (eg after filter)
author Brendan Cully <brendan@kublai.com>
date Tue, 20 Mar 2007 13:13:39 -0700
parents ca639faa38a2
children fe0fe0b4d73b
files hgext/transplant.py
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/transplant.py	Mon Mar 19 19:16:35 2007 -0300
+++ b/hgext/transplant.py	Tue Mar 20 13:13:39 2007 -0700
@@ -151,10 +151,10 @@
                                           log=opts.get('log'),
                                           filter=opts.get('filter'),
                                           lock=lock, wlock=wlock)
-                        if domerge:
+                        if n and domerge:
                             self.ui.status(_('%s merged at %s\n') % (revstr,
                                       revlog.short(n)))
-                        else:
+                        elif n:
                             self.ui.status(_('%s transplanted to %s\n') % (revlog.short(node),
                                                                        revlog.short(n)))
                     finally:
@@ -217,7 +217,7 @@
                                        files=files)
                     if not files:
                         self.ui.warn(_('%s: empty changeset') % revlog.hex(node))
-                        return
+                        return None
                 finally:
                     files = patch.updatedir(self.ui, repo, files, wlock=wlock)
             except Exception, inst: