Commit Graph

760 Commits

Author SHA1 Message Date
Tasuku Suzuki
578cdf7c5a Git: Archive support
This allows users to create archive files from local repository.

Tools > Git > Local Repository > Archive will create <reponame>-
HEAD.tar.gz

Tools > Git > Actions on Commits... you can choose a commit to archive

Change-Id: I09bbbdefe532237e9065d1ca3c21910a036ea149
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: Tasuku Suzuki <tasuku.suzuki@qbc.io>
2019-06-10 18:19:57 +00:00
hjk
473a741c9f Utils: Rename FileName to FilePath
More in line with QFileInfo terminonlogy which appears to be
best-of-breed within Qt.

Change-Id: I1d051ff1c8363ebd4ee56376451df45216c4c9ab
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-05-28 12:23:26 +00:00
hjk
1e9636ab8a Some more FileName::appendPath() -> pathAppended() changes
Change-Id: Ie494f7ae8a96d97c9497b3ef38d774d2cf787b7f
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-05-17 07:46:56 +00:00
Orgad Shaneh
1333b695d4 Git: Suggest to force-push on non-fast-forward failure
Fixes: QTCREATORBUG-21630
Change-Id: I31564d3909a1e3a3a66daf58323952944d5847f9
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2019-05-02 07:47:40 +00:00
Andre Hartmann
0161729c23 Git: Add tags from log window
Fixes: QTCREATORBUG-22202
Change-Id: Id6cbaf036d25fe5e9e8fcf2fe4d131649746e128
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2019-04-03 19:44:11 +00:00
Orgad Shaneh
a87481c5ec Git: Show success message after reset
Change-Id: Icbc731b9b529095e2b8fe0774bfd7eac6455da26
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2019-03-28 08:18:14 +00:00
Orgad Shaneh
b26febac83 Git: Suppress command logging for "log" in fixup commit editor
Change-Id: Ib4aee0a38f0e1cf8d2bdf1ae4884f8e75dbb5193
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2019-03-02 18:02:35 +00:00
Orgad Shaneh
17b3e45b8c VCS: Fix display of diff/show commands in progress bar
In 6ae0e8d2c7 we added 2 arguments that
precede the diff sub-command (-c diff.color=false).

When display name is not set, ShellCommand uses the binary followed by the
first argument, so it now showed "Git -c" instead of "Git Diff".

Change-Id: Ie584837bd87fd529e0cd015025fc3bf1a69d085c
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: Xiaofeng Wang <wasphin@gmail.com>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2019-02-28 08:12:30 +00:00
Friedemann Kleint
963dc84cc5 Fix some deprecation warnings in basic plugins
Fix warnings apppearing in 5.13, for example:
warning: ‘QDir& QDir::operator=(const QString&)’ is deprecated: Use QDir::setPath() instead [-Wdeprecated-declarations]
...
warning: ‘static QRgb QColorDialog::getRgba(QRgb, bool*, QWidget*)’ is deprecated: Use getColor() [-Wdeprecated-declarations]
warning: ‘Qt::DropAction QDrag::start(Qt::DropActions)’ is deprecated: Use QDrag::exec() instead [-Wdeprecated-declarations]
warning: ‘void QProcess::finished(int)’ is deprecated: Use QProcess::finished(int, QProcess::ExitStatus) instead [-Wdeprecated-declarations]
...
warning: ‘const QRect QDesktopWidget::availableGeometry(int) const’ is deprecated: Use QGuiApplication::screens() [-Wdeprecated-declarations]
...
warning: ‘const QBrush& QPalette::background() const’ is deprecated: Use QPalette::window() instead [-Wdeprecated-declarations]
...
warning: ‘const QBrush& QPalette::foreground() const’ is deprecated: Use QPalette::windowText() instead [-Wdeprecated-declarations]
...
warning: ‘void QTextOption::setTabStop(qreal)’ is deprecated [-Wdeprecated-declarations]
warning: ‘void QList<T>::swap(int, int) [with T = ProjectExplorer::BuildStep*]’ is deprecated: Use QList<T>::swapItemsAt() [-Wdeprecated-declarations]
warning: ‘void QProcess::setReadChannelMode(QProcess::ProcessChannelMode)’ is deprecated: Use QProcess::setProcessChannelMode() instead [-Wdeprecated-declarations]
...
warning: ‘QString QFileInfo::readLink() const’ is deprecated: Use QFileInfo::symLinkTarget() instead [-Wdeprecated-declarations]

