Commit Graph

414 Commits

Author SHA1 Message Date
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
45ccd7d919 Git: Fix crash on checkout branch
Task-number: QTCREATORBUG-9756
Change-Id: I3bdba870737bbffde6c0e6a9046a58ba78f097be
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2013-07-08 11:24:03 +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
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
3591c1df57 Git: Disable rebase and fixup when there's a command in progress
Change-Id: Ifa2f781cb1f31afaf7b0af4e4a0dd08fb58296d3
Reviewed-by: Petar Perisin <petar.perisin@gmail.com>
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-06-17 11:21:19 +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
2073a0660f Git: Ensure documents are saved before executing destructive calls
Change-Id: I9ec0ae0ff6a1b70e5d4c322dbf2e53be57e3009f
Reviewed-by: Petar Perisin <petar.perisin@gmail.com>
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-06-11 22:46:57 +02:00
Orgad Shaneh
161b016aa1 Git: Fix title for Fixup Commit
Change-Id: I9d2e9f76a165a57588c29bc1db1a087fc7cb441b
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-06-11 12:32:07 +02:00
Orgad Shaneh
69d0d6cdca Git: Style fixes
Change-Id: I600e939e99de77e92de1ff068a5ebad98eb736ca
Reviewed-by: Petar Perisin <petar.perisin@gmail.com>
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-06-11 10:30:55 +02:00
Petar Perisin
7fffe3cef6 Git - Get changes actions dialog back to where it was
This dialog was before, in QtCreator 2.7, used only for show. It was in
main git menu, and available always. Although a lot of new options were
added to the dialog, I think it is good to get it back to where it was
before, so that 2.7 users can find it easier.

Also, I prefer this location for it, since it is easier to access here.

Change-Id: I510ab0efb081194e70f6297125012034103e13e1
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-06-10 12:07:39 +02:00
Orgad Shaneh
465654b83a Git: Add Reset to locator
Change-Id: I81b52b8f349cfd5e9d67bd48b0be32c48e5b2f8e
Reviewed-by: Petar Perisin <petar.perisin@gmail.com>
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-06-05 13:24:20 +02:00
Orgad Shaneh
63cf15b180 Git: Start interactive rebase in topLevel
Change-Id: I99edfed36b12942e64ee1947a46eddd1ca08b9ba
Reviewed-by: Petar Perisin <petar.perisin@gmail.com>
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-06-05 13:24:16 +02:00
Eike Ziller
7c8db79817 Switch less often to edit mode
This change
* Removes IMode::type, ModeManager::activateModeType, and
  IEditor::preferredModeType, and adds IEditor::isDesignModePreferred
  instead
* Adapts the mode switching code in EditorManager to handle multiple
  windows, for example switching to edit mode should only happen if
  the editor/view is in the main window. Otherwise the editor window
  should be raised and focused
* Renames EditorManager::NoActivate --> DoNotChangeCurrentEditor
* Reverts the EditorManager::ModeSwitch logic to switch mode or
  make the current editor visible by default, introducing
  DoNotMakeVisible flag instead
* Fixes a few instances where EditorManager::ModeSwitch should have been
  used

One non-trivial problem left: If you open a .ui file and switch to an
external editor window, edit mode is activated, because the current
editor no longer is a .ui file, which means that the design mode gets
deactivated.

Change-Id: I76c5c2391eb4090143b778fb103acff3a5a1ff41
Reviewed-by: David Schulz <david.schulz@digia.com>
2013-06-05 09:43:14 +02:00
jkobus
f99ce422b4 Remove unused code
Change-Id: Icc4bb2648fc4e18e95216012ce08365940a80937
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-06-05 09:16:34 +02:00
Petar Perisin
046fd0523d Git - remove unnecessary member m_createRepositoryAction
Change-Id: I3b3f72c5699e63f3f273b1564ea0a093b6c9725b
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2013-06-04 23:34:16 +02:00
Petar Perisin
36bec480ae Git - execute push asynchronously
Change-Id: I0d5b0eaf562d30f34f01bcf344791a4ce766bdab
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-06-04 10:59:38 +02:00
Petar Perisin
80a7107691 Git - execute fetch asynchronously
Change-Id: Ic2243adaa36444099f834676186331927f3f4588
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-06-04 10:58:56 +02:00
Orgad Shaneh
3f1901cb1f Git: Provide a real highlighter for interactive rebase
* Kate highlighter doesn't have enough colors
* It works out of the box only on Windows
* New editor support links

