changeset 8703:8676dd819444

transplant: use match object rather than files for commit
author Matt Mackall <mpm@selenic.com>
date Mon, 01 Jun 2009 13:51:21 -0500
parents 3d44f1a68353
children 27a103df29b7
files hgext/transplant.py
diffstat 1 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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)