Commit Graph

648 Commits

Author SHA1 Message Date
Orgad Shaneh
0780c1d763 Git: Fix compilation with GCC 4.8
Change-Id: I47e2ac73a7afdd5c44c054bab54bc454973a1fa7
Reviewed-by: Robert Loehning <robert.loehning@theqtcompany.com>
2015-09-10 18:49:37 +00:00
Orgad Shaneh
a2bd8e11f6 Git: Fix crash
An asynchronous command deletes itself when it ends.
Raw pointer is a bad idea.

Task-number: QTCREATORBUG-15051
Change-Id: Ie2b3a90e308a4bb1e414f924a836d816abf1dfd1
Reviewed-by: Robert Loehning <robert.loehning@theqtcompany.com>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2015-09-10 10:35:15 +00:00
Orgad Shaneh
786aa4a441 Git: Fix source repository resolution in Stashes dialog
Remove workaround done in Branches and store copies where they're needed.

Task-number: QTCREATORBUG-14850
Change-Id: I6a81fc5ac02fb11d444906af6cfbe768695c9965
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2015-08-12 11:32:20 +00:00
Orgad Shaneh
14419e3d1b Git: Fix typo in comment
Change-Id: I07a7905bed3a46f7fbd60fd0844e9c46d61fbc1f
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2015-08-09 19:09:16 +00:00
Orgad Shaneh
23b89f1e85 Git: Include committer details in Show
Task-number: QTCREATORBUG-12834
Change-Id: I3a38f9bd7e98b9ef982ea51c2ffccbdaf3595a9c
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2015-07-06 15:20:47 +00:00
Orgad Shaneh
b643f33ee4 Git: Limit size of conflicted files list
Change-Id: I98996eee080ca25b812b53d02a89f45fdcdf3c52
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2015-07-06 12:40:15 +00:00
Thiago Macieira
d6da30d77a Fix the getting of the Git author name when user.name isn't set
The config variable is not required, as Git will get the user's name
from other system settings, like the gecos field in /etc/passwd. So
adapt Qt Creator to use the same mechanism that Git does.

Change-Id: I255870833a024a36adf6ffff13ecb43cc0c45bbf
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2015-07-01 16:02:25 +00:00
Orgad Shaneh
995e3d9802 Git: Suppress output for submodule status
It is internal, no reason to expose it.

Change-Id: I7612cfa58cefa22b63635cab66498186b390da8b
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2015-06-23 15:15:13 +00:00
Tobias Hunger
e0c5ff03ec Vcs: Do not crash when stopping running commands
Drop the connect once the editor gets killed. Remove the QSignalMapper
and replace it with a lambda to facilitate that change.

Task-number: QTCREATORBUG-14613
Change-Id: I1a5990bf37af88092933143ebb78dd5ceb9c1222
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2015-06-23 09:17:45 +00:00
Orgad Shaneh
2a11548703 Git: Fix Stash & Pop for synchronous actions
After a successful Cherry-Pick or Revert, a ConflictHandler needs be
instantiated in order to call endStashScope.

This was broken in b6608d0d3.

Change-Id: I2e828fa87695b9ac9972fca569e473b5f63abfec
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2015-06-22 09:20:19 +00:00
Orgad Shaneh
c621768b29 Git: Show original branch name while rebasing
Change-Id: I104afed7d2d5f37d391b7690f81fbad07363907c
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2015-06-15 08:41:22 +00:00
Orgad Shaneh
a4890d838d Git: Always warn on hard reset when there are modified files
A warning is currently only displayed for reset via context-menu.

Change-Id: If01c6c58dfe8ad0d066f4c6fe02ea3d7bb2c8a55
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2015-06-11 09:02:52 +00:00
Tobias Hunger
ea476ffc39 ShellCommand: Store workingdirectory in the jobs
Not all jobs of one command can run in the same directory, so
prepare for having individual working directories per job.

Change-Id: Ice43361fe54f2b7153ccd38435f6108d83570082
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2015-06-10 12:05:31 +00:00
Orgad Shaneh
4aa5116694 Git: Re-disable timeout for interactive rebase
Broken by be3e0438c6.

Change-Id: I2d22a47b764940e9c36847f2c6ea6c8e29cb29de
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2015-05-27 09:55:05 +00:00
Tobias Hunger
a44c403b5f ShellCommand: Rename some signals
Rename the signals used to report stdout/stderr to make it clearer
what they actually do. Remove some unimplemented private member
functions while at it.

Change-Id: I7e856f906ccb45964f3b1b64336d4d8ebca7b9ee
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2015-05-07 13:07:14 +00:00
Tobias Hunger
eec0a03212 Vcs: Split up VcsCommand
Move the biggest chunk into Utils::ShellCommand, add some Qt Creator
specific magic in Core::ShellCommand and leave the rest in
VcsBase::VcsCommand.