Change-Id: I1d893d42d372245892f2de8406f52dbe7bbd552a
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-02-11 09:32:06 +00:00
Xiaofeng Wang
6ae0e8d2c7 Git: set git config diff.color to false
With diff.color=true, which seems the default or frequently used option,
the patch will contains color info. DiffUtils cannot handle this. So,
just turn off this option explicitly.

Change-Id: I8d8fe972655bea4d638cb34b897346c5b11d5abc
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2019-01-30 04:44:15 +00:00
Orgad Shaneh
7096649fc2 Merge remote-tracking branch 'origin/4.8'
Change-Id: I5b18233936e3b2cd674df92a694ba73b5a3ed752
2018-12-03 09:56:07 +02:00
Orgad Shaneh
f5203796e4 Git: Use ICore::dialogParent as dialog parent
Change-Id: Idc3f2f4d27d3279f76b688fac635e8d38b2705f5
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-11-29 14:56:43 +00:00
Andre Hartmann
e65131ac11 Git: add svn dcommit
It's the counterpart to git push when working with
SVN remotes and git-svn.

Change-Id: I02257ea921fdcdedec294b28e8756ed88fb764b3
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2018-11-25 14:19:30 +00:00
Eike Ziller
3d1d9aae2e Merge remote-tracking branch 'origin/4.8'
Conflicts:
	src/plugins/winrt/winrtdevicefactory.cpp

Change-Id: I33b8697e2ebf2bea051d7f1144449e0743ee16a5
2018-11-19 10:00:18 +01:00
Orgad Shaneh
2f41f35952 Git: Make commit a bit less synchronous
If gc.auto is configured, commit can trigger garbage collection, which
takes time. Avoid completely blocking the UI on this case, and at least
show the output of the commit command.

Change-Id: Id301c878c26599bbc363928a6770c04369a62f2f
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-11-14 13:37:49 +00:00
Orgad Shaneh
92431932e3 Git: Show detached HEAD in branches view when applicable
Fixes: QTCREATORBUG-21311
Change-Id: Ia4297d23a965d83ea2814bd1e41f35a3017b8e9b
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-11-12 09:48:25 +00:00
Alessandro Portale
3b6f45a7a3 Git: Modernize
modernize-use-using
modernize-use-default-member-init
modernize-use-equals-default

Change-Id: Iaccd5611cfc2056d357a0545f8522f02d6f8f0ed
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2018-11-10 21:03:01 +00:00
Orgad Shaneh
fe87339888 Git: Fix resolving top level for non-existent sub-sub-directory
When a directory is renamed, and it has sub{sub-}*directories, executing
git blame on a file in the subdirectory -> Blame Revision (or parent) for
the file in the previous name -> Show failed because it couldn't determine
the top level directory.

You can test by opening qmakeprojectmanager/wizards/filespage.cpp and
blaming one of the lines that had it as qt4projectmanager/...

Change-Id: I7ac964c12f1f368c5ce92e9bedd972a2bc824935
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-10-25 17:52:28 +00:00
Orgad Shaneh
4c27b0e6e7 Git: Disable merge tool execution for vimdiff
vimdiff requires a terminal, which is not supported in Qt Creator.

Fixes: QTCREATORBUG-21147
Change-Id: I6168ac9c4a03061a64a1699fca6f39c90df5168b
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-10-11 10:42:19 +00:00
Orgad Shaneh
762fb5c353 Git: Make checkout asynchronous
It can be slow when many files are replaced.

Change-Id: I308698ef36973374f4526107fbda0d9ad907e707
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-10-10 08:30:16 +00:00
Andre Hartmann
3177e53804 Git: Add support for github remotes
Github and gitlab uses a different syntax when cloning with ssh:

 git@github.com:qt-creator/qt-creator.git

Support this pattern for remote validatation also.