Change-Id: I09bbaef08574660e535ccb86c2c460d5976fc2e3
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-06-03 10:40:32 +02:00
Orgad Shaneh
2d68f9c808 Git: Avoid version warning when Git is not found
Task-number: QTCREATORBUG-9411
Change-Id: I0bb90e508b78d0e7c7ff86fda72399036ad665ae
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
2013-05-31 10:46:03 +02:00
Petar Perisin
2b903b46d3 Git - added dummy locator actions
for Merge, Rebase, Show, Cherry Pick, Revert and Checkout.

Task-number: QTCREATORBUG-9405
Change-Id: I9a10d93382248ca86fe566bf1dccf4d390601aaf
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-05-30 10:21:36 +02:00
Petar Perisin
86d7e28db4 Git - added submoduleDataMap to handle submodule data
Change-Id: I8462ed07f3d1edce5c7f5ab8c166ce8c68b6d4b3
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2013-05-28 21:53:26 +02:00
Orgad Shaneh
5374a4f3cd Git: Use OtherContent type for commit
Change-Id: Ic0d31a1131f559d1dfa2c880d72c68720d378d1f
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-05-27 17:55:10 +02:00
Orgad Shaneh
b75cf96868 Git: Refactor stash handling
* Replace RebaseManager with ConflictHandler
* Store StashGuard in GitClient, allow popping after
  a whole process is done (e.g. pull with resolved conflicts)

Change-Id: I85784f32f515ff896c73f35303c7de26f8006f59
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-05-27 10:43:44 +02:00
Orgad Shaneh
7bfaf7a946 Git: Provide a commit editor for files opened externally
Change-Id: I52fccf36cca032dda36102d4be2654eb7461de64
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-05-24 12:29:49 +02:00
Orgad Shaneh
a9d9d44494 VCS: Rename RegularCommandOutput to OtherContent
Change-Id: I37d47c79f0efaf51eb5afd1fe529aacfadff8ee1
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-05-24 12:29:34 +02:00
Orgad Shaneh
05ef32f242 Remove Nokia leftovers
Mostly internal mimetypes

Change-Id: Ia84206f1334c1f83474cbc307e848719bb98adbc
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-05-24 12:29:23 +02:00
Orgad Shaneh
fd48f081c6 VCS: Remove unused extension parameter from editors
Change-Id: I17e73e269698af0d515f668d3c272a748cdca3bb
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-05-24 12:21:26 +02:00
Orgad Shaneh
c60ab1ca3c Git: Fix object leaks
Change-Id: I0efb368782ffb66cf6b8d39650fe7840c5ef2501
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-05-17 17:59:10 +02:00
Petar Perisin
6e677a97fb Git - use appropriate working directory in ChangeSelectionDialog
In case Working Directory is changed in dialog, use new one for command.

Change-Id: Iea2e71d3695fff49a6375d19d723f4d62a092c2f
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2013-05-07 08:59:20 +02:00
Orgad Shaneh
c45e4e614a Git: Do not return empty string for top commit in LogChangeDialog
Change-Id: I26cff005974102c037bbbff04b7606e7f8a07b84
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-05-06 10:54:45 +02:00
Orgad Shaneh
325c0beda5 Git: Show commit on double-click in fixup editor
Change-Id: I8cb08b0fcba3ddac7223b39b3762ff71e8d61f8c
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-05-06 10:25:10 +02:00
Orgad Shaneh
ec84dd058a Fix indentation
Mostly 3 leading spaces converted to 4

A few other indentation issues

Change-Id: Ib0db5925cac4d2999faf5699cd570884cbcd4863
Reviewed-by: hjk <hjk121@nokiamail.com>
2013-05-06 08:38:50 +02:00
Orgad Shaneh
aa5b049561 Git: Improve LogChangeWidget
* Enable display of local-only commits
* Enable specifying a top commit

