Commit Graph

827 Commits

Author SHA1 Message Date
hjk
aa69415ac7 Git: Aspectify settings
Change-Id: I87dfeba360967cc77cc230811bcd9f67b3ea6e38
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2021-03-19 13:39:33 +00:00
Orgad Shaneh
e3ace00a43 Git: Deduplicate stderr output on commit
It appears while the process is running, then printed again when it's done.

Change-Id: I86737eccfcf34d82ccca1ec4b9a7f42fc66bf86c
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2020-10-14 16:49:51 +00:00
Orgad Shaneh
48c56416f5 Git: Do not prompt to add files in a submodule
Fixes: QTCREATORBUG-23845
Change-Id: Ibf20eed26469b5a8599927e5ac2d458bbff9a156
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2020-10-04 17:06:23 +00:00
Orgad Shaneh
eb6a2f2b89 Git: Enable Show for file in a specified revision
Fixes: QTCREATORBUG-24689
Change-Id: Ic4ceb1c59f39009c28be7f34ee62f65fd41506c1
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2020-09-29 07:09:18 +00:00
Tasuku Suzuki
367d0dc4f7 Improve git archive userbility
Archive should be saved at one level upper directory from repo dir.
When user change archive name to e.g. project-v1.0, Qt Creator saves it
to project-v1.tar.gz now. It should be project-v1.0.tar.gz

Change-Id: Ibcd3c6bd8413bbb28fcdae13e5eb43016dc2b6a3
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2020-09-03 15:34:14 +00:00
Eike Ziller
3944162039 Merge remote-tracking branch 'origin/4.13' into master
Conflicts:
	cmake/QtCreatorIDEBranding.cmake
	qbs/modules/qtc/qtc.qbs
	qtcreator_ide_branding.pri
	src/plugins/cmakeprojectmanager/cmakebuildstep.cpp
	src/plugins/cmakeprojectmanager/cmakebuildstep.h
	tests/auto/debugger/tst_namedemangler.cpp
	tests/auto/qml/codemodel/check/tst_check.cpp

Change-Id: Iefd5f71c03c0078513b76a92af764a4fb22ee4c2
2020-08-10 15:56:54 +02:00
Orgad Shaneh
14e3a379c1 Git: Suggest branch name based on the commit subject
... when the checked out commit is not a remote branch.

Fixes: QTCREATORBUG-24006
Change-Id: I175a3aedba88bd9e3b5cf298c5c161c56e9d0acd
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2020-08-04 20:23:45 +00:00
Orgad Shaneh
a48cde86f3 Git: Show full description on tooltip in commit chooser dialogs
Like Push to Gerrit, Rebase, Reset, Fixup Commit.

Fixes: QTCREATORBUG-24366
Change-Id: I0f596f84661a1a4f37fe971683cc0d985a6c9b1f
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2020-08-02 05:00:50 +00:00
Andre Hartmann
e903f9e350 Git: Fix quoting of repository name
... in the "Uncommited Changes Found" dialog.

Change-Id: I7f987786f4aada47983b849419e2443311dec75f
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2020-07-24 14:04:15 +00:00
hjk
43b658e9e7 Utils: Drop Utils::SkipEmptyParts again
We require Qt 5.14 nowadays.

Change-Id: Iff245257d3cb19207007c0445ee13814e66152dd
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-07-21 12:42:27 +00:00
Orgad Shaneh
c0c5773345 Git: Add new files with --intent-to-add
Sometimes the file is modified after adding it, either by Qt Creator itself
or by the user.

Running Diff on such a file may look strange. Instead of showing the entire
file, it shows the diff since it was added with its initial content.

Fixes: QTCREATORBUG-23441
Change-Id: I712cc574053f39753250685aec148d2b6d7db192
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2020-07-19 03:59:45 +00:00
Christian Stenger
228f6d04af Git: Replace QRegExp by QRegularExpression
Task-number: QTCREATORBUG-24098
Change-Id: I77a2e9959981b2e173142253baf1668d57982a2e
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2020-07-14 09:09:42 +00:00
hjk
e1c88116b3 Core/Utils: Migrate further to Utils::Id
The coreplugin/id.h header is kept for downstream for now.

