[PATCH 1 of 7] Expand import * to allow Pyflakes to find problems
Joel Rosdahl
joel at rosdahl.net
Thu Mar 6 21:52:12 UTC 2008
# HG changeset patch
# User Joel Rosdahl <joel at rosdahl.net>
# Date 1204838606 -3600
# Node ID e3b7802f77150184eb392c498ea40beecf4c6431
# Parent 0068809347d72e552f980487ee669ace9a82d214
Expand import * to allow Pyflakes to find problems
diff --git a/hgext/acl.py b/hgext/acl.py
--- a/hgext/acl.py
+++ b/hgext/acl.py
@@ -46,7 +46,7 @@
# ** = user6
from mercurial.i18n import _
-from mercurial.node import *
+from mercurial.node import bin, short
from mercurial import util
import getpass
diff --git a/hgext/bugzilla.py b/hgext/bugzilla.py
--- a/hgext/bugzilla.py
+++ b/hgext/bugzilla.py
@@ -53,7 +53,7 @@
# committer_email = bugzilla_user_name
from mercurial.i18n import _
-from mercurial.node import *
+from mercurial.node import short
from mercurial import cmdutil, templater, util
import os, re, time
diff --git a/hgext/convert/hg.py b/hgext/convert/hg.py
--- a/hgext/convert/hg.py
+++ b/hgext/convert/hg.py
@@ -15,7 +15,7 @@
import os, time
from mercurial.i18n import _
-from mercurial.node import *
+from mercurial.node import bin, hex, nullid
from mercurial import hg, lock, revlog, util
from common import NoRepo, commit, converter_source, converter_sink
diff --git a/hgext/extdiff.py b/hgext/extdiff.py
--- a/hgext/extdiff.py
+++ b/hgext/extdiff.py
@@ -46,7 +46,7 @@
'''
from mercurial.i18n import _
-from mercurial.node import *
+from mercurial.node import short
from mercurial import cmdutil, util, commands
import os, shlex, shutil, tempfile
diff --git a/hgext/fetch.py b/hgext/fetch.py
--- a/hgext/fetch.py
+++ b/hgext/fetch.py
@@ -6,7 +6,7 @@
# of the GNU General Public License, incorporated herein by reference.
from mercurial.i18n import _
-from mercurial.node import *
+from mercurial.node import nullid, short
from mercurial import commands, cmdutil, hg, node, util
def fetch(ui, repo, source='default', **opts):
diff --git a/hgext/imerge.py b/hgext/imerge.py
--- a/hgext/imerge.py
+++ b/hgext/imerge.py
@@ -6,7 +6,7 @@
'''
from mercurial.i18n import _
-from mercurial.node import *
+from mercurial.node import hex, short
from mercurial import commands, cmdutil, dispatch, fancyopts
from mercurial import hg, filemerge, util
import os, tarfile
diff --git a/hgext/keyword.py b/hgext/keyword.py
--- a/hgext/keyword.py
+++ b/hgext/keyword.py
@@ -81,7 +81,7 @@
from mercurial import commands, cmdutil, context, dispatch, filelog, revlog
from mercurial import patch, localrepo, templater, templatefilters, util
from mercurial.hgweb import webcommands
-from mercurial.node import *
+from mercurial.node import nullid, hex
from mercurial.i18n import _
import re, shutil, tempfile, time
diff --git a/hgext/notify.py b/hgext/notify.py
--- a/hgext/notify.py
+++ b/hgext/notify.py
@@ -66,7 +66,7 @@
# push changes to, they can manage their own subscriptions.
from mercurial.i18n import _
-from mercurial.node import *
+from mercurial.node import bin, short
from mercurial import patch, cmdutil, templater, util, mail
import email.Parser, fnmatch, socket, time
diff --git a/hgext/patchbomb.py b/hgext/patchbomb.py
--- a/hgext/patchbomb.py
+++ b/hgext/patchbomb.py
@@ -69,7 +69,7 @@
import email.Utils, email.Encoders
from mercurial import cmdutil, commands, hg, mail, ui, patch, util
from mercurial.i18n import _
-from mercurial.node import *
+from mercurial.node import bin
def patchbomb(ui, repo, *revs, **opts):
'''send changesets by email
diff --git a/hgext/win32text.py b/hgext/win32text.py
--- a/hgext/win32text.py
+++ b/hgext/win32text.py
@@ -24,7 +24,7 @@
from mercurial import util, ui
from mercurial.i18n import gettext as _
-from mercurial.node import *
+from mercurial.node import bin, short
import re
# regexp for single LF without CR preceding.
diff --git a/mercurial/archival.py b/mercurial/archival.py
--- a/mercurial/archival.py
+++ b/mercurial/archival.py
@@ -6,7 +6,7 @@
# the GNU General Public License, incorporated herein by reference.
from i18n import _
-from node import *
+from node import hex
import cStringIO, os, stat, tarfile, time, util, zipfile
import zlib, gzip
diff --git a/mercurial/bundlerepo.py b/mercurial/bundlerepo.py
--- a/mercurial/bundlerepo.py
+++ b/mercurial/bundlerepo.py
@@ -10,7 +10,7 @@
of the GNU General Public License, incorporated herein by reference.
"""
-from node import *
+from node import hex, nullid, short
from i18n import _
import changegroup, util, os, struct, bz2, tempfile, mdiff
import localrepo, changelog, manifest, filelog, revlog
diff --git a/mercurial/changelog.py b/mercurial/changelog.py
--- a/mercurial/changelog.py
+++ b/mercurial/changelog.py
@@ -5,7 +5,8 @@
# This software may be used and distributed according to the terms
# of the GNU General Public License, incorporated herein by reference.
-from revlog import *
+from node import bin, hex, nullid
+from revlog import revlog
from i18n import _
import os, time, util
diff --git a/mercurial/cmdutil.py b/mercurial/cmdutil.py
--- a/mercurial/cmdutil.py
+++ b/mercurial/cmdutil.py
@@ -5,7 +5,7 @@
# This software may be used and distributed according to the terms
# of the GNU General Public License, incorporated herein by reference.
-from node import *
+from node import hex, nullid, nullrev, short
from i18n import _
import os, sys, bisect, stat
import mdiff, bdiff, util, templater, templatefilters, patch, errno
diff --git a/mercurial/commands.py b/mercurial/commands.py
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -5,7 +5,7 @@
# This software may be used and distributed according to the terms
# of the GNU General Public License, incorporated herein by reference.
-from node import *
+from node import hex, nullid, nullrev, short
from i18n import _
import os, re, sys, urllib
import hg, util, revlog, bundlerepo, extensions
diff --git a/mercurial/context.py b/mercurial/context.py
--- a/mercurial/context.py
+++ b/mercurial/context.py
@@ -5,7 +5,7 @@
# This software may be used and distributed according to the terms
# of the GNU General Public License, incorporated herein by reference.
-from node import *
+from node import nullid, nullrev, short
from i18n import _
import ancestor, bdiff, repo, revlog, util, os, errno
diff --git a/mercurial/dirstate.py b/mercurial/dirstate.py
--- a/mercurial/dirstate.py
+++ b/mercurial/dirstate.py
@@ -7,7 +7,7 @@
of the GNU General Public License, incorporated herein by reference.
"""
-from node import *
+from node import nullid
from i18n import _
import struct, os, time, bisect, stat, strutil, util, re, errno, ignore
import cStringIO, osutil
diff --git a/mercurial/dispatch.py b/mercurial/dispatch.py
--- a/mercurial/dispatch.py
+++ b/mercurial/dispatch.py
@@ -5,7 +5,6 @@
# This software may be used and distributed according to the terms
# of the GNU General Public License, incorporated herein by reference.
-from node import *
from i18n import _
import os, sys, atexit, signal, pdb, traceback, socket, errno, shlex, time
import util, commands, hg, lock, fancyopts, revlog, version, extensions, hook
diff --git a/mercurial/filelog.py b/mercurial/filelog.py
--- a/mercurial/filelog.py
+++ b/mercurial/filelog.py
@@ -5,7 +5,8 @@
# This software may be used and distributed according to the terms
# of the GNU General Public License, incorporated herein by reference.
-from revlog import *
+from node import bin, nullid
+from revlog import revlog
import os
class filelog(revlog):
diff --git a/mercurial/filemerge.py b/mercurial/filemerge.py
--- a/mercurial/filemerge.py
+++ b/mercurial/filemerge.py
@@ -5,7 +5,7 @@
# This software may be used and distributed according to the terms
# of the GNU General Public License, incorporated herein by reference.
-from node import *
+from node import nullrev
from i18n import _
import util, os, tempfile, context, simplemerge, re, filecmp
diff --git a/mercurial/hg.py b/mercurial/hg.py
--- a/mercurial/hg.py
+++ b/mercurial/hg.py
@@ -6,8 +6,8 @@
# This software may be used and distributed according to the terms
# of the GNU General Public License, incorporated herein by reference.
-from node import *
-from repo import *
+from node import bin, hex, nullid, nullrev, short
+from repo import NoCapability, RepoError
from i18n import _
import localrepo, bundlerepo, httprepo, sshrepo, statichttprepo
import errno, lock, os, shutil, util, extensions
diff --git a/mercurial/hgweb/hgweb_mod.py b/mercurial/hgweb/hgweb_mod.py
--- a/mercurial/hgweb/hgweb_mod.py
+++ b/mercurial/hgweb/hgweb_mod.py
@@ -7,7 +7,7 @@
# of the GNU General Public License, incorporated herein by reference.
import os, mimetypes, re
-from mercurial.node import *
+from mercurial.node import hex, nullid, short
from mercurial import mdiff, ui, hg, util, archival, patch, hook
from mercurial import revlog, templater, templatefilters, changegroup
from common import get_mtime, style_map, paritygen, countgen, get_contact
diff --git a/mercurial/hgweb/protocol.py b/mercurial/hgweb/protocol.py
--- a/mercurial/hgweb/protocol.py
+++ b/mercurial/hgweb/protocol.py
@@ -8,7 +8,7 @@
import cStringIO, zlib, bz2, tempfile, errno, os, sys
from mercurial import util, streamclone
from mercurial.i18n import gettext as _
-from mercurial.node import *
+from mercurial.node import bin, hex
from mercurial import changegroup as changegroupmod
from common import HTTP_OK, HTTP_NOT_FOUND, HTTP_SERVER_ERROR
diff --git a/mercurial/httprepo.py b/mercurial/httprepo.py
--- a/mercurial/httprepo.py
+++ b/mercurial/httprepo.py
@@ -6,8 +6,8 @@
# This software may be used and distributed according to the terms
# of the GNU General Public License, incorporated herein by reference.
-from node import *
-from remoterepo import *
+from node import bin, hex
+from remoterepo import remoterepository
from i18n import _
import repo, os, urllib, urllib2, urlparse, zlib, util, httplib
import errno, keepalive, tempfile, socket, changegroup
diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py
--- a/mercurial/localrepo.py
+++ b/mercurial/localrepo.py
@@ -5,7 +5,7 @@
# This software may be used and distributed according to the terms
# of the GNU General Public License, incorporated herein by reference.
-from node import *
+from node import bin, hex, nullid, nullrev, short
from i18n import _
import repo, changegroup
import changelog, dirstate, filelog, manifest, context, weakref
diff --git a/mercurial/manifest.py b/mercurial/manifest.py
--- a/mercurial/manifest.py
+++ b/mercurial/manifest.py
@@ -5,7 +5,8 @@
# This software may be used and distributed according to the terms
# of the GNU General Public License, incorporated herein by reference.
-from revlog import *
+from node import bin, hex, nullid
+from revlog import revlog, RevlogError
from i18n import _
import array, bisect, struct, mdiff
diff --git a/mercurial/merge.py b/mercurial/merge.py
--- a/mercurial/merge.py
+++ b/mercurial/merge.py
@@ -5,7 +5,7 @@
# This software may be used and distributed according to the terms
# of the GNU General Public License, incorporated herein by reference.
-from node import *
+from node import nullid, nullrev
from i18n import _
import errno, util, os, heapq, filemerge
diff --git a/mercurial/patch.py b/mercurial/patch.py
--- a/mercurial/patch.py
+++ b/mercurial/patch.py
@@ -7,7 +7,7 @@
# of the GNU General Public License, incorporated herein by reference.
from i18n import _
-from node import *
+from node import hex, nullid, short
import base85, cmdutil, mdiff, util, context, revlog, diffhelpers
import cStringIO, email.Parser, os, popen2, re, sha, errno
import sys, tempfile, zlib
diff --git a/mercurial/repair.py b/mercurial/repair.py
--- a/mercurial/repair.py
+++ b/mercurial/repair.py
@@ -7,7 +7,7 @@
# of the GNU General Public License, incorporated herein by reference.
import changegroup, os
-from node import *
+from node import nullrev, short
def _bundle(repo, bases, heads, node, suffix, extranodes=None):
"""create a bundle with the specified revisions as a backup"""
diff --git a/mercurial/revlog.py b/mercurial/revlog.py
--- a/mercurial/revlog.py
+++ b/mercurial/revlog.py
@@ -10,7 +10,7 @@
of the GNU General Public License, incorporated herein by reference.
"""
-from node import *
+from node import bin, hex, nullid, nullrev, short
from i18n import _
import binascii, changegroup, errno, ancestor, mdiff, os
import sha, struct, util, zlib
diff --git a/mercurial/sshrepo.py b/mercurial/sshrepo.py
--- a/mercurial/sshrepo.py
+++ b/mercurial/sshrepo.py
@@ -5,8 +5,8 @@
# This software may be used and distributed according to the terms
# of the GNU General Public License, incorporated herein by reference.
-from node import *
-from remoterepo import *
+from node import bin, hex
+from remoterepo import remotelock, remoterepository
from i18n import _
import repo, os, re, stat, util
diff --git a/mercurial/sshserver.py b/mercurial/sshserver.py
--- a/mercurial/sshserver.py
+++ b/mercurial/sshserver.py
@@ -7,7 +7,7 @@
# of the GNU General Public License, incorporated herein by reference.
from i18n import _
-from node import *
+from node import bin, hex
import os, streamclone, sys, tempfile, util, hook
class sshserver(object):
diff --git a/mercurial/verify.py b/mercurial/verify.py
--- a/mercurial/verify.py
+++ b/mercurial/verify.py
@@ -5,7 +5,7 @@
# This software may be used and distributed according to the terms
# of the GNU General Public License, incorporated herein by reference.
-from node import *
+from node import nullid, short
from i18n import _
import revlog
More information about the Mercurial-devel
mailing list