1
# Copyright (C) 2009 Jelmer Vernooij <jelmer@samba.org>
3
# This program is free software; you can redistribute it and/or modify
4
# it under the terms of the GNU General Public License as published by
5
# the Free Software Foundation; either version 2 of the License, or
6
# (at your option) any later version.
8
# This program is distributed in the hope that it will be useful,
9
# but WITHOUT ANY WARRANTY; without even the implied warranty of
10
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
# GNU General Public License for more details.
13
# You should have received a copy of the GNU General Public License
14
# along with this program; if not, write to the Free Software
15
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17
"""Push implementation that simply prints message saying push is not supported."""
19
from bzrlib.repository import (
23
from bzrlib.plugins.git.errors import (
26
from bzrlib.plugins.git.repository import (
31
class InterToGitRepository(InterRepository):
32
"""InterRepository that copies into a Git repository."""
34
_matching_repo_format = GitRepositoryFormat()
37
def _get_repo_format_to_test():
40
def copy_content(self, revision_id=None, pb=None):
41
"""See InterRepository.copy_content."""
42
self.fetch(revision_id, pb, find_ghosts=False)
44
def fetch(self, revision_id=None, pb=None, find_ghosts=False,
49
def is_compatible(source, target):
50
"""Be compatible with GitRepository."""
51
return (not isinstance(source, GitRepository) and
52
isinstance(target, GitRepository))