Change-Id: I8c44590f7b988b3770ecdc177c40783e12353e66
(cherry picked from commit 430a33dcd9)
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-07-06 11:15:18 +00:00
Andre Hartmann
c9eedbe0f3 Git: Port colorful log to text colors
Fixes: QTCREATORBUG-24198
Change-Id: Icde06da5ac848fb0f7faf02a8e55fb26136f318c
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2020-07-06 10:55:43 +00:00
hjk
1c81a3b3e8 All: Use Utils::SkipEmptyParts
Task-number: QTCREATORBUG-24098
Change-Id: Iab45de9a9c17ddc39a0e343b1175d4f6cb94b098
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-06-17 05:55:25 +00:00
Orgad Shaneh
bfcd1149eb Git: Do not read working directory before it is set
This amends commit c17767c78e.

Change-Id: Ide6f9de2420dd1262b27aed83351b76404cdba30
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: hjk <hjk@qt.io>
2020-06-08 13:18:28 +00:00
Andre Hartmann
79766caf52 Git: Use internal log highlighter for old git versions
Git didn't have RGB color support before version 2.3.0.
If an older version is used, fall back to the internal
log highlighter, i.e. don't disable it.

Amends commit d1b096699

Change-Id: I66f84dc4e79f7374d02f6d76c6f912c43e7f04bd
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2020-05-19 12:00:52 +00:00
Andre Hartmann
d1b0966996 Git: Fix filling commit selection combobox for log
Broken by commit cbb70513bf, which changed the
format for the normal log to override the highlighter.

We still need the hightlighter for the log with diff.

Therefore, a separation between highlighting
and parsing the log is needed to populate the
combobox for commit selection again.

Change-Id: I902ce548fc25875f2cd67b165283ff1236329afa
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2020-05-16 19:47:46 +00:00
Andre Hartmann
cbb70513bf Git: Allow colorful logs
Requires Git 2.3 or higher for RGB colors.

Can be enabled for the normal or graph log
with the "Color" tool button. For the diff
log, the old behavior is kept (highlighter
is used for the "normal" log, no colors at
all for the graph log)

Fixes: QTCREATORBUG-19624
Change-Id: I8a42a7ad0ebf99ceb459355310311d702dcf9977
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2020-05-13 14:03:46 +00:00
Andre Hartmann
f486ff7dab Git: Add git bash to tools menu
Can be useful to perform tasks that don't have
a dedicated UI in Creator.

In my setup, git bash was directly in the git
installation folder %ProgramFiles%\Git and
therefore one level above git.exe itself.

Change-Id: I1ca0d3439690170d7fb840bca17e2c412effe0a4
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2020-05-05 14:23:03 +00:00
Orgad Shaneh
4e66cd0770 Git: Support diff against a selected commit
Change-Id: Ibb4287bf00f1d0c3212630d60e59ab80b600a879
Reviewed-by: hjk <hjk@qt.io>
2020-04-21 10:06:44 +00:00
Orgad Shaneh
0b57675d40 Git: Simplify diff editor controllers
Change-Id: I3c1fb205a1197d6c3a457067eb2b7f355f28c55c
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2020-04-14 05:25:08 +00:00
Orgad Shaneh
9e3bbf36f2 Git: Change some functions in GitClient to const
Change-Id: Iefd3e0345c7a507d1d5c225ea81677e7a93df295
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2020-04-10 14:18:56 +00:00
Orgad Shaneh
c86c4d54e2 Git: Fix order of arguments on branch diff
When there is a command in progress.

Change-Id: I73e8378283fcc34f324f862daaf2529b6a0f1265
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2020-04-10 06:01:31 +00:00
Andre Hartmann
a59420a9c3 Git: Improve the Checkout > Create Branch > Add dialog
Suggest a local branch name here also.

