Commit Graph

1595 Commits

Author SHA1 Message Date
Eike Ziller
55400d5bec Merge remote-tracking branch 'origin/4.2'
Change-Id: I8896af66cf8af7436cf3946ddb013742260d50a9
2017-02-01 14:07:43 +01:00
Orgad Shaneh
3ceb4c5c7a Git: Fix result check on reset
Choosing Discard on Pull, when there are uncommitted changes, fails
when it tries to execute git reset --hard.

This broke in ca7a924a06:
if (!rc) was replaced by if (resp.result == Finished).

Change-Id: I19e080ee08eb52bf2156da7c27ade4b77cf2ece0
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-01-31 10:41:10 +00:00
Eike Ziller
b299ff19ec Merge remote-tracking branch 'origin/4.2'
Conflicts:
	src/shared/qbs

Change-Id: Ic39fd1c411632f56312fae31c0c88ebc1098b5a4
2017-01-30 10:55:40 +01:00
Orgad Shaneh
bb916860ca Gerrit: Outline GerritDialog UI
Change-Id: Iad8d804feb16f8b5318d07f4fdb32d050e0798c0
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-01-30 08:59:31 +00:00
Orgad Shaneh
b2b1f6bec1 Gerrit: Append " (Draft)" to draft changes
Similar to the web UI.

Change-Id: I596a116a85536c010089afd9c8a0686a75d29dde
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-01-30 08:50:01 +00:00
Orgad Shaneh
2def95374d Git: Fix crash on Commit + Push to Gerrit
Task-number: QTCREATORBUG-17634
Change-Id: I60d8067fe9cfc23acb688e06506363bca67ec0a5
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-01-30 08:41:04 +00:00
Orgad Shaneh
34504ad797 Gerrit: Determine server by git remote
Currently SSH only.

Change-Id: Ic29ca20e4c63cb5c692e9dc196ba205f0cbc9c6f
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-01-26 12:00:23 +00:00
Orgad Shaneh
c317114591 Gerrit: Expect *existing* directory on the path chooser
Change-Id: I72cca5bfaab7a2b4f0faa619005bc41fad59c1bf
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-01-26 12:00:17 +00:00
Orgad Shaneh
7cfbcb41b9 Git: Persist topic per branch on Push to Gerrit
Change-Id: I5a4056f562bb3264a8bd35d73fb16860eb0984e7
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2017-01-23 11:53:12 +00:00
Tobias Hunger
c6f90e575e Utils: Introduce a TemporaryDirectory and TemporaryFile class
Both wrap the corresponding Qt class, but make sure all temporary files
or directories are created inside a "master temporary directory".

Change-Id: I55461be507c828c965224c02863ea5ed9bbf9498
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-01-20 12:17:10 +00:00
Tobias Hunger
8c0510f672 Git: Enable/disable Repository Browser action
Enable/disable Repository Browser action based on whether or not the
relevant setting is defined or not.

Change-Id: I37f501e41c99390921d2b147625dbdc388d0dcc7
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2017-01-16 13:59:34 +00:00
Orgad Shaneh
2e2c3c39af Gerrit: Factor out server settings
Preparing for gerrit determination by git remote.

Task-number: QTCREATORBUG-8381
Change-Id: Ic862210f40124cd2fb4bb4aa125c7b8e534cd764
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2017-01-15 22:09:55 +00:00
Orgad Shaneh
5035807f89 Gerrit: Minor cleanup
* Remove unused member
* Inline function that is used only once
* Replace slots with lambdas

Change-Id: I6887b115463c9aac24d4c3dfe6a70357c9068973
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2017-01-15 18:01:10 +00:00
Jarek Kobus
8b67458a95 Prefix editor's uniqueId with plugin name
In this way we minimize the chance of
generating non-unique id.

Change-Id: Idd177c5a4b44b17a58c2a944ec77b9517e91964e
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-01-10 15:14:19 +00:00
Tasuku Suzuki
ac83af4ef0 Git: Add Sign off feature in git commit view
Change-Id: Icb0a8818f707d6a874a9b97318fc6a93205b4ce9
Signed-off-by: Tasuku Suzuki <tasuku.suzuki@qt.io>
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2017-01-05 08:17:33 +00:00
Ulf Hermann
018ba5a834 Rename the "ERROR" icon to "CRITICAL"
We mostly use this icon in terms of showing messages which might be
informational, warnings, or errors. We cannot call the icon "ERROR" as
that clashes with some macro on windows. To be more inline with Qt's
predefined messaging macros (qDebug(), qInfo(), qWarning(),
qCritical(), qFatal()), we rename the icon to "CRITICAL" and regroup
the entries in the header to suggest this usage.