Change-Id: I5fe6f7076e96023ad2164bcfaacfb3b65a7ff8a8
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2015-05-04 15:27:25 +00:00
Tobias Hunger
c7c785ace3 Vcs: Push the binary into the Jobs of VcsCommand
This is the first step to generalizing the class for wider use.

Change-Id: I40ccb5bec4fdcb9d0a67388160c867799331007b
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2015-04-29 08:40:46 +00:00
Tobias Hunger
94af581dd8 Git: Make git show a bit more robust
Change-Id: I5d0dc3bb43753f7b2ac9c308944f327537547d76
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2015-04-23 15:52:00 +00:00
Tobias Hunger
bd1ee39991 Git: Remove duplicate arguments
BaseController already adds -M and -C for us.

Change-Id: Ifb64e78a4eba5f43b6fbe2a701f087ebf38db45a
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2015-04-23 15:51:46 +00:00
Orgad Shaneh
9e1e11db60 Git: Detect renames and copies on diff
Change-Id: I96e822df7eb5a0fc85108163a7ecf7b5e2a98d58
Reviewed-by: Jarek Kobus <jaroslaw.kobus@theqtcompany.com>
2015-04-20 14:36:47 +00:00
Eike Ziller
50fe3585a8 Merge remote-tracking branch 'origin/3.4'
Conflicts:
	src/libs/timeline/qml/MainView.qml
	src/plugins/git/gitclient.cpp

Change-Id: I0b6ec7b9a592014deb0dd2e1145b19dd6753b1c3
2015-04-15 17:45:47 +02:00
Orgad Shaneh
ec2d13641b Git: Suppress stderr output for fully synchronous executions
Broken by dcdcf54048.

Change-Id: I32f56bb432dfd3ce26397fd41908c6823cd4d7f1
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2015-04-15 12:48:54 +00:00
Tobias Hunger
5a2b5036ab Git: Get rid of findExistingVCSEditor
VcsBaseClientImpl::createVcsEditor does do the same check.

Change-Id: I89c8d954e8d104261d8ee51a098b97110b4538f4
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2015-04-15 12:24:35 +00:00
Tobias Hunger
ee7a47681b Git: Use vcsExec in favor of plain VcsCommand
Change-Id: I9e422d3ef7749f37323edf1f85d1c65b8c60344a
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2015-04-15 12:24:29 +00:00
Tobias Hunger
be3e0438c6 Git: Rename asyncCommand to vcsExecAbortable
This name makes it more clear what the method does.

Refactor to use VcsBaseClientImpl::vcsExec.

Change-Id: I4cf742c2b172d2589bd7d6740461e4a4c8d470ed
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2015-04-15 12:24:24 +00:00
Tobias Hunger
d45dea6cf8 Git: Move executeGit into VcsBaseClientImpl
and rename it to vcsExec. Accept a QVariant to set as cookie on the
command instead of a int for the linenumber.

Change-Id: I8240b53e775ac3883f92bdbf7b111abeeeb39426
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2015-04-15 12:24:20 +00:00
Orgad Shaneh
5bf6cfb381 Git: Suppress double logging of commands
appendCommand() is already called by runVcs.

Change-Id: I215ac00d0efc36e5f62865d7d2cf9941533a160d
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2015-04-15 10:31:54 +00:00
Tobias Hunger
d7ecf7df4b Git: Add a static method to attach a GitProgressParser to a VcsCommand
Change-Id: Ia7e104665360a254d5f3867b69e11fb7c46ff93e
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2015-04-15 10:12:46 +00:00
Tobias Hunger
9364f64f2a Git: Use default encoding for git-branch output
I see no reason why that should require source encoding.

Change-Id: Idd7103f09fd66f0363f8e58e04a8abdb183f74ca
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2015-04-15 10:12:38 +00:00
Tobias Hunger
b6608d0d37 Git: Simplify use of conflict handler a bit
Disentangle binding to an existing command from the actual task of
the conflict handler. This makes usage more clear.

Also rename "command" to "abortCommand" which is also more clear
as to what it is used for.

Change-Id: I862cfec97fbf512a3121f0a7d58ae12f148879a6
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2015-04-15 10:12:14 +00:00
Orgad Shaneh
d8ad33b54d Git: Fix retrieval of parent commit in blame
Broken by dcdcf54048.

Change-Id: I8e3015f710a8e7dd059b8419e66f58c76373b297
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2015-04-14 20:28:19 +00:00
Tobias Hunger
5954506d19 Vcs: Move vcsSynchronousExec into VcsBaseClientImpl
Use it in favor of git's synchronousGit method.

Change-Id: I1fc8031cb6d258073b64163aeeeaeac84443fb8c
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2015-04-14 11:22:00 +00:00
Tobias Hunger
dcdcf54048 Vcs: Move vcsFullySynchronousExec into VcsBaseClientImpl
Use that in the gitplugin in favor of fullySynchronousGit.