Fixes: QTCREATORBUG-23797
Change-Id: I16228507858380bc2ff6dc8590279155624d3d28
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2020-04-04 19:26:52 +00:00
Leena Miettinen
ff8751c576 Git: Fix UI text according to the guidelines
https://doc.qt.io/qtcreator-extending/qtcreator-ui-text.html

Task-number: QTCREATORBUG-23683
Change-Id: I1843de5a9166760bf52632f75dab74507029bf8c
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2020-03-11 10:23:37 +00:00
Orgad Shaneh
ba87fb2083 Git: Add actions for changes in output window context menu
Change-Id: I5aa46f87b82670286ac225d71a3a045133976e86
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2020-02-28 09:53:51 +00:00
Orgad Shaneh
b52ffa2501 Git: Move addChangeActions from GitEditor to GitClient
Change-Id: Id901994ac2909b00ca58a0a8a91d2d3a273c39b3
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: hjk <hjk@qt.io>
2020-02-26 10:40:21 +00:00
Orgad Shaneh
7c4f0a9b1e Git: Store singleton instance in GitClient
On many cases, GitPlugin is not required at all, and is only used as
a proxy for GitClient.

Change-Id: I246012658ab3e8c7a12f1a459b1b1748ff358e0b
Reviewed-by: hjk <hjk@qt.io>
2020-02-26 10:29:27 +00:00
Orgad Shaneh
b14351dab8 Git: Support case-insensitive grep/pickaxe
Change-Id: Ie3da0f5cca2bd3ffa658e3adbba0b1b86a2911d9
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2020-02-20 19:05:36 +00:00
Orgad Shaneh
6d8efefbe5 Git: Add a toggle button for filter widget
Change-Id: If9680d1fc8a06f57f995a63095ad201fc1f3156b
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2020-02-20 19:05:25 +00:00
Orgad Shaneh
ee05e49f79 Git: Support entry list in reflog
Change-Id: Ic24eff465c6870f42c1964a8700cc6f0b2c0dce5
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2020-02-19 07:23:42 +00:00
Orgad Shaneh
857102748d Git: Refine editor names
Change-Id: I8302e1341e589b3c0e39c3d6c1d73b01e142e517
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2020-02-19 07:23:26 +00:00
Orgad Shaneh
c728d04b52 Git: Support reflog also for branches
Change-Id: I9321ba4964d086d90aaf540a2006f95b94de8375
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2020-02-19 07:23:11 +00:00
Orgad Shaneh
c9f1d84db7 Git: Add config widget to reflog
Change-Id: I04a9bd86c38ab27537c2d6981179a667bc36e61b
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2020-02-19 07:22:57 +00:00
Orgad Shaneh
1b2aa56f15 Git: Add grep and pickaxe filters
Fixes: QTCREATORBUG-22512
Change-Id: I98eed9a7f9da15e163804a0fd81713149a06c5b0
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2020-02-17 13:11:52 +00:00
hjk
b9739c0945 Git: Hack around quoting problem with Short description on blame
Task-number: QTCREATORBUG-23208
Change-Id: Iaff99d7cd175d3d974ea295472cba2679da08372
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2020-02-17 07:01:13 +00:00
Andre Hartmann
b3cf553e1a Git: Ignore unknown push failures
Pushing to Gerrit can fail with due to missing
Change-Id. In that case, none of the existing
warnings should appear.

Change-Id: I4bf55d35a792b680e3ae524e116ce5db9fdd405a
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Miklós Márton <martonmiklosqdev@gmail.com>
2020-02-16 16:18:35 +00:00
Orgad Shaneh
f2cd459ec5 VCS: Abstract multi-choice settings in editor config
Change-Id: Iafc089f5ad3796348ab9521b71b31cb645238292
Reviewed-by: hjk <hjk@qt.io>
2020-02-13 07:58:14 +00:00
hjk
eb1226df68 Git: Partially move plugin pimpl to .cpp
Same procedure as for ClearCase.
Unfortuately, some deep accesses are not easy to get rid of. Make them
available by static functions in the plugin itself. Definitely not the
favorite setup, but allows to proceed with the QObject removals.

