transplant: use match object rather than files for commit
authorMatt Mackall <mpm@selenic.com>
Mon, 01 Jun 2009 13:51:21 -0500
changeset 8703 8676dd819444
parent 8702 3d44f1a68353
child 8704 27a103df29b7
transplant: use match object rather than files for commit
hgext/transplant.py
--- a/hgext/transplant.py	Mon Jun 01 13:51:21 2009 -0500
+++ b/hgext/transplant.py	Mon Jun 01 13:51:21 2009 -0500
@@ -15,7 +15,7 @@
 
 from mercurial.i18n import _
 import os, tempfile
-from mercurial import bundlerepo, changegroup, cmdutil, hg, merge
+from mercurial import bundlerepo, changegroup, cmdutil, hg, merge, match
 from mercurial import patch, revlog, util, error
 
 class transplantentry:
@@ -242,8 +242,11 @@
         if merge:
             p1, p2 = repo.dirstate.parents()
             repo.dirstate.setparents(p1, node)
+            m = match.always(repo.root, '')
+        else:
+            m = match.exact(repo.root, '', files)
 
-        n = repo.commit(files, message, user, date, extra=extra)
+        n = repo.commit(None, message, user, date, extra=extra, match=m)
         if not merge:
             self.transplants.set(n, node)