Patchwork [9,of,9] subrepo: drop the 'ui' parameter to revert()

login
register
mail settings
Submitter Matt Mackall
Date Dec. 18, 2014, 7:07 p.m.
Message ID <1418929626.4609.21.camel@selenic.com>
Download mbox | patch
Permalink /patch/7171/
State Not Applicable
Headers show

Comments

Matt Mackall - Dec. 18, 2014, 7:07 p.m.
On Thu, 2014-12-18 at 13:17 -0500, Matt Harbison wrote:
> On Dec 18, 2014 1:01 PM, Matt Mackall <mpm@selenic.com> wrote: 
> 
> On Sun, 2014-12-14 at 20:12 -0500, Matt Harbison wrote: 
> > # HG changeset patch 
> > # User Matt Harbison <matt_harbison@yahoo.com> 
> > # Date 1418517895 18000 
> > # Sat Dec 13 19:44:55 2014 -0500 
> > # Node ID cd72135f7096f311371a86fab038d0a27c3fea58 
> > # Parent b58f5dcfe069ccf5154788c05348cc328b4f13f2 
> > subrepo: drop the 'ui' parameter to revert() 
> 
> FYI, this broke test-subrepo-git.t. I've fixed it in flight. 
> 
> I think it ran fine for me, minus the recent couple of whitespace
> changes dependent on the git version.  Patches for that were accepted
> over the weekend.  I'm a little concerned if refactoring changed
> tests.

This bit was missing in the version you posted. Not sure how it got past
Augie, who presumably has git installed.
Matt Harbison - Dec. 18, 2014, 7:36 p.m.

Patch

diff -r e1c39f207719 -r e20f36ad092e mercurial/subrepo.py
--- a/mercurial/subrepo.py	Sat Dec 13 19:44:55 2014 -0500
+++ b/mercurial/subrepo.py	Thu Dec 18 12:07:03 2014 -0600
@@ -1655,12 +1655,12 @@ 
         elif match(gitprefix): #Subrepo is matched
             ui.write(self._gitcommand(cmd))
 
-    def revert(self, ui, substate, *pats, **opts):
-        ui.status(_('reverting subrepo %s\n') % substate[0])
+    def revert(self, substate, *pats, **opts):
+        self.ui.status(_('reverting subrepo %s\n') % substate[0])
         if not opts.get('no_backup'):
-            ui.warn('%s: reverting %s subrepos without '
-                    '--no-backup is unsupported\n'
-                    % (substate[0], substate[2]))
+            self.ui.warn('%s: reverting %s subrepos without '
+                         '--no-backup is unsupported\n'
+                         % (substate[0], substate[2]))
             return []
 
         self.get(substate, overwrite=True)