Change-Id: Ifd981f3fc5e87e16ad52caf32c204f81acffe586
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2015-04-14 11:21:21 +00:00
Nikita Baryshnikov
147dad8944 DiffEditorManager simplify
by using EditorManager::openEditorWithContents

Change-Id: I2850648bff0f5b8f01254b9c7ce9539c1262f576
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2015-04-13 12:33:01 +00:00
Tobias Hunger
7c083eadee Vcs: Make VcsBaseClient return stderr on fullySynchronous execution
Change-Id: I7a72a2f865148d7cf375897ec944a45f4b440818
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2015-04-13 10:48:01 +00:00
Tobias Hunger
7719fb669c Vcs: Standardize on second based timeouts
Change-Id: Ia273fda05a4c4a1934819f26e5dc1b6b80a89f6f
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2015-04-13 10:47:08 +00:00
Tobias Hunger
a55fb4a378 Vcs: Move annotate and annotateRevisionRequested into VcsBaseClientImpl
... and use that in the Git client.

Change-Id: Ie70ec0d5908776d11eb69613d45f565d4f0ce32b
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2015-04-13 10:40:58 +00:00
Tobias Hunger
e7616f8769 Vcs: Move createVcsEditor into VcsBaseClientImpl
... and use that in Git as well.

Change-Id: I81c85fcf5a7da7e9f756f117ea6c38c15294a401
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2015-04-13 09:08:35 +00:00
Eike Ziller
11590a8c5f Merge remote-tracking branch 'origin/3.4'
Conflicts:
	src/plugins/cmakeprojectmanager/cmakeproject.cpp

Change-Id: I09c5a047f7d91fecfc58c78df438afcdcdc0a8d7
2015-04-13 10:53:03 +02:00
Orgad Shaneh
4eb2224f47 Git: Add override
Change-Id: Iae0779c1efa8b3b46cf504f7bda00d614a4a157e
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2015-04-12 20:03:04 +00:00
Orgad Shaneh
18a5d019c0 Git: Fix suppression of git status command
Missed in 808f4492c5.

Change-Id: I8760ab9fa897d708423b21c34771d5275f87d1d7
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2015-04-12 11:35:48 +00:00
Nikita Baryshnikov
1d23de641f GitClient: fix diff when committing
When a commit has several files, opening diff for the first file
works, but trying to open another diff without closing the previous
one doesn't refresh the diff editor.

Change-Id: Ia973cb70f2355a89b70787dd97042ef9f751d9d6
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Nikita Baryshnikov <nib952051@gmail.com>
2015-04-12 09:56:56 +00:00
Tobias Hunger
0f5fdbe0f2 Git: WS fix
Change-Id: I0b4d37ae8ccd5f5edd8f049d31519be7d2131036
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2015-04-10 14:14:47 +00:00
Tobias Hunger
68045c1d0d Vcs: Move resetCachedVcsInfo into VcsBaseClientImpl
Change-Id: I544472d2024bd82039908c67ab133556617b4fdb
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2015-04-10 09:58:39 +00:00
Tobias Hunger
07d6757ca8 Vcs: Move createCommand and enqueueJob into VcsBaseClientImpl
Change-Id: I86a4ddfd6c53a3be61c56579d8eaf5d49258a8f1
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2015-04-10 09:49:47 +00:00
Tobias Hunger
2ccae82b5c Vcs: Move vcsBinary and vcsTimeout into VcsBaseClientImpl
Change-Id: Ib14432c85f42606a0437f3848b9dfa2fe63fb2f3
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2015-04-09 07:25:17 +00:00
Tobias Hunger
4f7844d6f5 Git: s/GitPlugin::gitClient/GitPlugin::client/
... same name as with almost all other plugins.

Change-Id: I964159044d86685735e8b1e816a0bf67e0576fd8
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2015-04-08 09:52:25 +00:00
Tobias Hunger
90ce38da39 Vcs: Move handling of settings from VcsBaseClient to VcsBaseClientImpl
... and update users of that functionality accordingly.

Unexpected plus: Now every supported VCS actually saves their setting
when requested.

Change-Id: I02db7b2ce14e5f52d26409b2a01aea290c2a294a
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2015-04-08 09:30:44 +00:00
Nikita Baryshnikov
217862be2f GitClient fix extra CR at end of email/author
in submit editor. Introduced in cb5886139e

Change-Id: Ieefa64a9d2c3ba1524a1cf6fe94f6e1c709fb5d4
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2015-03-26 15:28:28 +00:00
Tobias Hunger
66b94f490f Git: Make createVcsEditor take the same arguments as in VcsBaseClient
Make createVcsEditor in GitClient have the same signature as
createVcsEditor in VcsBaseClient.

Change-Id: I652175cbbf90b5bccd007fe8f028e364fe61a9aa
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2015-03-26 14:21:57 +00:00