Change-Id: Ic67f2238b9cdd526e76715c86846542cdb73f503
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2018-10-07 15:44:01 +00:00
Andre Hartmann
96f982a016 Git: Check remote port for isValid in GitRemote
Change-Id: Iab922abcde0ac055417467f3c63a31dffa721986
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2018-10-07 15:43:39 +00:00
Andre Hartmann
e79d68dab6 Git: Improve local file detection in GitRemote
* Make sure url has a proper size before accessing
  its elements
* Also check for valid drive letter before ':'

Change-Id: I958cbd492caa8a6ad4a5bf424277d8287f8cf0d4
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2018-10-02 19:42:18 +00:00
Orgad Shaneh
754fd66a0b Git: Suppress error messages for newly initialized repository
Change-Id: Ib7161e165fdf9cc2b1167b683e8e3dac17e0f1d6
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2018-09-29 16:51:45 +00:00
Orgad Shaneh
c415a03cea Git: Support move/copy detection for blame
Fixes: QTCREATORBUG-20462
Change-Id: Ib2ea14de6a60691a1ed27cd07aac282557d69015
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2018-09-19 20:16:23 +00:00
Orgad Shaneh
202d40f256 Git: Modernize
* Use auto
* Use override
* Use some member initializers

Change-Id: I3ca000d1c8e4d02331d58b85e68e4d771c636b29
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2018-09-19 19:47:07 +00:00
Orgad Shaneh
296ae92853 Git: Change pull to run asynchronously
Fixes: QTCREATORBUG-13279
Change-Id: Idee6e64e5eebe729e7c1d0e0135a1d8b464187b7
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2018-09-19 17:02:24 +00:00
Orgad Shaneh
760e6a9b13 Git: Fix launching of gitk when not in PATH
Tries the following:
* <git binary path>/gitk
* If git path ends with bin [or usr/bin, or mingw*/bin], try ../[../]cmd
* Search gitk in the PATH

Task-number: QTCREATORBUG-1577
Change-Id: I7f5e3d490bfeb527e2a5c1720126f1345e07eee0
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-09-04 09:33:25 +00:00
Andre Hartmann
495356ce9d Git: Fix remote detection for local remotes starting with "file://"
Task-number: QTCREATORBUG-20618
Change-Id: I21cddf88b64fa7a6acdc92228142976284ef8942
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2018-07-30 13:23:38 +00:00
Orgad Shaneh
943f499fe4 Git: Silence managesFile
When adding existing untracked files to a project, and choosing to add them
to Git, error messages appeared in the output pane.

Change-Id: Iba639a678d2ca424fb32b34b218fca1c4b99971d
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-07-09 09:33:20 +00:00
Nikolai Kosjar
b2f8ffdb20 Git: Fix handling Esc in "Create Local Branch" dialog
Change-Id: I8415e7ffcdbeb648b28273aa5791144e95f63de9
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2018-05-31 12:14:01 +00:00
Eike Ziller
428fcb476b Merge remote-tracking branch 'origin/4.6'
Conflicts:
	src/libs/utils/settingsaccessor.cpp
	src/plugins/autotest/autotestplugin.cpp
	src/plugins/git/gitclient.cpp
	src/plugins/qbsprojectmanager/qbsrunconfiguration.cpp
	src/plugins/qbsprojectmanager/qbsrunconfiguration.h

Change-Id: I65f143cad18af509a2621d6c5925abbd038ea70f
2018-04-13 10:54:42 +02:00
Jarek Kobus
e806ea40cc Pass this context object to the connect()
Otherwise when "this" instance
gets deleted and the sender still exists, the lambda
expression is still invoked for the deleted object.

Task-number: QTCREATORBUG-20223
Change-Id: Ifd5c9e6ce1fe7fde71698c6683cdfcd7566e8d35
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2018-04-09 09:31:40 +00:00
Orgad Shaneh
7d3a79c696 Utils: Purge asConst
Replace by qAsConst.

Change-Id: I3301366f73c066c86f08df7188d70dc3b613c55c
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2018-04-09 09:04:00 +00:00
Eike Ziller
cb84ae1a21 Merge remote-tracking branch 'origin/4.6'
Conflicts:
	src/plugins/android/androiddeployqtstep.cpp
	src/plugins/cmakeprojectmanager/cmakerunconfiguration.cpp
	src/plugins/qmakeprojectmanager/wizards/testwizard.cpp
	src/plugins/qtsupport/exampleslistmodel.cpp
	src/plugins/qtsupport/gettingstartedwelcomepage.cpp

