def migrate_wiki(args): """ Migrate a Github wiki from one Github instance to another. WARNING: This will copy the git repository verbatim. Any commits on the target repository that are not also on the source will be lost. """ with cli.catch_api_errors(): src = Repo(args.src) dst = Repo(args.dst) migrators.wiki.migrate(src, dst)
def test_raises_if_given_repoless_identifier(self): with assert_raises(GithubError): Repo('test:foo')
def test_str_enterprise(self): o = Repo('enterprise:foo/bar') assert_equal(str(o), '<Repo enterprise:foo/bar>')
def test_str(self): o = Repo('foo/bar') assert_equal(str(o), '<Repo foo/bar>')
def setup(self): self.patcher = patch('ghtools.github.repo.make_client') self.mock_client_cons = self.patcher.start() self.mock_client = self.mock_client_cons.return_value self.r = Repo('test:foo/bar')