changeset 6211:f89fd07fc51d

Expand import * to allow Pyflakes to find problems
author Joel Rosdahl <joel@rosdahl.net>
date Thu, 06 Mar 2008 22:23:26 +0100
parents 942287cb1f57
children e75aab656f46
files hgext/acl.py hgext/bugzilla.py hgext/convert/hg.py hgext/extdiff.py hgext/fetch.py hgext/imerge.py hgext/keyword.py hgext/notify.py hgext/patchbomb.py hgext/win32text.py mercurial/archival.py mercurial/bundlerepo.py mercurial/changelog.py mercurial/cmdutil.py mercurial/commands.py mercurial/context.py mercurial/dirstate.py mercurial/dispatch.py mercurial/filelog.py mercurial/filemerge.py mercurial/hg.py mercurial/hgweb/hgweb_mod.py mercurial/hgweb/protocol.py mercurial/httprepo.py mercurial/localrepo.py mercurial/manifest.py mercurial/merge.py mercurial/patch.py mercurial/repair.py mercurial/revlog.py mercurial/sshrepo.py mercurial/sshserver.py mercurial/verify.py
diffstat 33 files changed, 38 insertions(+), 36 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/acl.py	Fri Mar 07 00:24:36 2008 +0100
+++ b/hgext/acl.py	Thu Mar 06 22:23:26 2008 +0100
@@ -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
 
--- a/hgext/bugzilla.py	Fri Mar 07 00:24:36 2008 +0100
+++ b/hgext/bugzilla.py	Thu Mar 06 22:23:26 2008 +0100
@@ -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
 
--- a/hgext/convert/hg.py	Fri Mar 07 00:24:36 2008 +0100
+++ b/hgext/convert/hg.py	Thu Mar 06 22:23:26 2008 +0100
@@ -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
--- a/hgext/extdiff.py	Fri Mar 07 00:24:36 2008 +0100
+++ b/hgext/extdiff.py	Thu Mar 06 22:23:26 2008 +0100
@@ -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
 
--- a/hgext/fetch.py	Fri Mar 07 00:24:36 2008 +0100
+++ b/hgext/fetch.py	Thu Mar 06 22:23:26 2008 +0100
@@ -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):
--- a/hgext/imerge.py	Fri Mar 07 00:24:36 2008 +0100
+++ b/hgext/imerge.py	Thu Mar 06 22:23:26 2008 +0100
@@ -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
--- a/hgext/keyword.py	Fri Mar 07 00:24:36 2008 +0100
+++ b/hgext/keyword.py	Thu Mar 06 22:23:26 2008 +0100
@@ -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
 
--- a/hgext/notify.py	Fri Mar 07 00:24:36 2008 +0100
+++ b/hgext/notify.py	Thu Mar 06 22:23:26 2008 +0100
@@ -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
 
--- a/hgext/patchbomb.py	Fri Mar 07 00:24:36 2008 +0100
+++ b/hgext/patchbomb.py	Thu Mar 06 22:23:26 2008 +0100
@@ -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
--- a/hgext/win32text.py	Fri Mar 07 00:24:36 2008 +0100
+++ b/hgext/win32text.py	Thu Mar 06 22:23:26 2008 +0100
@@ -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.
--- a/mercurial/archival.py	Fri Mar 07 00:24:36 2008 +0100
+++ b/mercurial/archival.py	Thu Mar 06 22:23:26 2008 +0100
@@ -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
 
--- a/mercurial/bundlerepo.py	Fri Mar 07 00:24:36 2008 +0100
+++ b/mercurial/bundlerepo.py	Thu Mar 06 22:23:26 2008 +0100
@@ -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
--- a/mercurial/changelog.py	Fri Mar 07 00:24:36 2008 +0100
+++ b/mercurial/changelog.py	Thu Mar 06 22:23:26 2008 +0100
@@ -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
 
