Patchwork D6742: interfaceutil: move to interfaces/

login
register
mail settings
Submitter phabricator
Date Aug. 17, 2019, 11:44 p.m.
Message ID <differential-rev-PHID-DREV-453bgdcoaeuswqzbkfzu-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/41346/
State Superseded
Headers show

Comments

phabricator - Aug. 17, 2019, 11:44 p.m.
pulkit created this revision.
Herald added a reviewer: indygreg.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  Now that we have a dedicated folder for interfaces, let's move interfaceutil
  there.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D6742

AFFECTED FILES
  hgext/sqlitestore.py
  mercurial/filelog.py
  mercurial/httppeer.py
  mercurial/interfaces/repository.py
  mercurial/interfaces/util.py
  mercurial/localrepo.py
  mercurial/manifest.py
  mercurial/revlog.py
  mercurial/utils/interfaceutil.py
  mercurial/wireprotoserver.py
  mercurial/wireprototypes.py
  mercurial/wireprotov1peer.py
  mercurial/wireprotov2server.py
  tests/simplestorerepo.py
  tests/wireprotosimplecache.py

CHANGE DETAILS




To: pulkit, indygreg, #hg-reviewers
Cc: mercurial-devel

Patch

diff --git a/tests/wireprotosimplecache.py b/tests/wireprotosimplecache.py
--- a/tests/wireprotosimplecache.py
+++ b/tests/wireprotosimplecache.py
@@ -17,9 +17,9 @@ 
 )
 from mercurial.interfaces import (
     repository,
+    util as interfaceutil,
 )
 from mercurial.utils import (
-    interfaceutil,
     stringutil,
 )
 
diff --git a/tests/simplestorerepo.py b/tests/simplestorerepo.py
--- a/tests/simplestorerepo.py
+++ b/tests/simplestorerepo.py
@@ -38,10 +38,10 @@ 
 )
 from mercurial.interfaces import (
     repository,
+    util as interfaceutil,
 )
 from mercurial.utils import (
     cborutil,
-    interfaceutil,
     storageutil,
 )
 from mercurial.revlogutils import (
diff --git a/mercurial/wireprotov2server.py b/mercurial/wireprotov2server.py
--- a/mercurial/wireprotov2server.py
+++ b/mercurial/wireprotov2server.py
@@ -28,9 +28,11 @@ 
     wireprotoframing,
     wireprototypes,
 )
+from .interfaces import (
+    util as interfaceutil,
+)
 from .utils import (
     cborutil,
-    interfaceutil,
     stringutil,
 )
 
diff --git a/mercurial/wireprotov1peer.py b/mercurial/wireprotov1peer.py
--- a/mercurial/wireprotov1peer.py
+++ b/mercurial/wireprotov1peer.py
@@ -27,9 +27,7 @@ 
 )
 from .interfaces import (
     repository,
-)
-from .utils import (
-    interfaceutil,
+    util as interfaceutil,
 )
 
 urlreq = util.urlreq
diff --git a/mercurial/wireprototypes.py b/mercurial/wireprototypes.py
--- a/mercurial/wireprototypes.py
+++ b/mercurial/wireprototypes.py
@@ -17,9 +17,11 @@ 
     error,
     util,
 )
+from .interfaces import (
+    util as interfaceutil,
+)
 from .utils import (
     compression,
-    interfaceutil,
 )
 
 # Names of the SSH protocol implementations.
diff --git a/mercurial/wireprotoserver.py b/mercurial/wireprotoserver.py
--- a/mercurial/wireprotoserver.py
+++ b/mercurial/wireprotoserver.py
@@ -21,10 +21,12 @@ 
     wireprotov1server,
     wireprotov2server,
 )
+from .interfaces import (
+    util as interfaceutil,
+)
 from .utils import (
     cborutil,
     compression,
-    interfaceutil,
 )
 
 stringio = util.stringio
diff --git a/mercurial/revlog.py b/mercurial/revlog.py
--- a/mercurial/revlog.py
+++ b/mercurial/revlog.py
@@ -70,13 +70,13 @@ 
 )
 from .interfaces import (
     repository,
+    util as interfaceutil,
 )
 from .revlogutils import (
     deltas as deltautil,
     flagutil,
 )
 from .utils import (
-    interfaceutil,
     storageutil,
     stringutil,
 )
diff --git a/mercurial/manifest.py b/mercurial/manifest.py
--- a/mercurial/manifest.py
+++ b/mercurial/manifest.py
@@ -29,9 +29,7 @@ 
 )
 from .interfaces import (
     repository,
-)
-from .utils import (
-    interfaceutil,
+    util as interfaceutil,
 )
 
 parsers = policy.importmod(r'parsers')
diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py
--- a/mercurial/localrepo.py
+++ b/mercurial/localrepo.py
@@ -68,10 +68,10 @@ 
 
 from .interfaces import (
     repository,
+    util as interfaceutil,
 )
 
 from .utils import (
-    interfaceutil,
     procutil,
     stringutil,
 )
diff --git a/mercurial/utils/interfaceutil.py b/mercurial/interfaces/util.py
rename from mercurial/utils/interfaceutil.py
rename to mercurial/interfaces/util.py
--- a/mercurial/utils/interfaceutil.py
+++ b/mercurial/interfaces/util.py
@@ -1,4 +1,4 @@ 
-# interfaceutil.py - Utilities for declaring interfaces.
+# util.py - Utilities for declaring interfaces.
 #
 # Copyright 2018 Gregory Szorc <gregory.szorc@gmail.com>
 #
diff --git a/mercurial/interfaces/repository.py b/mercurial/interfaces/repository.py
--- a/mercurial/interfaces/repository.py
+++ b/mercurial/interfaces/repository.py
@@ -11,8 +11,8 @@ 
 from .. import (
     error,
 )
-from ..utils import (
-    interfaceutil,
+from . import (
+    util as interfaceutil,
 )
 
 # When narrowing is finalized and no longer subject to format changes,
diff --git a/mercurial/httppeer.py b/mercurial/httppeer.py
--- a/mercurial/httppeer.py
+++ b/mercurial/httppeer.py
@@ -16,9 +16,6 @@ 
 import weakref
 
 from .i18n import _
-from .interfaces import (
-    repository,
-)
 from . import (
     bundle2,
     error,
@@ -33,9 +30,12 @@ 
     wireprotov2peer,
     wireprotov2server,
 )
+from .interfaces import (
+    repository,
+    util as interfaceutil,
+)
 from .utils import (
     cborutil,
-    interfaceutil,
     stringutil,
 )
 
diff --git a/mercurial/filelog.py b/mercurial/filelog.py
--- a/mercurial/filelog.py
+++ b/mercurial/filelog.py
@@ -18,9 +18,9 @@ 
 )
 from .interfaces import (
     repository,
+    util as interfaceutil,
 )
 from .utils import (
-    interfaceutil,
     storageutil,
 )
 
diff --git a/hgext/sqlitestore.py b/hgext/sqlitestore.py
--- a/hgext/sqlitestore.py
+++ b/hgext/sqlitestore.py
@@ -75,9 +75,9 @@ 
 )
 from mercurial.interfaces import (
     repository,
+    util as interfaceutil,
 )
 from mercurial.utils import (
-    interfaceutil,
     storageutil,
 )