Пример #1
0
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)
Пример #2
0
 def test_raises_if_given_repoless_identifier(self):
     with assert_raises(GithubError):
         Repo('test:foo')
Пример #3
0
 def test_str_enterprise(self):
     o = Repo('enterprise:foo/bar')
     assert_equal(str(o), '<Repo enterprise:foo/bar>')
Пример #4
0
 def test_str(self):
     o = Repo('foo/bar')
     assert_equal(str(o), '<Repo foo/bar>')
Пример #5
0
 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')