summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Pursehouse <david.pursehouse@sonymobile.com>2012-09-11 14:33:51 +0900
committerGustaf Lundh <gustaf.lundh@sonymobile.com>2012-09-18 09:54:57 +0200
commite00aa6b923d28a3c910f85e7726e4ba1d2a9aebd (patch)
tree07c848b81c58e5d4a8e34ecae8606ee5fa62679e
parent86d973d24ec6771504c37eddc535dff8e03c724f (diff)
downloadgit-repo-e00aa6b923d28a3c910f85e7726e4ba1d2a9aebd.tar.gz
Clean up imports
manifest_xml: import `HEAD` and `R_HEADS` from correct module version: import `HEAD` from correct module `HEAD` and `R_HEADS` should be imported from the git_refs module, where they are originally defined, rather than from the project module. repo: remove unused import of readline cherry_pick: import standard modules on separate lines smartsync: import subcmd modules explicitly from subcmd Use: `import re import sys` and `from subcmds.sync import Sync` Instead of: `import sys, re` and `from sync import Sync` Change-Id: Ie10dd6832710939634c4f5c86b9ba5a9cd6fc92e
-rw-r--r--manifest_xml.py3
-rwxr-xr-xrepo1
-rw-r--r--subcmds/cherry_pick.py3
-rw-r--r--subcmds/smartsync.py2
-rw-r--r--subcmds/version.py2
5 files changed, 6 insertions, 5 deletions
diff --git a/manifest_xml.py b/manifest_xml.py
index 8e9efd13..f4f6a755 100644
--- a/manifest_xml.py
+++ b/manifest_xml.py
@@ -21,7 +21,8 @@ import urlparse
21import xml.dom.minidom 21import xml.dom.minidom
22 22
23from git_config import GitConfig 23from git_config import GitConfig
24from project import RemoteSpec, Project, MetaProject, R_HEADS, HEAD 24from git_refs import R_HEADS, HEAD
25from project import RemoteSpec, Project, MetaProject
25from error import ManifestParseError 26from error import ManifestParseError
26 27
27MANIFEST_FILE_NAME = 'manifest.xml' 28MANIFEST_FILE_NAME = 'manifest.xml'
diff --git a/repo b/repo
index d6b46c87..f540cbb3 100755
--- a/repo
+++ b/repo
@@ -88,7 +88,6 @@ REPO_MAIN = S_repo + '/main.py' # main script
88import optparse 88import optparse
89import os 89import os
90import re 90import re
91import readline
92import subprocess 91import subprocess
93import sys 92import sys
94import urllib2 93import urllib2
diff --git a/subcmds/cherry_pick.py b/subcmds/cherry_pick.py
index 7890af4d..7a6d4c20 100644
--- a/subcmds/cherry_pick.py
+++ b/subcmds/cherry_pick.py
@@ -13,7 +13,8 @@
13# See the License for the specific language governing permissions and 13# See the License for the specific language governing permissions and
14# limitations under the License. 14# limitations under the License.
15 15
16import sys, re 16import re
17import sys
17from command import Command 18from command import Command
18from git_command import GitCommand 19from git_command import GitCommand
19 20
diff --git a/subcmds/smartsync.py b/subcmds/smartsync.py
index 1edbd35b..e164859f 100644
--- a/subcmds/smartsync.py
+++ b/subcmds/smartsync.py
@@ -13,7 +13,7 @@
13# See the License for the specific language governing permissions and 13# See the License for the specific language governing permissions and
14# limitations under the License. 14# limitations under the License.
15 15
16from sync import Sync 16from subcmds.sync import Sync
17 17
18class Smartsync(Sync): 18class Smartsync(Sync):
19 common = True 19 common = True
diff --git a/subcmds/version.py b/subcmds/version.py
index 03195f88..243e3676 100644
--- a/subcmds/version.py
+++ b/subcmds/version.py
@@ -16,7 +16,7 @@
16import sys 16import sys
17from command import Command, MirrorSafeCommand 17from command import Command, MirrorSafeCommand
18from git_command import git 18from git_command import git
19from project import HEAD 19from git_refs import HEAD
20 20
21class Version(Command, MirrorSafeCommand): 21class Version(Command, MirrorSafeCommand):
22 wrapper_version = None 22 wrapper_version = None