Change-Id: Id85ed07bc7a6c1c053431a14dd7f68892f7ebea0
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2020-02-07 12:56:10 +00:00
hjk
b22768e980 Diff/Vcs: Use a function object for reloading
Helps with slimming down the user code side.

Change-Id: I4b0aac76c0d1516eb05bff9c18594e64f8b41a7a
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2020-02-06 11:21:59 +00:00
hjk
c17767c78e Vcs: Use setters to set up DiffController parameters
Plan is to avoid client use down there, so extract the actually
used data first and pass it down.

Change-Id: I088fc9cc3086e8f6e1e0c3c9d3a35445f752e6f0
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2020-02-06 07:03:14 +00:00
Orgad Shaneh
adcea96868 Git: Rename Show Diff -> Diff
Change-Id: I5b04edb6661cde53003a8cfe72854b4c214e187e
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2020-02-05 21:15:23 +00:00
hjk
b8fe25db25 Vcs: Merge IVersionControl and VcsBasePlugin hierarchies
They were 1:1 in parallel, with quite a bit of function call
ping-pong inbetween, for code-sharing-by-inheritance. Merge
them by making VcsBasePlugin inherit IVersionControl and
merge the derived classes below.

Size of this patch is hard to avoid as all seven systems have to
move simultaneously. Non-necessary potential follow-up cleanup
have been left out on purpose.

Change-Id: Icb71e4182af3db21069cc637e7ae87ffa3829791
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2020-01-31 12:36:23 +00:00
hjk
866f3aeb4a Vcs: Pass settings handles to settings pages more directly
Change-Id: I5fdec80de5678dd544713fc18335cbd805d7b9f4
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2020-01-24 11:40:49 +00:00
hjk
1cd936c531 Vcs: Pimpl plugins
Essentially rename all *Plugin into *PluginPrivate, and pull out
the actual IPlugin related pieces into new *Plugin classes.

Shift the construction of the PluginPrivate to initialize(),
following the general pattern.

I tried to keep the patch as mechanical as possible, giving
room to some obvious but less mechanical cleanup needs,
that are intentionally left out of this here.

Change-Id: Iac662bf73338f9f7669064ed67b960246875c23c
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2020-01-24 09:47:28 +00:00
hjk
823c44de18 Vcs: Move static functions out of VcsPlugin "namespace"
Plan is to split VcsPlugin in the pure IPlugin and a new class
the remaining non-IPlugin bits of VcsPlugin, call it VcsPluginPrivate
and use that d-ptr for VcsPlugin. VcsPlugin-derived classes can
then use VcsPluginPrivate derived private, later pointer members
of the *Privates can be made proper members, moving towards the
otherwise predominant plugin setup pattern.

Change-Id: I62db9269e8ca50633c24b6d1d735d59c8fa8e5a5
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2020-01-23 08:20:36 +00:00
Andre Hartmann
cb8da0e93b Git: Fix updating branch view on push to new remote branch
If the remote branch does not exist yet,
we need to update the whole branch model,
in order to set the remote-tracking information
and to add the new branch to the remote branches.

Amends da6972e0a9

Change-Id: I9f01ceffa45fcb5e2ea8afe8762b102a550b8e43
Reviewed-by: Marius Sincovici <smaryus@gmail.com>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2019-12-29 06:24:20 +00:00
Andre Hartmann
da6972e0a9 Git: Update current branch after some operations
... to refresh the branch view upstream status.

No need for a full model update here, only the current
branch is influenced.

Change-Id: I6bd17a841988b36221e5015a5858071d33a7b5e5
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2019-12-27 11:51:45 +00:00
Andre Hartmann
acd1d6c438 Git: Always use commit hash in archive
Storing the archive as "Project-HEAD" or even
"Project-master" is ambiguous.

Better resolve the reference to to have unique
archive identifiers.

Change-Id: I1233c20e5975028d084d6587b4a0f47390d1fd17
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2019-12-24 08:50:42 +00:00