Skip to content
Snippets Groups Projects
Commit f5dc1730 authored by Sean Farley's avatar Sean Farley
Browse files

init: sort imports and clean up pep warnings

parent 3246f2fa
No related branches found
No related tags found
No related merge requests found
......@@ -17,5 +17,6 @@
For more information and instructions, see :hg:`help git`
'''
__version__ = '0.8.1'
# global modules
import os
......@@ -21,9 +22,9 @@
def getversion():
"""return version with dependencies for hg --version -v"""
import dulwich
dulver = '.'.join(str(i) for i in dulwich.__version__)
return __version__ + (" (dulwich %s)" % dulver)
# local modules
import gitrepo
import hgrepo
import overlay
import verify
import util
from bisect import insort
......@@ -28,9 +29,8 @@
from bisect import insort
import os
from git_handler import GitHandler
from mercurial import bundlerepo
from mercurial import cmdutil
from mercurial import demandimport
from mercurial import dirstate
from mercurial import discovery
......@@ -32,11 +32,23 @@
from mercurial import bundlerepo
from mercurial import cmdutil
from mercurial import demandimport
from mercurial import dirstate
from mercurial import discovery
from mercurial import extensions
from mercurial import help
from mercurial import hg
from mercurial import localrepo
from mercurial import manifest
from mercurial import revset
from mercurial import scmutil
from mercurial import templatekw
from mercurial import util as hgutil
from mercurial.node import hex
from mercurial.i18n import _
try:
from mercurial import exchange
exchange.push # existed in first iteration of this file
except ImportError:
# We only *use* the exchange module in hg 3.2+, so this is safe
pass
......@@ -37,12 +49,10 @@
try:
from mercurial import exchange
exchange.push # existed in first iteration of this file
except ImportError:
# We only *use* the exchange module in hg 3.2+, so this is safe
pass
from mercurial import extensions
from mercurial import help
from mercurial import hg
try:
from mercurial import ignore
ignore.readpats
......@@ -50,23 +60,8 @@
except ImportError:
# The ignore module disappeared in Mercurial 3.5
ignoremod = False
from mercurial import localrepo
from mercurial import manifest
from mercurial.node import hex
from mercurial import revset
from mercurial import scmutil
from mercurial import templatekw
from mercurial import util as hgutil
from mercurial.i18n import _
import gitrepo
import hgrepo
import overlay
import util
from git_handler import GitHandler
import verify
demandimport.ignore.extend([
'collections',
])
......@@ -68,8 +63,10 @@
demandimport.ignore.extend([
'collections',
])
__version__ = '0.8.1'
testedwith = '2.8.2 3.0.1 3.1 3.2.2 3.3 3.4'
buglink = 'https://bitbucket.org/durin42/hg-git/issues'
......@@ -119,6 +116,12 @@
return hgdefaultdest(source)
hg.defaultdest = defaultdest
def getversion():
"""return version with dependencies for hg --version -v"""
import dulwich
dulver = '.'.join(str(i) for i in dulwich.__version__)
return __version__ + (" (dulwich %s)" % dulver)
# defend against tracebacks if we specify -r in 'hg pull'
def safebranchrevs(orig, lrepo, repo, branches, revs):
revs, co = orig(lrepo, repo, branches, revs)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment