Commit Graph

568 Commits

Author SHA1 Message Date
Tobias Hunger
2e0434dd25 Git: Fix possible core dump
Change-Id: Ieb822c8810e8943d5397e6c64188690e481dd0f9
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-08-08 15:31:04 +02:00
Orgad Shaneh
5da86a0757 Git: Follow renames on log
Reverted because a dependent commit broke compilation

Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
(cherry picked from commit a53cc559be)

Change-Id: I8de3dbeca7eed3815eb5f0843eba6a86d371675e
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-08-08 11:14:42 +02:00
Orgad Shaneh
35798d4ad6 VCS: Use a single filename for log
The list always contains a single entry (or none) anyway

Take 2. This time it actually compiles ;-)

Change-Id: I71a9822360a9b569ba79afa0f575e27918bb2e03
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-08-07 17:43:58 +02:00
Orgad Shaneh
7c5b19ebf4 Revert "Git: Use a single filename for log"
Breaks compilation

This reverts commit a05ea71133

Change-Id: I713f06a1fe1ff24f4721cda082fb732dc3f5c270
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2013-08-06 18:27:09 +02:00
Orgad Shaneh
fe25ae9935 Revert "Git: Follow renames on log"
Depends on a commit that broke compilation

This reverts commit a53cc559be

Change-Id: I7b697be1c97bd25f15e2a97927dbc7d03dc456e7
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2013-08-06 18:27:06 +02:00
Orgad Shaneh
a53cc559be Git: Follow renames on log
Change-Id: Ic2666e62f5226780f68da0cdda0229b343d38116
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-08-06 17:24:15 +02:00
Orgad Shaneh
a05ea71133 Git: Use a single filename for log
The list always contains a single entry (or none) anyway

Change-Id: I567b622efd42dd6f676bebb92fbf1c8774bd80ff
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-08-06 17:23:25 +02:00
Orgad Shaneh
ec247074d4 Git: Prompt to commit when merge tool finishes after merge
Change-Id: I41a7e7febb77706e84595d560a8abb56a018a823
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-08-06 17:22:39 +02:00
Orgad Shaneh
208aeb79ed Introduce Utils::SynchronousProcess::normalizeNewlines
Replaces \r\n? with \n.

Some console applications (e.g. git-push, git-rebase) use \r alone to
move the cursor to the line's beginning. This should be replaced by \n
rather than just be erased.

Change-Id: I8d614d2b471e59decdbfa7f173ffa7fbdb11759b
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-08-06 04:52:58 +02:00
Orgad Shaneh
6b8c93637b VCS: Un-data functions that accept QString
Change-Id: Iffa82f4ab06162ab57e77301e77fb37ed7230bd5
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-07-31 11:23:00 +02:00
Orgad Shaneh
044a78f750 Git: Support remotes with whitespace on url
Task-number: QTCREATORBUG-9789

Change-Id: Id501ade0ac2ce7093fa38368f13b2bfab31bd35f
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-07-29 10:32:36 +02:00
Petar Perisin
e6de18eaab Git - show command name in tooltip
Change-Id: Ib652813c713e24cf9cbe8cb4b77207d54be7e132
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2013-07-21 23:03:00 +02:00
Eike Ziller
745f82bfc6 Merge remote-tracking branch 'origin/2.8' into HEAD
Conflicts:
	src/plugins/coreplugin/editormanager/editormanager.cpp

Change-Id: I59ce346c85803f5496a22bdadf7dca09e59d3174
2013-07-19 14:17:43 +02:00
Orgad Shaneh
360366ae08 VCS: Remove unused termination mode
Defaults to NoReport and nobody sets other values

Change-Id: I3def23bd350fcef45df9eb8d3a0e86baac192bd9
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-07-19 13:56:41 +02:00
Orgad Shaneh
0c50c5a1d3 VCS: Consolidate codec handling
Change-Id: I2c9a5031b63f0bc3e884739be680d051d7cf1ab4
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-07-19 13:56:34 +02:00
Petar Perisin
a766fc42bb Git - allow stash-only in stashPrompt
Change-Id: I5e81bd3dfc8986c7492701ac5ce5537e0d591834
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2013-07-19 10:33:58 +02:00
Orgad Shaneh
173da5f45b Git: Set diff base directory for log
Log can also contain diff, base directory is required for correct
apply/revert actions

Change-Id: I9540fc75b1e008a1c8433f121b184f164172a1cb
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-07-18 16:59:42 +02:00
Eike Ziller
bc88c0b89e VCS: Use documents instead of editors a bit more.
This patch mostly gets rid of EditorManager::openedEditors usage. The
VCS editors should have a better widget<>document separation, also to
make it possible to split/duplicate them, but that's for another time.