Change-Id: I89880919d7ca54ea9c86de384eb29f375bf3075f
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2017-01-02 12:27:54 +00:00
Andre Hartmann
81ebdf3b02 Git: Add rebase --skip action
Task-number: QTCREATORBUG-17350
Change-Id: I42f081dbdb47c78055c7167ff47c7f3d9af4c856
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-12-12 12:15:12 +00:00
Eike Ziller
e487b3bd55 Merge remote-tracking branch 'origin/4.2'
Change-Id: I575f1cf98f2a4740577cdd94da21687d3392cdb7
2016-11-30 15:09:11 +01:00
Orgad Shaneh
329c24ce3a Git: Replace msysGit with Git for Windows in comments
msysGit is obsolete

Change-Id: Iaa2aee0de2e8280dcc060cdd26b41962fb38a112
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-11-29 16:34:44 +00:00
Orgad Shaneh
1c3f4686da Git: Replace msysGit -> Git in HOME description tooltip
msysGit is obsolete

Change-Id: Iafb80f218ec2eb4404c76d41fc55b24842383538
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-11-29 16:34:41 +00:00
Orgad Shaneh
7b3642cce4 Merge remote-tracking branch 'origin/4.2'
Change-Id: I259a402bc896fc2e359cc96b7510453ac9a9a552
2016-11-28 15:27:51 +02:00
Orgad Shaneh
5832f52cee VCS: Replace describe slots with lambdas
Change-Id: I05ca25aad8be43fdfa15d3fb5eaaa9bf753ee79f
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-11-28 09:38:12 +00:00
Eike Ziller
57ca90b846 BaseFileFind/FindInFiles: Clean up enabled / valid state handling
IFindFilter:  Separate enabledChanged and validChanged
SearchEngine: Add enabledChanged
GitGrep:      Enable widget based on enabled state
FindInFiles:  Update validity on search engine enabledChanged instead of
              hardcoding it to when the search path changed

Change-Id: I0c684423b871a3a4f1f164574f42e23b64cf9da0
Reviewed-by: David Schulz <david.schulz@qt.io>
2016-11-25 08:42:53 +00:00
Marco Bubke
ddfd29852a Utils: First step to extend search results for clang query support
We need multi line support, multi text range support. This is only adding
enablers and adds later the multi line and multi text support because this
triggers larger changes because you have to know the text document.

Change-Id: I44e46d9d80d7d73b2650c69cc83657c20c85bfae
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2016-11-23 10:48:59 +00:00
Jarek Kobus
c1b6685d50 Reuse existing controller when requesting existing diff editor
Change-Id: I01d54f0bd131b8ae7daee74533375920fa544adf
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2016-11-22 13:36:36 +00:00
Przemyslaw Gorszkowski
6b2cf5cd03 FindInFiles: make possible to have more than one extension
This change adds a possibility to add more than
one external tool which can be used instead of internal finder.
Currently there is one extension: 'gitgrep'.
By default we use internal finder.

Change-Id: If644358552f3cea9ebda8308539322a1b6d3ab77
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2016-11-16 09:52:05 +00:00
Tobias Hunger
6fe3d3bde9 Git: Only show note about perl if perl is not found in PATH
Task-number: QTCREATORBUG-17154
Change-Id: I4602084204a3b26ead8d4e3e8108d6d4642c829a
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2016-11-14 22:47:46 +00:00
Orgad Shaneh
9c09ca9e42 Merge remote-tracking branch 'origin/4.2'
Change-Id: Ia98031eb87f1859c3736faa0cdd8b655e8a50689
2016-11-14 11:17:13 +02:00
Christian Stenger
beb54e31d4 Git: Fix missing include
Change-Id: Id77828b24df73f6e28f1c2ae6fd7533e826a99c2
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2016-11-09 11:41:57 +00:00
Orgad Shaneh
4ed00a348b Git: Make mergetool parsing more robust
Symbolic link conflict is printed in 2 phases: First "  {remote}", and
then "a symbolic link -> 'foo.cpp'".

This happens because this message involves an additional cat process:

  elif is_symlink "$mode"
  then
      echo "a symbolic link -> '$(cat "$file")'"

For local/remote line, wait for a full line before parsing.

Change-Id: I641cde12aa44dee2f7dff8fdae70da0c443e55d3
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2016-11-09 08:55:04 +00:00
Orgad Shaneh
877a10c8ef Git: Support typechange
Replacing a normal file with a symbolic link.

