hgext/convert/filemap.py
changeset 41180 69804c040a04
parent 41179 77088fa862df
child 43076 2372284d9457
--- a/hgext/convert/filemap.py	Wed Jan 09 14:33:06 2019 -0500
+++ b/hgext/convert/filemap.py	Wed Jan 09 16:02:05 2019 -0500
@@ -305,7 +305,18 @@
         for f in files:
             if self.filemapper(f):
                 return True
-        return False
+
+        # The include directive is documented to include nothing else (though
+        # valid branch closes are included).
+        if self.filemapper.include:
+            return False
+
+        # Allow empty commits in the source revision through.  The getchanges()
+        # method doesn't even bother calling this if it determines that the
+        # close marker is significant (i.e. all of the branch ancestors weren't
+        # eliminated).  Therefore if there *is* a close marker, getchanges()
+        # doesn't consider it significant, and this revision should be dropped.
+        return not files and 'close' not in self.commits[rev].extra
 
     def mark_not_wanted(self, rev, p):
         # Mark rev as not interesting and update data structures.