543110450d50

guts: fix for 1.9

fixes #73
[view raw] [browse files]
author Steve Losh <steve@stevelosh.com>
date Mon, 18 Jul 2011 13:21:39 -0400
parents bf2c74655b2f
children fa1f7726b08b
branches/tags (none)
files review/api.py review/tests/util.py

Changes

--- a/review/api.py	Wed Jul 28 01:26:38 2010 -0400
+++ b/review/api.py	Mon Jul 18 13:21:39 2011 -0400
@@ -5,7 +5,7 @@
 import base64, datetime, operator, os
 import messages
 from rutil import fromlocal
-from mercurial import cmdutil, error, hg, patch, util
+from mercurial import cmdutil, error, hg, patch, scmutil, util
 from mercurial.node import hex
 from mercurial import ui as _ui
 from mercurial import demandimport
@@ -280,7 +280,7 @@
             except error.RepoError:
                 if clone_message:
                     ui.write(messages.INIT_CLONE_MESSAGE % self.rpath)
-                hg.clone(hg.remoteui(self.ui, {}), self.rpath, self.lpath)
+                hg.clone(hg.remoteui(self.ui, {}), {}, self.rpath, self.lpath)
             else:
                 raise PreexistingDatastore(True)
         elif os.path.exists(os.path.join(self.target.root, '.hgreview')):
@@ -555,7 +555,7 @@
 
         diffs = {}
         for filename in filenames:
-            m = cmdutil.matchfiles(self.target, [filename])
+            m = scmutil.matchfiles(self.target, [filename])
             diff_opts = patch.diffopts(self.ui, opts)
             diff_opts.git = True
             d = patch.diff(self.target, node1, node2, match=m, opts=diff_opts)
--- a/review/tests/util.py	Wed Jul 28 01:26:38 2010 -0400
+++ b/review/tests/util.py	Mon Jul 18 13:21:39 2011 -0400
@@ -135,7 +135,7 @@
     return hg.repository(_ui, sandbox_clone_path)
 
 def clone_sandbox_repo():
-    hg.clone(hg.remoteui(_ui, {}), sandbox_repo_path, sandbox_clone_path)
+    hg.clone(hg.remoteui(_ui, {}), {}, sandbox_repo_path, sandbox_clone_path)
 
 def get_datastore_repo(path=api.DEFAULT_DATASTORE_DIRNAME):
     return hg.repository(_ui, path)