Added support for using a user specified folder for workpaces instead the fossil repository folder
FossilOrigin-Name: 5cd50b0577298e1b73d16c1f74a086911f870839
This commit is contained in:
@ -264,7 +264,15 @@ bool MainWindow::openWorkspace(const QString &path)
|
||||
if(!(QFileInfo(checkout_file1).exists() || QFileInfo(checkout_file2).exists()) )
|
||||
{
|
||||
if(QMessageBox::Yes !=DialogQuery(this, tr("Open Fossil"), "A workspace does not exist in this folder.\nWould you like to create one here?"))
|
||||
{
|
||||
wkspace = QFileDialog::getExistingDirectory(
|
||||
this,
|
||||
tr("Select Workspace Folder"),
|
||||
wkspace);
|
||||
|
||||
if(wkspace.isEmpty() || !QDir(wkspace).exists())
|
||||
return false;
|
||||
}
|
||||
|
||||
// Ok open the fossil
|
||||
setCurrentWorkspace(wkspace);
|
||||
@ -335,29 +343,52 @@ void MainWindow::on_actionNewRepository_triggered()
|
||||
{
|
||||
QString filter(tr("Repositories (*.fossil)"));
|
||||
|
||||
QString path = QFileDialog::getSaveFileName(
|
||||
// Get Repository file
|
||||
QString repo_path = QFileDialog::getSaveFileName(
|
||||
this,
|
||||
tr("New Fossil Repository"),
|
||||
QDir::currentPath(),
|
||||
filter,
|
||||
&filter);
|
||||
|
||||
if(path.isEmpty())
|
||||
if(repo_path.isEmpty())
|
||||
return;
|
||||
|
||||
if(QFile::exists(path))
|
||||
if(QFile::exists(repo_path))
|
||||
{
|
||||
QMessageBox::critical(this, tr("Error"), tr("A repository file already exists.\nRepository creation aborted."), QMessageBox::Ok );
|
||||
return;
|
||||
}
|
||||
stopUI();
|
||||
|
||||
QFileInfo repo_path_info(repo_path);
|
||||
Q_ASSERT(repo_path_info.dir().exists());
|
||||
|
||||
// Get Workspace path
|
||||
QString wkdir = repo_path_info.absoluteDir().absolutePath();
|
||||
if(QMessageBox::Yes != DialogQuery(this, tr("Create Workspace"), "Would you like to create a workspace in the same folder?"))
|
||||
{
|
||||
wkdir = QFileDialog::getExistingDirectory(
|
||||
this,
|
||||
tr("Select Workspace Folder"),
|
||||
wkdir);
|
||||
|
||||
if(wkdir.isEmpty() || !QDir(wkdir).exists())
|
||||
return;
|
||||
}
|
||||
|
||||
stopUI();
|
||||
on_actionClearLog_triggered();
|
||||
|
||||
QFileInfo path_info(path);
|
||||
Q_ASSERT(path_info.dir().exists());
|
||||
QString wkdir = path_info.absoluteDir().absolutePath();
|
||||
repositoryFile = repo_path_info.absoluteFilePath();
|
||||
|
||||
// Create repository
|
||||
if(!runFossil(QStringList() << "new" << QuotePath(repositoryFile)))
|
||||
{
|
||||
QMessageBox::critical(this, tr("Error"), tr("Could not create repository."), QMessageBox::Ok );
|
||||
return;
|
||||
}
|
||||
|
||||
// Create workspace
|
||||
setCurrentWorkspace(wkdir);
|
||||
if(!QDir::setCurrent(wkdir))
|
||||
{
|
||||
@ -365,15 +396,6 @@ void MainWindow::on_actionNewRepository_triggered()
|
||||
return;
|
||||
}
|
||||
|
||||
repositoryFile = path_info.absoluteFilePath();
|
||||
|
||||
// Create repo
|
||||
if(!runFossil(QStringList() << "new" << QuotePath(repositoryFile)))
|
||||
{
|
||||
QMessageBox::critical(this, tr("Error"), tr("Could not create repository."), QMessageBox::Ok );
|
||||
return;
|
||||
}
|
||||
|
||||
// Disable unknown file filter
|
||||
if(!ui->actionViewUnknown->isChecked())
|
||||
ui->actionViewUnknown->setChecked(true);
|
||||
|
12
manifest
12
manifest
@ -1,5 +1,5 @@
|
||||
C When\screating\sa\snew\srepository\salways\sshow\sunknown\sfiles\nMoved\sthe\sclear\slog\saction\sto\sthe\slog\scontext\smenu\nThe\sfile\sview\snow\sdisplays\sthe\sactual\sfiletype\sicons\nBetter\sresizing\sfor\scolumns\sin\sthe\sfileview\nFixed\scrash\sin\sdrag\sand\sdrop\sin\sLinux\n
|
||||
D 2012-04-21T08:36:13.808
|
||||
C Added\ssupport\sfor\susing\sa\suser\sspecified\sfolder\sfor\sworkpaces\sinstead\sthe\sfossil\srepository\sfolder\n
|
||||
D 2012-04-22T09:08:38.880
|
||||
F CommitDialog.cpp a46020a9361151d8d286a2670257d01d8967bf69
|
||||
F CommitDialog.h f1ee8db92103164e7db55a8407ccdcff24571b72
|
||||
F CommitDialog.ui 813d7cba316e226de1a22b7e480bb969fbe9b0c4
|
||||
@ -8,7 +8,7 @@ F FileActionDialog.h 15db1650b3a13d70bc338371e4c033c66e3b79ce
|
||||
F FileActionDialog.ui c63644428579741aeb5fa052e237ba799ced9ad7
|
||||
F FileTableView.cpp 5ddf8c391c9a3ac449ec61fb1db837b577afeec2
|
||||
F FileTableView.h 03e56d87c2d46411b9762b87f4d301619aaf18df
|
||||
F MainWindow.cpp e81955c1902fb6a7ac33c830a425dd1baad5ccc1
|
||||
F MainWindow.cpp daacedbfdbe8d4160f4f0edcea40a89dc49788a3
|
||||
F MainWindow.h 1f6d8db9cf25a89fbbb1e0b33cc63a0e43cfe7ff
|
||||
F MainWindow.ui 6c12a0b141b86c6994d5835618acba19a9ff1976
|
||||
F SettingsDialog.cpp e1fad18cc020d08b82c6d35dc94f6624deec9a3b
|
||||
@ -176,7 +176,7 @@ F installer/fuel.iss 13b6a938bcdf273cbd3649d2549887baa1577214
|
||||
F installer/license.txt 4cc77b90af91e615a64ae04893fdffa7939db84c
|
||||
F main.cpp 69c1f9e873c016ef466d20298a67c3bc4c2b2f3a
|
||||
F resources.qrc e98383ed205f4e37100c60057e0129c3b86dea53
|
||||
P e42f476b1c07959ee224b1abbd60f811893d0717
|
||||
R d8b3609a9646f748b8ef5737cc97987c
|
||||
P 03c02e59f350369dd0a66f24fda209f4ab50137d
|
||||
R 42b9b12104a524ef4b427fe73065af06
|
||||
U kostas
|
||||
Z 8c32e736b7ba845d81c6fe59d1e8d0a9
|
||||
Z 9796c88ed9d1107c3536f179fdb2c4ca
|
||||
|
@ -1 +1 @@
|
||||
03c02e59f350369dd0a66f24fda209f4ab50137d
|
||||
5cd50b0577298e1b73d16c1f74a086911f870839
|
Reference in New Issue
Block a user