Change-Id: Idd92a6a4884ff69fba4f4793d182aa7ff68d79e4
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-07-18 14:51:03 +02:00
Orgad Shaneh
ad9e7ccab6 Fix coding style for else statements
Change-Id: I1309db70e98d678e150388c76ce665e988fdf081
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2013-07-17 11:11:25 +02:00
Eike Ziller
fade19a9bf Move IEditor::createNew to IDocument::setContents
The method is for setting the contents, so it belongs to the document,
and should be named correspondingly.

Change-Id: I40363dc08f11268f530885b512e4a88e8b10d096
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2013-07-17 09:00:17 +02:00
Friedemann Kleint
aec9124723 tr()-fixes in git.
- Do concatenate message pieces that may not fit grammatically.
- Common message for "Cannot launch".
- Add period marker.

Change-Id: Ic67b27e30143febebc9153a3cefe523ebfd4bc49
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2013-07-15 17:10:26 +02:00
Orgad Shaneh
aa981f4066 PushToGerrit: Filter out stale branches
Change-Id: Ib4f1d7ead2c40f27be28fa45e042c3694c0444fd
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Petar Perisin <petar.perisin@gmail.com>
2013-07-12 17:52:38 +02:00
Eike Ziller
354cd410b0 Make document model static and add some document related methods
Change-Id: Ibcb863e67a2433529c9d2b6dec237f9d8b1d8d50
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2013-07-12 11:55:59 +02:00
Orgad Shaneh
e63d1f64b5 Git: Refresh configuration widget if editor is found
Task-number: QTCREATORBUG-9783
Change-Id: Id1092fb9a79dfbf0425be4913241a507afb56a85
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-07-11 18:05:46 +02:00
Orgad Shaneh
bcf9c7621f Git: Remove args from diff
They are unused

Change-Id: I6cff3c6028208f1c7c0937c53b3f5090dae719a6
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-07-11 18:05:03 +02:00
Eike Ziller
ab0c3da08f Merge remote-tracking branch 'origin/2.8'
Conflicts:
	qtcreator.pri
	qtcreator.qbs
	src/plugins/projectexplorer/projectexplorer.cpp

Change-Id: I37e550646f877b50693043894976a693ac22ad5e
2013-07-11 08:02:41 +02:00
Orgad Shaneh
3eacb444e9 Git: Prevent another crash on checkout
Crash happens if the repository has a submodule with local
changes that requires updating (commit changed between current
branch and new branch)

Since we already refresh for every repo change, just add "expect"
for checkout and remove the code accessing the deleted index.

Change-Id: Ic464129a2f001e017244fdf719b282dcbd9dffa4
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-07-10 12:51:06 +02:00
Orgad Shaneh
062b8f5d31 Git: Set remote-tracking branch
Task-number: QTCREATORBUG-8863
Change-Id: I06df735d85e2f9ed17c71385fed5057f8fc67d55
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-07-10 12:50:50 +02:00
Eike Ziller
dd43d9908f Rename IDocument::fileName --> filePath
That is what it actually is, wrt how Qt API calls it.

Change-Id: Ied02055debf6aad75556b0d9d22e8ba2f72be555
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2013-07-09 13:51:42 +02:00
Eike Ziller
a98fe15fe5 Merge remote-tracking branch 'origin/2.8' into HEAD
Conflicts:
	qbs/pluginspec/pluginspec.qbs

Change-Id: Ic8e992623b9eda8913ee473c779a8df27643ccc9
2013-07-08 15:01:17 +02:00
Orgad Shaneh
2af4c05b8c Git: Use -x for cherry-pick
Change-Id: Iaa6bfdaa1307a3c7a73fd80fb0ffe3b80a01312d
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-07-08 13:21:47 +02:00
Orgad Shaneh
aad68917b9 Git: Always allow stash before cherry-pick/revert
Currently done only from "Actions on Commits"

Change-Id: Ide34e198e72f554ba6fd75ef21aaaf35917b4f6a
Reviewed-by: Petar Perisin <petar.perisin@gmail.com>
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-07-08 13:21:41 +02:00
Orgad Shaneh
8aa1c9bc37 VCS: Remove removeColorCodes
status output can be uncolorized using the git config value
color.status=false (works for short status since git 1.7.0)

Change-Id: I0887ab9a02f4c98fe54a94a53ffcd4f91fef8699
Reviewed-by: hjk <hjk121@nokiamail.com>
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-07-08 12:47:56 +02:00
Orgad Shaneh
ffdd317773 Git: Support remove/rename for tags
Change-Id: I737d2405ef1a10ec451c4baceaea9a0bc194ac1e
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-07-08 12:43:13 +02:00
Petar Perisin
6312cc18e2 Git - added ability to launch git gui
Change-Id: I65ed3e0408e43e354a289bbbd385aec2e254746c
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2013-07-05 10:16:59 +02:00
Orgad Shaneh
be5133cf72 Git: Update branches dialog when repository is changed
and on fetch

Task-number: QTCREATORBUG-9667
Change-Id: Id2e5080502bbc28d5f7900dd0433e468dda56c82
Reviewed-by: Robert Loehning <robert.loehning@digia.com>
Reviewed-by: Petar Perisin <petar.perisin@gmail.com>
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
Reviewed-by: hjk <hjk121@nokiamail.com>
2013-07-04 15:26:39 +02:00
Eike Ziller
8685ff8a28 Merge remote-tracking branch 'origin/2.8' into HEAD
Conflicts:
	qtcreator.pri
	qtcreator.qbs

Change-Id: I5d2018d3437b99bcdffa92bf1a212f42923c4fad
2013-07-03 16:55:27 +02:00
Orgad Shaneh
3e117b125d SynchronousProcess: Use the same codec for stdout and stderr
Change-Id: I4a7e5a5748dd9e16b1e62b3879cce8ccab0f3e01
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2013-07-02 10:29:13 +02:00
Orgad Shaneh
00337585ab Git: Add some null protections
Change-Id: Ia28c70690c6f79499fb8075935ec123b763bcc01
Reviewed-by: Jarek Kobus <jaroslaw.kobus@digia.com>
2013-07-02 08:52:30 +02:00
Orgad Shaneh
5f131da166 DiffEditor: Show tags and branches in Show pane
Change-Id: I39be7c3fb9b57b133c4da3639813527aa280ae33
Reviewed-by: Jarek Kobus <jaroslaw.kobus@digia.com>
2013-07-01 15:50:12 +02:00
Orgad Shaneh
32217a0c3c Git: Move static strings out of GitClient class
They're only used in gitclient.cpp, define them there

Change-Id: I601f23a6f2a8e533127d2ed068526815e1b9717d
Reviewed-by: hjk <hjk121@nokiamail.com>
2013-07-01 15:42:16 +02:00
Orgad Shaneh
f621ee5bc4 Git: Diff current file against index
Task-number: QTCREATORBUG-9663

Change-Id: I18b4ec5577bf0114075141583c938eaa02d5eded
Reviewed-by: Jarek Kobus <jaroslaw.kobus@digia.com>
2013-07-01 11:22:49 +02:00
Orgad Shaneh
893b1e9a16 Git: Support commit.template under ~
Task-number: QTCREATORBUG-9530

Change-Id: I21ee4202aa750a9d4d89f05d51af7c63489eb6c3
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2013-07-01 11:21:54 +02:00
Orgad Shaneh
62554e7647 Git: Add a soft assertion
If directory is empty, buttons remains NULL, which leads to a crash

To reproduce, open Branches dialog then close all editors
and projects and click Log for a branch

Change-Id: Icf06b76c58585c0dd6062017e94e07dad016c275
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
Reviewed-by: hjk <hjk121@nokiamail.com>
2013-07-01 10:35:02 +02:00
Orgad Shaneh
a0ee1300c3 Git: List conflicted files on stash pop conflict
Change-Id: I0dd71c928b430ca4a54034b9ddaa0d10e75ded54
Reviewed-by: Petar Perisin <petar.perisin@gmail.com>
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-06-26 10:26:18 +02:00
jkobus
f5a2c1469a Add a DiffShowEditor showing an additional info
Task-number: QTCREATORBUG-9489

Change-Id: I3ae2e59ccaf397f4236505f21e027a42e2798784
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
Reviewed-by: Petar Perisin <petar.perisin@gmail.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-06-19 09:11:42 +02:00
Petar Perisin
159a7d61dd Git - stash scope guard in submoduleUpdate
Change-Id: I888d4013e88fdc6977f29ef3e27d243e55a1f1a7
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2013-06-17 22:22:31 +02:00
Orgad Shaneh
096daac0bd Git: Execute rebase asynchronously
Rebase --continue might request an editor, which hangs if run
synchronously

Change-Id: I28127884408f6f8fbd351bb1024dc8d3c2b339b8
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-06-17 10:56:05 +02:00
Orgad Shaneh
7ff6dcabd1 Git: Handle merge conflicts on stash pop
Change-Id: I41a9173be2feae4ab529fd9b3f2e1e7cc5ae92ff
Reviewed-by: Petar Perisin <petar.perisin@gmail.com>
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-06-17 10:44:27 +02:00
Orgad Shaneh
e9443ff51f Git: Show tracking branch on Branches dialog
Simplify branch model parsing a bit

Change-Id: Id9e41c6c2769397d6eee3ab74de4afbb94111e25
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Petar Perisin <petar.perisin@gmail.com>
2013-06-14 13:50:50 +02:00