Adapt to upstream change

Change-Id: I0f0de2823eb338cbd327846347f3b3c8e2b61c89
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
Christian Stenger
2023-01-19 07:44:46 +01:00
parent 4e3eb5ab51
commit 435fe5e4db
2 changed files with 12 additions and 8 deletions

View File

@@ -917,7 +917,8 @@ void FossilLogHighlighter::highlightBlock(const QString &text)
void FossilClient::log(const FilePath &workingDir, const QStringList &files, void FossilClient::log(const FilePath &workingDir, const QStringList &files,
const QStringList &extraOptions, const QStringList &extraOptions,
bool enableAnnotationContextMenu) bool enableAnnotationContextMenu,
const std::function<void(Utils::CommandLine &)> &addAuthOptions)
{ {
// Show timeline for both repository and a file or path (--path <file-or-path>) // Show timeline for both repository and a file or path (--path <file-or-path>)
// When used for log repository, the files list is empty // When used for log repository, the files list is empty
@@ -926,7 +927,7 @@ void FossilClient::log(const FilePath &workingDir, const QStringList &files,
SupportedFeatures features = supportedFeatures(); SupportedFeatures features = supportedFeatures();
if (!files.isEmpty() if (!files.isEmpty()
&& !features.testFlag(TimelinePathFeature)) { && !features.testFlag(TimelinePathFeature)) {
logCurrentFile(workingDir, files, extraOptions, enableAnnotationContextMenu); logCurrentFile(workingDir, files, extraOptions, enableAnnotationContextMenu, addAuthOptions);
return; return;
} }
@@ -949,7 +950,7 @@ void FossilClient::log(const FilePath &workingDir, const QStringList &files,
editorConfig->setBaseArguments(extraOptions); editorConfig->setBaseArguments(extraOptions);
// editor has been just created, createVcsEditor() didn't set a configuration widget yet // editor has been just created, createVcsEditor() didn't set a configuration widget yet
connect(editorConfig, &VcsBaseEditorConfig::commandExecutionRequested, connect(editorConfig, &VcsBaseEditorConfig::commandExecutionRequested,
[=]() { this->log(workingDir, files, editorConfig->arguments(), enableAnnotationContextMenu); } ); [=]() { this->log(workingDir, files, editorConfig->arguments(), enableAnnotationContextMenu, addAuthOptions); } );
fossilEditor->setEditorConfig(editorConfig); fossilEditor->setEditorConfig(editorConfig);
} }
} }
@@ -970,7 +971,8 @@ void FossilClient::log(const FilePath &workingDir, const QStringList &files,
void FossilClient::logCurrentFile(const FilePath &workingDir, const QStringList &files, void FossilClient::logCurrentFile(const FilePath &workingDir, const QStringList &files,
const QStringList &extraOptions, const QStringList &extraOptions,
bool enableAnnotationContextMenu) bool enableAnnotationContextMenu,
const std::function<void(Utils::CommandLine &)> &addAuthOptions)
{ {
// Show commit history for the given file/file-revision // Show commit history for the given file/file-revision
// NOTE: 'fossil finfo' shows full history from all branches. // NOTE: 'fossil finfo' shows full history from all branches.
@@ -978,7 +980,7 @@ void FossilClient::logCurrentFile(const FilePath &workingDir, const QStringList
// With newer clients, 'fossil timeline' can handle both repository and file // With newer clients, 'fossil timeline' can handle both repository and file
SupportedFeatures features = supportedFeatures(); SupportedFeatures features = supportedFeatures();
if (features.testFlag(TimelinePathFeature)) { if (features.testFlag(TimelinePathFeature)) {
log(workingDir, files, extraOptions, enableAnnotationContextMenu); log(workingDir, files, extraOptions, enableAnnotationContextMenu, addAuthOptions);
return; return;
} }
@@ -1001,7 +1003,7 @@ void FossilClient::logCurrentFile(const FilePath &workingDir, const QStringList
editorConfig->setBaseArguments(extraOptions); editorConfig->setBaseArguments(extraOptions);
// editor has been just created, createVcsEditor() didn't set a configuration widget yet // editor has been just created, createVcsEditor() didn't set a configuration widget yet
connect(editorConfig, &VcsBaseEditorConfig::commandExecutionRequested, connect(editorConfig, &VcsBaseEditorConfig::commandExecutionRequested,
[=]() { this->logCurrentFile(workingDir, files, editorConfig->arguments(), enableAnnotationContextMenu); } ); [=]() { this->logCurrentFile(workingDir, files, editorConfig->arguments(), enableAnnotationContextMenu, addAuthOptions); } );
fossilEditor->setEditorConfig(editorConfig); fossilEditor->setEditorConfig(editorConfig);
} }
} }

View File

@@ -96,10 +96,12 @@ public:
int lineNumber = -1, const QString &revision = {}, int lineNumber = -1, const QString &revision = {},
const QStringList &extraOptions = {}, int firstLine = -1) final; const QStringList &extraOptions = {}, int firstLine = -1) final;
void log(const Utils::FilePath &workingDir, const QStringList &files = {}, void log(const Utils::FilePath &workingDir, const QStringList &files = {},
const QStringList &extraOptions = {}, bool enableAnnotationContextMenu = false) final; const QStringList &extraOptions = {}, bool enableAnnotationContextMenu = false,
const std::function<void(Utils::CommandLine &)> &addAuthOptions = {}) final;
void logCurrentFile(const Utils::FilePath &workingDir, const QStringList &files = {}, void logCurrentFile(const Utils::FilePath &workingDir, const QStringList &files = {},
const QStringList &extraOptions = {}, const QStringList &extraOptions = {},
bool enableAnnotationContextMenu = false); bool enableAnnotationContextMenu = false,
const std::function<void(Utils::CommandLine &)> &addAuthOptions = {});
void revertFile(const Utils::FilePath &workingDir, const QString &file, void revertFile(const Utils::FilePath &workingDir, const QString &file,
const QString &revision = {}, const QStringList &extraOptions = {}) final; const QString &revision = {}, const QStringList &extraOptions = {}) final;
void revertAll(const Utils::FilePath &workingDir, const QString &revision = {}, void revertAll(const Utils::FilePath &workingDir, const QString &revision = {},