4
# Copyright (C) 2011 Jelmer Vernooij <jelmer@apache.org>
6
# This program is free software; you can redistribute it and/or modify
7
# it under the terms of the GNU General Public License as published by
8
# the Free Software Foundation; either version 2 of the License, or
9
# (at your option) any later version.
11
# This program is distributed in the hope that it will be useful,
12
# but WITHOUT ANY WARRANTY; without even the implied warranty of
13
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
# GNU General Public License for more details.
16
# You should have received a copy of the GNU General Public License
17
# along with this program; if not, write to the Free Software
18
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21
"""Remote helper for git for accessing bzr repositories."""
27
def handle_sigint(signal, frame):
30
signal.signal(signal.SIGINT, handle_sigint)
35
from breezy.plugin import load_plugins
38
from breezy.git.git_remote_helper import (
44
from breezy.trace import warning
46
parser = optparse.OptionParser()
47
(opts, args) = parser.parse_args()
48
(shortname, url) = args
51
'git-remote-bzr is experimental and has not been optimized for '
52
'performance. Use \'brz fast-export\' and \'git fast-import\' for '
53
'large repositories.')
55
helper = RemoteHelper(open_local_dir(), shortname, open_remote_dir(url))
56
helper.process(sys.stdin.buffer, sys.stdout.buffer)