Improve code readability by requiring iteratable Group
to be named For.
The For's c'tor requires an iterator element as a first arg.
The For's c'tor allows for passing exactly one iterator element.
It's not possible to place iterators inside Group element anymore.
Change-Id: I9dfe2c0da058abac161f66c4e336da2417c383f1
Reviewed-by: hjk <hjk@qt.io>
This removes the "Precedes: <resolving>" label when
doing git show on a very fresh, local commit.
The same fix applies to "Branches", though not sure if
it's possible that there is no branch.
Change-Id: I08614d47b229bd04256de1a059876d679cc57b99
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Use LoopList element instead of constructing large tree.
Change-Id: Ie10af350c7ed15a7d06363414174042b65c7ec53
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Rename process.h back to qtcprocess.h
MSVC's "threads" standard header includes <process.h>, and that ends up
including our process.h from Utils.
There already was a hacky workaround in place for a similar issue with
MINGW, but that doesn't work with MSVC because that doesn't have
Simply use a name that doesn't conflict.
Change-Id: I1159cd2096b4f2dbc4a1728d0131dd6edd30ebd3
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
Git allows mapping authors and mail addresses:
https://git-scm.com/docs/gitmailmap
While using this file already worked for (instant)
blame, log and show still used the original values
from the repo. This patch makes the display within
Creator consistent.
Change-Id: I3c0e764c435a505e285941f4fdc91131f85af590
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Both VcsBaseClient::vcsBinary() and VcsBaseClient::processEnvironment()
get an additional parameter "FilePath target" to allow selecting binaries
and environment based on where the repository is located.
This allows to select e.g. a git binary on a remote device, and the
environment of the remote device for each VCS operation.
A bunch of file path operations are either fixed or ported to actually use
FilePath correctly.
Change-Id: I6afc645772fde3dff3ec19c13efe538e5888e952
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
The timeout is only used with runBlocking(), otherwise it's no-op.
Change-Id: I7d81e4a73c7182bd19c435c112a2d64c3f40ba2e
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Get rid of unused errorMessage arg.
Return the stash list directly.
Change-Id: I9bf156c5ecda476a5def3c3490d6cb13d011a3cd
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Get rid of unused errorMessage arg.
Return the stash name directly.
Change-Id: I11e7b0ef4dcaa38293cbf5d20b7213cc06850257
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Parse the version string with base 10 now.
Amends abee98b44817d1aee63b5cd9b673d0c3aa1733ba
Change-Id: I2f0b47380a9714b3f3de475ddabe78875db3b608
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Move a call to setRepository() from c'tor into the setup() method,
as it should be called just before the process is started.
Add an accompanying call to clearRepository() into
the cleanup() method.
Remove other manual calls to setRepository() and clearRepository().
Change-Id: I35b9d4ea72cc885bb8ae34950987a8ca18584fd1
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Plan is to hide the plugin class definition to the .cpp later.
Change-Id: I27f6d2dd23adb4f3ab47d99b0626956889d2750f
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Do a copy of future interface inside the lambda body instead.
Change-Id: If84e37c62e43b815cfea0b5f60fe7fcebca63093
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This addresses the 20th point in the master task below.
Task-number: QTCREATORBUG-28741
Change-Id: I696beda87430fbe637abba8054012fb77516e220
Reviewed-by: hjk <hjk@qt.io>
Make the c'tor of the GroupItem taking the TreeStorageBase
public instead.
This addresses the 20th point in the master task below.
Task-number: QTCREATORBUG-28741
Change-Id: I78320ec24b4e4b915ab549135fb93b45c658b9f2
Reviewed-by: hjk <hjk@qt.io>
Make naming consistent with recent changes.
"Done" is meant to be an event name when the task / group
finishes. "Done" may finish with "Success" or an "Error".
This addresses the 26th point in the task below.
Task-number: QTCREATORBUG-28741
Change-Id: I53ed6905b1c385c398f49e122e8ca60aa3ad0806
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
Make naming consistent with recent changes.
"Done" is meant to be an event name when the task / group
finishes. "Done" may finish with "Success" or an "Error".
This addresses the 26th point in the master task below.
Task-number: QTCREATORBUG-28741
Change-Id: Icc882710dc4896626dc9332440aa13a692af54c4
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Make it possible to setup onGroupDone element with additional
OnDone argument.
The onGroupDone handler may accept extra DoneResult argument.
The onGroupDone handler may also tweak the success bit of a group.
All above features conform to the behavior of the task done handler.
Task-number: QTCREATORBUG-29834
Change-Id: I125bdfe155e585678fb33410632246401cbc9390
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
This makes it possible to recognize the cancel state
when the task was automatically stopped because of task's
parent group workflow policy or when the user called TaskTree::stop().
This addresses the 2nd point in the master task below.
Task-number: QTCREATORBUG-28741
Task-number: QTCREATORBUG-29834
Change-Id: I2798b9ec1d2f1d667aff51ee0271a5a15a525dc1
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Get rid of CustomTask c'tor taking 3 handlers.
If the done handler needs to be called only on
success or an error, add explicit 3rd arg of CallDoneIf type.
Task-number: QTCREATORBUG-29834
Change-Id: I10e55415587e6cac46620dd5177ad8269584583c
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Instead of specifying two separate done and error handlers,
specify just one that takes additional "bool success" argument.
Task-number: QTCREATORBUG-29834
Change-Id: Ib92ef2dcd960372d9db6c8f50d4017a33c49ccd3
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
The overloaded c'tor takes one done handler with an additional
"bool success" argument.
Task-number: QTCREATORBUG-29834
Change-Id: Id579d055721a2a07a5a9f0900aa4a73655f21610
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Use GroupItem instead of ProcessTask inside topRevision().
Replace some [=] captures with more explicit ones.
Change-Id: I2e321f7121f80fd2689ecf57cd9735ba56a7962e
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
QFile::exists only calls QFileInfo::exists, so this saves one
function call per invocation.
Change-Id: I41cb407345654eeead14455a4955b8b9b015aedc
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Alias task types manually.
Don't require the alias to be inside the Tasking namespace.
Addresses the 22th point of the jira ticket below.
Task-number: QTCREATORBUG-28741
Change-Id: I1bdda7fe5a01e4bcb5052ec328f4e0eace878651
Reviewed-by: hjk <hjk@qt.io>
This holds a path list, i.e. possibly several directories, separated
by ';' or ':'. PathChooser can't handle that. Long term this could
be something more sophisticate, but for now it's more a "string" than
one FilePath.
Change-Id: I6665c131e698db3afd268d6ab9bcf3d76a7c7289
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
This does not change the current timing of construction a lot as
the GerritPlugin may need it immediately in some cases, in any
case the gitGrep instance will need it.
There's nothing big going on at destruction time, so the prolonged
lifetime until really close to the end does not hurt.
The reason here is that this way we will avoid cases like in change
5e5b90a9a1.
Change-Id: I326d83c1a3d21114322ac6cce8d9e9b782faacdc
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
It's being deleted on plugin unload, so it should be
a proper substitute.
Change-Id: I27383db72dfa0d5b0df2886b24c96266602ccbac
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: hjk <hjk@qt.io>
Drop some Utils:: and rely on some aspects' operator()()
Change-Id: I40d2c2973c1c9eff443bb74b8da44e0824d8d5c6
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
It's only used as a return value from group's or task's
setup handler. It instructs the running task tree on
how to proceed further.
It addresses the 21th point in the bugreport below.
Task-number: QTCREATORBUG-28741
Change-Id: I25802c76b9e7bc044c6a38197935798d2da9ad02
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: hjk <hjk@qt.io>
Replace requestChunkActions() and chunkActionsRequested()
with a virtual method addExtraActions().
Implement it in GitBaseDiffEditorController.
Task-number: QTCREATORBUG-23242
Change-Id: I5da166b35d1146b9fd439e748803531d982ad2a8
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
The passed Group root element is a recipe with
a full description on how to execute the tasks
and how to handle finished tasks.
We have already virtual methods / setters called like:
deployRecipe, refreshRecipe, reloadRecipe. So, the
common "recipe" is kind of consistent.
Fix typos in warnings.
Addresses the 11th point in the task below.
Task-number: QTCREATORBUG-28741
Change-Id: I1c80f4838b6a3e5ed113eaf8e42b59746d098efe
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>