Change-Id: Id07ab339e8fcdf039b61d6e459b8d751d499f4f6
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-11-09 08:53:51 +00:00
Orgad Shaneh
b98f2a3059 Git: Simplify translations
Change-Id: I6b1af54d6cb5bc5569f5fffdec29f00b37a34436
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-11-09 08:53:47 +00:00
Orgad Shaneh
0bcfc977e9 Git: Show success message on abort
Change-Id: Ie0ec1a9c00673a6cd50c2a7c54b83303c80cf55c
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-11-09 08:50:16 +00:00
Orgad Shaneh
3eaddacf74 Git: Disambiguate revision from path on log
If you have a file with the same name as the current branch (in the
repo's root), Push to Gerrit opens with an empty list.

Change-Id: I607c67b1d00da83d4551d3f3f75e5a91478294d5
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-11-09 08:48:52 +00:00
Przemyslaw Gorszkowski
39d85833b5 GitGrep: fixed substitution of regexp
Task-number: QTCREATORBUG-17193
Change-Id: I7e11a5a55f373dce98a9e203bb3bcb5e929174fc
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2016-11-03 10:35:59 +00:00
Orgad Shaneh
fd6b3cd484 Git: Enable "First Parent" display in log editor
Shows merge commits instead of recursing into them.

When Diff is enabled, it will be done against the merge commit's parent,
rather than showing conflict resolution.

Change-Id: Iaa3ac622ffde34e58763a968d387041e0ef99b21
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-10-25 08:47:52 +00:00
Orgad Shaneh
c844071627 Rename VcsBaseEditorParameterWidget -> VcsBaseEditorConfig
Change-Id: I5626e66ba2b7a760ce55263edce9e716067ea6a4
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2016-10-24 16:23:59 +00:00
Jarek Kobus
2c6adc1e74 VCS: Replace QToolButtons in VCS toolbar with QActions
Change VcsBaseEditorParameterWidget to add actions/widgets to an
existing toolbar, instead of being a widget itself.

The class is renamed in a follow-up commit.

Task-number: QTCREATORBUG-14934
Change-Id: I473a439d12a096f4cbb64f06faa0598ee72000de
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2016-10-24 16:23:33 +00:00
Orgad Shaneh
4ca1fb0e9a VCS: Fix inverse condition
compare returns 0 when the strings are equal

Change-Id: I4dfd3b402d48a3043e9674f1d82e66c968e8ba94
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-10-24 09:07:46 +00:00
Tobias Hunger
28325aa446 VCS: Add a way to filter out files/directories that belong to a VCS
Change-Id: I4dcbe6242cfe327e3b72d3dd550309be45e326a9
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2016-10-21 13:04:40 +00:00
Tobias Hunger
a693bd97ef VCS: "final"-ize IVersionControl implementations
Change-Id: I123a8da9b08b2fe5de679d5caac7fa20bfb0ef4a
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2016-10-21 08:22:27 +00:00
Alessandro Portale
9c830a1619 Git: Use Utils::Icon for IconItemDelegate constructor
Use our icon abstraction instead of file names, because themed icons are
coming.

Change-Id: I0f4e44caf96aeab0c354d2166b111d59b7b29149
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2016-10-11 13:29:30 +00:00
Orgad Shaneh
7f0b371c11 Git: Fix initially disabled OK button in Push to Gerrit
Change-Id: I7223ef113781eb9adae59dba58036c19a96a11b0
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-10-05 16:04:14 +00:00
Tim Jenssen
d915b22db9 improve static initializers
Change-Id: I304fdd6627f01fc216c84930da607127c52409d9
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2016-09-23 14:27:01 +00:00
Orgad Shaneh
c01d7a7540 Merge remote-tracking branch 'origin/4.1'
Change-Id: Ieaddc6093d10c08a54acb9b57cbbfe022bc3c038
2016-09-22 11:01:16 +03:00
Orgad Shaneh
ff963bc184 Git: Avoid QProcess::waitForReadyRead in MergeTool
It's unreliable on Windows with Qt 5.7.

Change-Id: I0703ae825e9db80ac8063d9f6962863a68591ed6
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-09-20 13:23:35 +00:00
Orgad Shaneh
c64b3f9882 Git: Do not rely on QProcess::readData/writeData in MergeTool
readData always returns 0 in Qt 5.7 (unless the process is not
running)...

Instead, write to the VCS output pane when reading from/writing to the
process.

Change-Id: Ie832d813d5a859b4ff5841fd2888783833c97945
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-09-20 13:23:30 +00:00
Orgad Shaneh
8d14f76c10 Gerrit: Support pushing initial commit for review
Enable manual selection of target branch on this case.

Task-number: QTCREATORBUG-16780
Change-Id: I925ceef52ec56ebf77abcee58065c7b8afcc0854
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-09-12 14:21:07 +00:00
Orgad Shaneh
5b49ed506b Git: Return empty list for remote branches when there are none
The function currently returns "<Detached HEAD>"

Change-Id: I68786d5521549aacc29807632a5054593db24b3b
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-09-12 14:21:02 +00:00
Eike Ziller
841778ed69 Merge remote-tracking branch 'origin/4.1'
Change-Id: I80f96f100046625f24b6ab5d13fdb05660365abc
2016-08-22 16:30:56 +02:00