Change-Id: I0688ba9ac670f709d2044ae2b7bff081fd86c860
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-05-04 20:01:23 +02:00
Orgad Shaneh
8695fe6d7c Git: Implement "Fixup previous commit"
Change-Id: Ia2584ff975ed0db614dc878a70ce4adbd5c3ba67
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-05-04 20:01:04 +02:00
Orgad Shaneh
5d325f6b1a Git: Use StashGuard inside RebaseManager
If the rebase succeeds without conflicts, pop

Change-Id: I4f0c6ad3061f4f69f7e5c9450f972cce5c15227d
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-05-04 20:00:39 +02:00
Orgad Shaneh
20f1208e0f Git: Pass CommitData by reference
It is used for both input and output, the pointer is assumed
to be valid

Change-Id: Iad9a82dfb5ea4850584d4da848076699cddd23c2
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-05-02 16:52:55 +02:00
Orgad Shaneh
06da25f610 Git: Add commit type to CommitData
Change-Id: I900f3dd89eeeac61e29604ac459d36ecc6c0aa8f
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-05-02 16:52:10 +02:00
Orgad Shaneh
7b851602cc Git: Use an enum for simple/amend commit
Change-Id: Ibea0a1f2826c67796a56414326fe6afdee654576
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-04-30 14:38:00 +02:00
Orgad Shaneh
a5962841cf Git: Support graph log for all log types (file, project, repo)
* Added a Graph toggle button for log editor
* Hide diff parameters when Diff is off
* Remove GitClient::graphLog

Change-Id: Ib87560bc4d6d7dbe866f0e58db8743a95df0622b
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-04-29 11:01:05 +02:00
Petar Perisin
3ce2b605d9 Git: Fix canceling interactive rebase
If the LogChangeDialog is closed without selecting any
commit, interactive rebase started with '^' as the commit.

Change-Id: I6292c700f61e5d075953ecc371d0916342096801
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2013-04-29 00:33:17 +02:00
Petar Perisin
d425d6485e Git - move ensureStash inside StashGuard
this is where stash popup question belongs

Change-Id: Ib3435f12eacd0b932ba2a67ecd728e5a41c0c64a
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2013-04-26 14:13:12 +02:00
Petar Perisin
6f4f47c8d8 Git - topLeveldir in ChangeSelectionDialog
So ChangeSelectionDialog does not show full path of current file, but
just path to top level dir

Change-Id: I4960009216afc0564b009bbf4f89b676cb92c4df
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2013-04-26 07:13:17 +02:00
Orgad Shaneh
83b57eda89 VCS: Remove redundant calls to default constructor
Change-Id: I4521e26e72c85e896e58e4d9d129f92b2d80f869
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2013-04-22 09:29:12 +02:00
Petar Perisin
311ca8cd01 Git - added continue and abort
Change-Id: I3dd274ad827c7cbd94d849b991cc518eff7f18ae
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2013-04-21 23:07:46 +02:00
Eike Ziller
e31575a493 VCS: Clean up submit editor handling
It was not possible to simultaneously open two commit editors for
different version control systems, also there was no reason to scan all
open editors for the submit editor, since the plugins can just remember
the editor that they opened.

Change-Id: I1bea6ece3cd6faa1ecc0566bdd6f5fb10c816963
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2013-04-19 16:21:06 +02:00
Orgad Shaneh
e6da908321 Git: Refactor reset
Remove enum, provide the associated flag in the combobox.

Change-Id: I1c4751c75f59312904fe7c175678f965ac16741d
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-04-19 14:12:25 +02:00
Petar Perisin
93e51c186a Git: make ensureStash dialog more clear.
Change-Id: I19ecde462d7a8a5fb00caa0414a9833ecab5057b
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2013-04-19 07:48:27 +02:00
Petar Perisin
4a45c1c165 Interactive rebase - make selected commit available too
Since we select final commit for interactive rebase in a listed dialog,
it is IMO expected and more user-frendly to also have selected commit in
the interactive rebase list.

Change-Id: I56febd024cc174bcd046b1f02bccfe990043aae4
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-04-10 12:04:41 +02:00
Petar Perisin
c49fe8350d Git: Add a function for getting current local branch
Change-Id: Ibda70cb896633cc7afa3a845b99aac523246c558
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-04-08 19:23:47 +02:00