Change-Id: I126823f5f60613509520c07f52be7bc9d4f4367c
2018-03-16 09:28:08 +01:00
Jarek Kobus
da2c66b1d0 Move git specific stuff out of diff editor plugin
Move it to the git plugin.

Change-Id: I8151573ed50df70776f7ebf0475dd41fb84fae83
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-03-15 11:21:01 +00:00
Tobias Hunger
0f53b35757 Git: Fix warning about unused lambda captures
Change-Id: I9535dccfe0af169efaa6dc09898d34c4c9e17efd
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2018-03-06 14:18:44 +00:00
Jarek Kobus
64233a4fae Fix repeting Stage/Unstage actions in unified diff editor
Don't store diff file index, chunk index and diff editor
controller anymore. Pass needed indices by value,
retrieve them when needed as lambda copy.

Change-Id: I3a81f1ab6d131c0b1d9899ac4b061b6e25582f51
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-02-16 06:48:27 +00:00
Andre Hartmann
6bc12ff446 DiffEditor: Replace bool arguments with flags enum
Change-Id: I70262476d015ba5b73069b149093dac66f7c6008
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-01-17 09:13:40 +00:00
Orgad Shaneh
d1baa80a98 Git: Do not pop the VCS pane on every [Un]Stage
Task-number: QTCREATORBUG-19051
Change-Id: I8dcf95238dcbc396b2dfe6a7d6048bbbb8551921
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2018-01-13 17:05:02 +00:00
Przemyslaw Gorszkowski
e25edc5020 Git: add reload button for 'git blame' and 'git log' windows
Change-Id: I64685e779bed91d41e38bdc1454571dbbcd7f177
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-01-09 12:28:26 +00:00
Orgad Shaneh
a8ddaafca4 Git: Introduce Recover Deleted Files action
Change-Id: I913c07522a8ca82366fd142597430c02e53faa27
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-01-09 11:33:21 +00:00
Eike Ziller
a2739f55ed Merge remote-tracking branch 'origin/4.5'
Change-Id: Ic7c16091268083c0426cf29f0691a7ee458f2bd9
2017-12-07 09:16:01 +01:00
Orgad Shaneh
2559ad48a8 Git: Show success message on push
Change-Id: I78433d7c7aec65fbafcba49fabf0562571dfbeff
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-12-05 10:12:09 +00:00
Robert Loehning
93c616b23f Git: Remove unused variable
Change-Id: If7656e0938380714bff655c80e6d0082a427ef71
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2017-10-23 09:08:24 +00:00
Orgad Shaneh
5d5d0497e5 Git: Use C locale when parsing the command output
Task-number: QTCREATORBUG-19017
Change-Id: Ib77d66e22d227d43245d352905f9b095f7d0f42b
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2017-10-12 18:52:58 +00:00
Orgad Shaneh
84b57027c8 Git: Fix progress during rebase
Broke by c4b5048836.

Change-Id: I35b22b6ab5fd8767ef729906b8344a0d6aa1f0cf
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-10-04 07:51:12 +00:00
Ulf Hermann
47886969cc Drop unused variables and lambda captures
Also, add context to connect() expressions where we are or were
capturing "this".

Change-Id: I6e006ba6f83d532478018550d148ee93eca59605
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2017-09-08 09:06:53 +00:00
Leena Miettinen
b29ea4527a Git: Do not use the (s) plural in UI text
The UI text guidelines advice against this.

Change-Id: Ib8f9cb291f0217de10853412b133173f1d11e7b7
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-07-28 08:06:56 +00:00
Jarek Kobus
4bea049c45 VcsBase: Create common base diff editor controller
Reuse it in subversion and git plugins.
It makes subversion diff more asynchronous than before.
Make VcsBase plugin dependand on DiffEditor plugin.

Change-Id: Iafea2941b890a95a269362e022af2dc03cdea550
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-07-05 14:20:07 +00:00