From 0dcbd3d1951ed7b3685f7a07cfe3dfcc9b121391 Mon Sep 17 00:00:00 2001 From: Anton Rieder Date: Tue, 7 Aug 2012 01:35:09 +0200 Subject: [PATCH] Organized imports After an update to Mercurial 2.3 the module 'repo' was removed and the program crashed when trying to convert a repository. I checked the imports with 'pyflakes' and removed all unused ones, repo (among others) was never used. http://www.selenic.com/repo/hg/rev/1ac628cd7113#l9.1 --- hg-fast-export.py | 3 +-- hg-reset.py | 2 +- hg2git.py | 2 +- svn-fast-export.py | 8 ++++---- 4 files changed, 7 insertions(+), 8 deletions(-) diff --git a/hg-fast-export.py b/hg-fast-export.py index 49b2add..e213782 100755 --- a/hg-fast-export.py +++ b/hg-fast-export.py @@ -3,10 +3,9 @@ # Copyright (c) 2007, 2008 Rocco Rutte and others. # License: MIT -from mercurial import repo,hg,cmdutil,util,ui,revlog,node +from mercurial import node from hg2git import setup_repo,fixup_user,get_branch,get_changeset from hg2git import load_cache,save_cache,get_git_sha1,set_default_branch,set_origin_name -from tempfile import mkstemp from optparse import OptionParser import re import sys diff --git a/hg-reset.py b/hg-reset.py index 79719a8..000ed6d 100755 --- a/hg-reset.py +++ b/hg-reset.py @@ -3,7 +3,7 @@ # Copyright (c) 2007, 2008 Rocco Rutte and others. # License: GPLv2 -from mercurial import repo,hg,cmdutil,util,ui,revlog,node +from mercurial import node from hg2git import setup_repo,load_cache,get_changeset,get_git_sha1 from optparse import OptionParser import sys diff --git a/hg2git.py b/hg2git.py index ecaac17..bdf250f 100755 --- a/hg2git.py +++ b/hg2git.py @@ -3,7 +3,7 @@ # Copyright (c) 2007, 2008 Rocco Rutte and others. # License: MIT -from mercurial import repo,hg,cmdutil,util,ui,revlog,node,templatefilters +from mercurial import hg,util,ui,templatefilters import re import os import sys diff --git a/svn-fast-export.py b/svn-fast-export.py index 77496f1..be39ae3 100755 --- a/svn-fast-export.py +++ b/svn-fast-export.py @@ -15,11 +15,11 @@ tags_path = '/tags/' first_rev = 1 final_rev = 0 -import gc, sys, os.path +import sys, os.path from optparse import OptionParser -from time import sleep, mktime, localtime, strftime, strptime -from svn.fs import svn_fs_dir_entries, svn_fs_file_length, svn_fs_file_contents, svn_fs_is_dir, svn_fs_revision_root, svn_fs_youngest_rev, svn_fs_revision_proplist, svn_fs_revision_prop, svn_fs_paths_changed -from svn.core import svn_pool_create, svn_pool_clear, svn_pool_destroy, svn_stream_read, svn_stream_for_stdout, svn_stream_copy, svn_stream_close, run_app +from time import mktime, strptime +from svn.fs import svn_fs_file_length, svn_fs_file_contents, svn_fs_is_dir, svn_fs_revision_root, svn_fs_youngest_rev, svn_fs_revision_proplist, svn_fs_paths_changed +from svn.core import svn_pool_create, svn_pool_clear, svn_pool_destroy, svn_stream_for_stdout, svn_stream_copy, svn_stream_close, run_app from svn.repos import svn_repos_open, svn_repos_fs ct_short = ['M', 'A', 'D', 'R', 'X'] -- 2.11.4.GIT