--- a/mercurial/cmdutil.py	Fri Mar 07 00:24:36 2008 +0100
+++ b/mercurial/cmdutil.py	Thu Mar 06 22:23:26 2008 +0100
@@ -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
--- a/mercurial/commands.py	Fri Mar 07 00:24:36 2008 +0100
+++ b/mercurial/commands.py	Thu Mar 06 22:23:26 2008 +0100
@@ -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
--- a/mercurial/context.py	Fri Mar 07 00:24:36 2008 +0100
+++ b/mercurial/context.py	Thu Mar 06 22:23:26 2008 +0100
@@ -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
 
--- a/mercurial/dirstate.py	Fri Mar 07 00:24:36 2008 +0100
+++ b/mercurial/dirstate.py	Thu Mar 06 22:23:26 2008 +0100
@@ -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
--- a/mercurial/dispatch.py	Fri Mar 07 00:24:36 2008 +0100
+++ b/mercurial/dispatch.py	Thu Mar 06 22:23:26 2008 +0100
@@ -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
--- a/mercurial/filelog.py	Fri Mar 07 00:24:36 2008 +0100
+++ b/mercurial/filelog.py	Thu Mar 06 22:23:26 2008 +0100
@@ -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):
--- a/mercurial/filemerge.py	Fri Mar 07 00:24:36 2008 +0100
+++ b/mercurial/filemerge.py	Thu Mar 06 22:23:26 2008 +0100
@@ -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
 
--- a/mercurial/hg.py	Fri Mar 07 00:24:36 2008 +0100
+++ b/mercurial/hg.py	Thu Mar 06 22:23:26 2008 +0100
@@ -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
--- a/mercurial/hgweb/hgweb_mod.py	Fri Mar 07 00:24:36 2008 +0100
+++ b/mercurial/hgweb/hgweb_mod.py	Thu Mar 06 22:23:26 2008 +0100
@@ -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
--- a/mercurial/hgweb/protocol.py	Fri Mar 07 00:24:36 2008 +0100
+++ b/mercurial/hgweb/protocol.py	Thu Mar 06 22:23:26 2008 +0100
@@ -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
 
--- a/mercurial/httprepo.py	Fri Mar 07 00:24:36 2008 +0100
+++ b/mercurial/httprepo.py	Thu Mar 06 22:23:26 2008 +0100
@@ -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
--- a/mercurial/localrepo.py	Fri Mar 07 00:24:36 2008 +0100
+++ b/mercurial/localrepo.py	Thu Mar 06 22:23:26 2008 +0100
@@ -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
--- a/mercurial/manifest.py	Fri Mar 07 00:24:36 2008 +0100
+++ b/mercurial/manifest.py	Thu Mar 06 22:23:26 2008 +0100
@@ -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
 
--- a/mercurial/merge.py	Fri Mar 07 00:24:36 2008 +0100
+++ b/mercurial/merge.py	Thu Mar 06 22:23:26 2008 +0100
@@ -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
 
--- a/mercurial/patch.py	Fri Mar 07 00:24:36 2008 +0100
+++ b/mercurial/patch.py	Thu Mar 06 22:23:26 2008 +0100
@@ -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
--- a/mercurial/repair.py	Fri Mar 07 00:24:36 2008 +0100
+++ b/mercurial/repair.py	Thu Mar 06 22:23:26 2008 +0100
@@ -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"""
--- a/mercurial/revlog.py	Fri Mar 07 00:24:36 2008 +0100
+++ b/mercurial/revlog.py	Thu Mar 06 22:23:26 2008 +0100
@@ -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
--- a/mercurial/sshrepo.py	Fri Mar 07 00:24:36 2008 +0100
+++ b/mercurial/sshrepo.py	Thu Mar 06 22:23:26 2008 +0100
@@ -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
 
--- a/mercurial/sshserver.py	Fri Mar 07 00:24:36 2008 +0100
+++ b/mercurial/sshserver.py	Thu Mar 06 22:23:26 2008 +0100
@@ -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):
--- a/mercurial/verify.py	Fri Mar 07 00:24:36 2008 +0100
+++ b/mercurial/verify.py	Thu Mar 06 22:23:26 2008 +0100
@@ -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