本文整理汇总了C++中ProjectConfiguration::git_remote_repository_url_set方法的典型用法代码示例。如果您正苦于以下问题:C++ ProjectConfiguration::git_remote_repository_url_set方法的具体用法?C++ ProjectConfiguration::git_remote_repository_url_set怎么用?C++ ProjectConfiguration::git_remote_repository_url_set使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ProjectConfiguration
的用法示例。
在下文中一共展示了ProjectConfiguration::git_remote_repository_url_set方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: on_assistant_apply
void RemoteRepositoryAssistant::on_assistant_apply ()
{
// Configurations.
extern Settings *settings;
ProjectConfiguration *projectconfig = settings->projectconfig(bible);
// Whether to use the remote repository.
bool use_remote_repository = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(checkbutton_use_repository));
if (bible_notes_selector_bible ())
projectconfig->git_use_remote_repository_set(use_remote_repository);
else
settings->genconfig.consultation_notes_git_use_remote_repository_set(use_remote_repository);
// The remote repository URL.
if (bible_notes_selector_bible ())
projectconfig->git_remote_repository_url_set(repository_url_get());
else
settings->genconfig.consultation_notes_git_remote_repository_url_set(repository_url_get());
// If the repository was cloned, move it into place.
if (repository_was_cloned()) {
ustring destination_data_directory;
if (bible_notes_selector_bible ())
destination_data_directory = project_data_directory_project(bible);
else
destination_data_directory = notes_shared_storage_folder ();
unix_rmdir(destination_data_directory);
unix_mv(persistent_clone_directory, destination_data_directory);
// Switch rename detection off.
// This is necessary for the consultation notes, since git has been seen to cause spurious renames.
GwSpawn spawn ("git");
spawn.workingdirectory (destination_data_directory);
spawn.arg ("config");
spawn.arg ("--global");
spawn.arg ("diff.renamelimit");
spawn.arg ("0");
spawn.run ();
}
if (bible_notes_selector_bible ()) {
// Take a snapshot of the whole project.
snapshots_shoot_project (bible);
} else{
// Create the index for the consultation notes.
notes_create_index ();
}
// Show summary.
gtk_assistant_set_current_page (GTK_ASSISTANT (assistant), summary_page_number);
}