def _set_remote_url_and_commit(repo, remote_url): rconfig = RemoteConfig(repo.config) rconfig.modify("upstream", "url", remote_url) repo.scm.add([repo.config.config_file]) repo.scm.commit("modify remote")
def __init__(self, args): super(CmdRemoteConfig, self).__init__(args) self.remote_config = RemoteConfig(self.config)