Fossil command-lines are now passed via a temporary file and the new "--args <Filename>" option.
FossilOrigin-Name: 25812c7fba2c2c125e461f59c8c5577252072e99
This commit is contained in:
parent
0dff445061
commit
c1a3f78fd7
12
manifest
12
manifest
@ -1,5 +1,5 @@
|
||||
C Allow\sadded\sfiles\sto\sbe\sreverted.\sFixes\s[72d5fb6fec]\s
|
||||
D 2015-04-09T10:49:42.881
|
||||
C Fossil\scommand-lines\sare\snow\spassed\svia\sa\stemporary\sfile\sand\sthe\snew\s"--args\s<Filename>"\soption.\n\n
|
||||
D 2015-04-09T11:24:46.379
|
||||
F debian/changelog 19b96029fa5c46944f5c9ffb9a75ce47a19e1dda
|
||||
F debian/compat b6abd567fa79cbe0196d093a067271361dc6ca8b
|
||||
F debian/control f4f9bbf38a523520eadbb6f66325d2784297e2a0
|
||||
@ -197,7 +197,7 @@ F src/FileTableView.cpp 5ddf8c391c9a3ac449ec61fb1db837b577afeec2
|
||||
F src/FileTableView.h 03e56d87c2d46411b9762b87f4d301619aaf18df
|
||||
F src/LoggedProcess.cpp 2a1e5c94bc1e57c8984563e66c210e43a14dc60c
|
||||
F src/LoggedProcess.h 85df7c635c807a5a0e8c4763f17a0752aaff7261
|
||||
F src/MainWindow.cpp cbafd636bc0176075527e9274fca25614db58b8e
|
||||
F src/MainWindow.cpp 018520e94c5a7aef1d3625fff64b42f6ca49b08b
|
||||
F src/MainWindow.h dc0a9ed7de8a338e56c38c00ec303796f31bd24d
|
||||
F src/SettingsDialog.cpp a46cff5e5dd425e3dbdd15632abfd5829f5562b4
|
||||
F src/SettingsDialog.h 4e2790f581e991c744ae9f86580f1972b8c7ff43
|
||||
@ -211,7 +211,7 @@ F ui/CommitDialog.ui 6200f6cabdcf40a20812e811be28e0793f82516f
|
||||
F ui/FileActionDialog.ui 89bb4dc2d0b8adcd41adcb11ec65f2028a09a12d
|
||||
F ui/MainWindow.ui 7ede8bbb54513e0771fdf5d5a2566d88c81b73ad
|
||||
F ui/SettingsDialog.ui 2b7c2870e0054b0f4106f495d85d02c0b814df8b
|
||||
P 4286422aff75481222f2855360bdc6c18c588e38
|
||||
R 3c6bb9d7d703c4d96117c4793a38d635
|
||||
P d8b0af9783cc0822f0ad32a11446b22b394f0959
|
||||
R 08fc47c0c3951d31556ad4c03375e15d
|
||||
U kostas
|
||||
Z e0afd5994aa469a336a7de20ea6c41f1
|
||||
Z 3789e7fee920654870599ddcaa744398
|
||||
|
@ -1 +1 @@
|
||||
d8b0af9783cc0822f0ad32a11446b22b394f0959
|
||||
25812c7fba2c2c125e461f59c8c5577252072e99
|
@ -1109,6 +1109,8 @@ bool MainWindow::runFossilRaw(const QStringList &args, QStringList *output, int
|
||||
|
||||
QString fossil = getFossilPath();
|
||||
|
||||
// Detached processes use the command-line only, to avoid having to wait
|
||||
// for the temporary args file to be released before returing
|
||||
if(detached)
|
||||
return QProcess::startDetached(fossil, args, wkdir);
|
||||
|
||||
@ -1118,11 +1120,37 @@ bool MainWindow::runFossilRaw(const QStringList &args, QStringList *output, int
|
||||
status_msg = QString("Fossil %0").arg(args[0].toCaseFolded());
|
||||
ScopedStatus status(status_msg, ui, progressBar);
|
||||
|
||||
// Generate args file
|
||||
const QStringList *final_args = &args;
|
||||
QTemporaryFile args_file;
|
||||
if(!args_file.open())
|
||||
{
|
||||
QMessageBox::critical(this, tr("Error"), tr("Could not generate command line file"), QMessageBox::Ok );
|
||||
return false;
|
||||
}
|
||||
|
||||
// Write BOM
|
||||
args_file.write(reinterpret_cast<const char *>(UTF8_BOM), sizeof(UTF8_BOM));
|
||||
|
||||
// Write Args
|
||||
foreach(const QString &arg, args)
|
||||
{
|
||||
args_file.write(arg.toUtf8());
|
||||
args_file.write("\n");
|
||||
}
|
||||
args_file.close();
|
||||
|
||||
// Replace args with args filename
|
||||
QStringList run_args;
|
||||
run_args.append("--args");
|
||||
run_args.append(args_file.fileName());
|
||||
final_args = &run_args;
|
||||
|
||||
// Create fossil process
|
||||
LoggedProcess process(this);
|
||||
process.setWorkingDirectory(wkdir);
|
||||
|
||||
process.start(fossil, args);
|
||||
process.start(fossil, *final_args);
|
||||
if(!process.waitForStarted())
|
||||
{
|
||||
log(tr("Could not start Fossil executable '%0'").arg(fossil)+"\n");
|
||||
|
Loading…
x
Reference in New Issue
Block a user