Commit Graph

259 Commits

Author SHA1 Message Date
Orgad Shaneh
53443616e5 Git: Fix pull
regression from 40eecd87c9

Change-Id: Ibbf4082f9949ca25d22d7ba707281ae6652249ce
Reviewed-by: Petar Perisin <petar.perisin@gmail.com>
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-01-23 14:57:27 +01:00
Petar Perisin
65aef73ec4 Git: Added Revert and cherry-pick
Change-Id: Ic8ba7434e79b12eca680a67c2845c82915dc0088
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-01-21 10:41:01 +01:00
Petar Perisin
b7faf4d674 Git: added custom message to EnsureStash popup
Better overview in stash dialog.

Change-Id: Icb6d3f8e2e068882e661e017ce8a0bb00ec6dba5
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-01-17 11:18:28 +01:00
Petar Perisin
40eecd87c9 Git: Refactored "synchronousPullOrRebase" to be more general.
This can ease adding commands that can cause conflicts like cherry-pick,
revert, merge, rebase, stash pop ...

Change-Id: Id9df7f11307dbbcb60036a20a2c22c5097ba239f
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-01-11 10:58:17 +01:00
Petar Perisin
4009c305fb Git: Fixed a bug with rebase check
Rebase on pull should check if branch configuration has rebase set to
true. This is important to correctly abort operation when conflicts
appear, and user chooses not to run mergetool

Change-Id: I365aa534bdbece466514f542ea2e3c371c89a4a8
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-01-10 10:52:26 +01:00
Petar Perisin
3afa4a199f Git: Added soft Reset
Added Soft Reset to Reset Dialog

Change-Id: Iba5b6a37aef2b89c998c21a3d8ecca1075cbda10
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-01-09 13:26:35 +01:00
Orgad Shaneh
7bd95a4f7a Git: Force showing untracked files if needed
Might be disabled by configuration. Override it.

Change-Id: I262c5c34a840811b635b460c7759f4cfbe93ded6
Reviewed-by: Thorbjørn Lindeijer <bjorn@lindeijer.nl>
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-01-08 16:32:55 +01:00
Orgad Shaneh
29a93998df Remove braces for single lines of conditions
#!/usr/bin/env ruby

Dir.glob('**/*.cpp') { |file|
  # skip ast (excluding paste, astpath, and canv'ast'imer)
  next if file =~ /ast[^eip]|keywords\.|qualifiers|preprocessor|names.cpp/i
  s = File.read(file)
  next if s.include?('qlalr')
  orig = s.dup
  s.gsub!(/\n *if [^\n]*{\n[^\n]*\n\s+}(\s+else if [^\n]* {\n[^\n]*\n\s+})*(\s+else {\n[^\n]*\n\s+})?\n/m) { |m|
    res = $&
    if res =~ /^\s*(\/\/|[A-Z_]{3,})/ # C++ comment or macro (Q_UNUSED, SDEBUG), do not touch braces
      res
    else
      res.gsub!('} else', 'else')
      res.gsub!(/\n +} *\n/m, "\n")
      res.gsub(/ *{$/, '')
    end
  }
  s.gsub!(/ *$/, '')
  File.open(file, 'wb').write(s) if s != orig
}

Change-Id: I3b30ee60df0986f66c02132c65fc38a3fbb6bbdc
Reviewed-by: hjk <qthjk@ovi.com>
2013-01-08 10:48:18 +01:00
Orgad Shaneh
5abce3ab9f Git: Make branch lookup more robust
It might fail because a particular branch points to an invalid commit.
We don't want that to prevent display of all other branches.

Change-Id: I8fe427735351fc458c99396dc1f9d77bc948468e
Reviewed-by: Petar Perisin <petar.perisin@gmail.com>
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-01-07 17:48:27 +01:00
Petar Perisin
7df112b687 Git: Added Merge and Rebase
Added git functions - "Merge" and "Rebase"
They are in the "Branches" dialog:
- Merge - merge selected branch into current one
- Rebase - rebase current branch on selected one

Task-number: QTCREATORBUG-8367

Change-Id: I9ed306c64d5d4b7bd1d58730a5e1009f0bd4ec0e
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-01-07 15:26:47 +01:00
Orgad Shaneh
f857feed0e Git: Eliminate double parentheses in 'detached' topic
And use a capital D for Detached

Change-Id: I406269c6498be07d18b2febd0635984cff76b122
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2012-12-30 21:48:18 +01:00
Orgad Shaneh
a471389e02 Git: Ignore submodules for status except for commit
Submodules are not stashed and are not considered a conflict after revert

Change-Id: I97a0792db615054622b9b67a7f6b58b5aee05273
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2012-12-30 21:48:11 +01:00
Orgad Shaneh
30d548ea3a Git: Really consider untracked flag
Default behavior is to show all untracked files. To hide them,
we need to pass --untracked-files=no

Change-Id: I45ad6323273112e6724127d4bd8e8687066467f4
Reviewed-by: Petar Perisin <petar.perisin@gmail.com>
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2012-12-30 12:54:36 +01:00
Orgad Shaneh
af1cc6831c Git: Avoid running wish if git/cmd is in PATH
It always fails and falls back to git/bin

Change-Id: I367ff33c864adebf438cbcc00332520ec6e0d454
Reviewed-by: Petar Perisin <petar.perisin@gmail.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2012-12-29 17:38:27 +01:00
Orgad Shaneh
2e3a88b5ec Git: Only handle conflicts after rebase if they are present
rebase might fail for other reasons (detached head, unconfigured upstream...)

Change-Id: If80844dcbfd4f61fdd44d77f934e86ff96f0a1d3
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2012-12-23 15:17:34 +01:00
Petar Perisin
4ffc1a2f10 Git: Custom gitk launch
Launch gitk only for current file,
or for the folder that current file belongs to

Task-number: QTCREATORBUG-8327

Change-Id: I2ffbd44e3b3eeaffad32e84af9ca2085b16fdaa2
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2012-12-12 12:19:57 +01:00
Orgad Shaneh
4c5376dc99 Git: Do not use hash for topic
Use "(detached)" instead

Change-Id: If1d295cb5dcfe2995e13c7b5b02b00bebf0e1b20
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2012-12-11 15:20:22 +01:00
Orgad Shaneh
ef53047f48 Git: Mute for frequent operations
Change-Id: Ia517542242ce5a971728c4712190abaa0bbcb5a4
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2012-12-11 14:39:40 +01:00
Orgad Shaneh
f782f9b901 Git: Cache findGitDirForRepository results
Change-Id: Ia22ec20d3934dbdfa42461f66230b62bf6c1df07
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2012-11-30 13:41:23 +01:00
Orgad Shaneh
1712b86e0e Git: Remove description from PanelInfo
It is not used anywhere

Change-Id: I9884c4c015bc14cb78e35950c7544c8d004a73ca
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2012-11-30 13:25:18 +01:00
Orgad Shaneh
25981d918e Git: Support alternative topics on detached HEAD
Use tag if applicable, otherwise use HEAD hash

Change-Id: I5c7298446e5a325a27d6d9b5effc02d32155b583
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2012-11-30 13:25:02 +01:00
Orgad Shaneh
5ec925f7e7 Git: Cache synchronousTopic results
Refresh when HEAD timestamp changes

Change-Id: Ibb365d03074dabb700a55b96a924e31fed26c6ab
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2012-11-30 13:24:56 +01:00
Orgad Shaneh
6a58cdffc2 Git: Rename synchronousBranch -> synchronousTopic
Change-Id: I272e9db7a560f6e72dda6a0368d463da820f5b0b
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2012-11-30 13:24:49 +01:00
Orgad Shaneh
6a337561c5 Git: Show Precedes/Follows tags on Show editor
Known limitation: Commit that has a tag shows its own tag on Precedes
field

Change-Id: I533e48b4bb5d57809d8e9f12fa7db5d8706f7372
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2012-11-30 12:03:43 +01:00
Orgad Shaneh
17a73005fc Git: Fix findGitDirForRepository
Returned directory is relative

Change-Id: I13c9812825cfe57e880c21ad94178b5e9135b8e9
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2012-11-30 11:07:28 +01:00
Orgad Shaneh
a44aa55502 Add whitespace after control keywords
find -name \*.cpp -o -name \*.h | \
  xargs sed -Ei 's/ (for|foreach|if|switch|while)\(/ \1 (/g'

Change-Id: I9efdff4bf0c8c01a52baaaeb75198483c77b0390
Reviewed-by: hjk <qthjk@ovi.com>
2012-11-28 20:20:46 +01:00
Orgad Shaneh
3e9f2d688c Git: Suggest continuing rebase after conflicts are resolved
Change-Id: Icf74397ee7a3cedd7e46c63777832e1fc9f46033
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2012-11-16 14:12:47 +01:00
Orgad Shaneh
099345d110 Git: Suggest running mergetool if pull fails
Change-Id: Ic2fe525ea9e63a5ecdd1ab23dc07ede810aa192e
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2012-11-16 14:12:41 +01:00
Eike Ziller
fe74a9a722 Merge remote-tracking branch 'origin/2.6'
Conflicts:
	qtcreator.pri
	qtcreator.qbs
	src/plugins/fakevim/fakevimhandler.cpp
	src/plugins/qtsupport/baseqtversion.cpp
	tests/auto/cplusplus/cxx11/cxx11.pro
	tests/auto/cplusplus/cxx11/tst_cxx11.cpp
	tests/auto/icheckbuild/icheckbuild.pro

Change-Id: I3c8351ad35617f56d15b788c8a46d8a6f453ef70
2012-11-09 11:20:10 +01:00
Orgad Shaneh
7b2ef0a3b3 Git: Fix detection for 2-digit versions
1.7.10 is currently detected as 1.7.1

Change-Id: Iaba8ba3e1f6ba880ae088811ccfd133fd7f70e14
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2012-11-08 12:15:37 +01:00
Orgad Shaneh
cf6298ff32 Git: Introduce MergeTool support
Change-Id: I906c3c692d9f4819bdf2a1489c42ae04f292894d
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2012-11-07 16:12:27 +01:00
Orgad Shaneh
ab85e7342e Git: Extract FileState from CommitData
* Add a QFlags type for it and use it
* Clean up GitClient::addAndCommit
* Rename Updated -> Unmerged

Change-Id: Id96f71fb78af923605f5773f65a5625244a49499
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2012-10-29 14:59:29 +01:00
Mathias Hasselmann
97925eaf54 git: Don't use the "--short" for git symbolic-ref
We cannot use the "--short" switch since it only got introduced with git
1.7.10, which is not installed by default on popular Linux distributions
like Ubuntu 12.04.1 LTS.

Therefore stripping the "refs/heads/" prefix manually.

Change-Id: I3fb8e07e90e2ee8fdaa50836c1e982b47219e790
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2012-10-23 23:02:41 +02:00
Orgad Shaneh
a1e3a5de9e Git: Refactor branch/HEAD access
Change-Id: I0c9955737033c0f839ac1f6ea053fecc20c24d48
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2012-10-22 12:38:43 +02:00
Eike Ziller
6fd252b0a5 Merge remote-tracking branch 'origin/2.6'
Conflicts:
	share/qtcreator/qml/qmlpuppet/commands/endpuppetcommand.cpp
	share/qtcreator/qml/qmlpuppet/commands/endpuppetcommand.h
	src/plugins/debugger/qtmessageloghandler.cpp
	src/plugins/debugger/qtmessageloghandler.h
	src/plugins/debugger/qtmessagelogwindow.cpp
	src/plugins/madde/maemodeployconfigurationwidget.cpp
	src/plugins/madde/maemodeployconfigurationwidget.h
	src/plugins/remotelinux/deployablefilesperprofile.cpp
	src/plugins/remotelinux/deployablefilesperprofile.h
	src/plugins/remotelinux/deploymentinfo.cpp
	src/plugins/remotelinux/deploymentinfo.h
	src/plugins/remotelinux/deploymentsettingsassistant.cpp
	src/plugins/remotelinux/profilesupdatedialog.cpp
	src/plugins/remotelinux/remotelinuxdeploymentdatamodel.h
	tests/auto/icheckbuild/ichecklib.cpp
	tests/auto/icheckbuild/ichecklib_global.h
	tests/auto/icheckbuild/parsemanager.cpp
	tests/auto/icheckbuild/parsemanager.h
	tests/manual/ssh/tunnel/tunnel.h

Change-Id: I04d7761df6bd936ad00e0547974284c967d39580
2012-10-05 21:20:50 +02:00
hjk
386ca7c8dd Adjust license headers
Change-Id: Ice592c6de9951ee3b2c4cb52ed0bb3b6770e0825
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2012-10-05 17:12:56 +02:00
Eike Ziller
6faede0860 Merge remote-tracking branch 'origin/2.6'
Conflicts:
	share/qtcreator/qml/qmlpuppet/commands/changenodesourcecommand.h
	share/qtcreator/qml/qmlpuppet/commands/tokencommand.h
	share/qtcreator/qml/qmlpuppet/container/reparentcontainer.h
	share/qtcreator/qml/qmlpuppet/qml2puppet/instances/componentnodeinstance.h
	share/qtcreator/qml/qmlpuppet/qmlpuppet/instances/nodeinstanceclientproxy.cpp
	src/plugins/git/gitsettings.cpp
	tests/manual/ssh/remoteprocess/remoteprocesstest.h

Change-Id: I00c294e6d911d272615e65fed58562399af97a4e
2012-09-27 20:38:57 +02:00
Tobias Hunger
9e9dd99310 Remove useless headers
Change-Id: Iee4a6f549f8a7c028f52a1e6113b33034ef621e2
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2012-09-26 15:44:41 +02:00
Christian Kandeler
3c6f76d16c HostOsInfo: Add some more useful abstractions.
Namely:
- path list separator
- executable suffix
- file name case sensitivity

All of these are duplicated in various places in the current Creator
code.

Change-Id: I86eb4662fa3c2071759bd728cae1aaf7111ae686
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-09-05 13:54:48 +02:00
Christian Kandeler
e669f05406 Utils: Introduce HostOsInfo class.
The class' member functions are intended to be used
instead of the Q_OS_* macros in all contexts where
the latter are not syntactically required.
This lowers the likelihood of changes made on one
platform breaking the build on another, e.g. due to
the code model missing symbols in #ifdef'ed out code
when refactoring.

Change-Id: I4a54788591b4c8f8d589b8368a6c683d4155c9fa
Reviewed-by: hjk <qthjk@ovi.com>
2012-08-27 17:00:03 +02:00
Orgad Shaneh
69eeb94b7e Git: Support gitfile on commit
Change-Id: Ia2b8c7705129937a60585d881e1fbfa7815d858f
Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
2012-08-03 18:02:37 +02:00
Orgad Shaneh
12a99d476c Git: Do not display invalid commit as blame candidate
Change-Id: Ia08775b2e4364f405d223a9b49971ae70c04965a
Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
2012-07-26 20:57:45 +02:00
Orgad Shaneh
bd7499b896 Git: Do not append formatting when log failed
Happens for 00000000 for example

Change-Id: I1ab3157dd87744a4b16284d91dd26f42898965e9
Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
2012-07-19 22:24:57 +02:00
Konstantin Tokarev
d18bf468ad Changed return type of :ICore::mainWindow() to QWidget*
Also removed all <QMainWindow> includes which are not needed
anymore.

Change-Id: I393c9a62a5c6df95d9f35d872e1473a4f13bcdc4
Reviewed-by: hjk <qthjk@ovi.com>
2012-07-19 15:15:53 +02:00
Eike Ziller
e0e8cf3ada Contact -> qt-project.org
Change-Id: I7134d7de30bcf9f9dcfad42520dd45ee083a852d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-07-19 13:23:21 +02:00
Orgad Shaneh
960bfeb46d Git: Limit length for revisions displayed in context menu
Change-Id: I335b49ed9af9c3f2ae083a03e4109173b3783f76
Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
2012-07-19 00:42:54 +02:00
Orgad Shaneh
0fb6aafdc3 Git: Use HEAD as parent revision for 00000000
Change-Id: I4f583bb184fff00ea49a27de9df96aa348b81004
Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
2012-07-19 00:40:57 +02:00
Orgad Shaneh
202ce8ad70 Git: Improve Clean dialog
Check file iff it is not ignored

Change-Id: I16a489bdd772ea9b4df462b449a23324b5ef3b77
Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
2012-07-02 11:13:33 +02:00
Orgad Shaneh
3b5c40ba47 Git: Cleanup
* Remove unused 'silent' argument
* Do not output 'git --version' command

Change-Id: Ia940efd5ae7e9f262552841c11d20c3d6df559a3
Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
2012-07-02 11:10:34 +02:00
Orgad Shaneh
59417df92a Git: Keep author information on amend
Change-Id: I15982b746656536ae79a612ee563f69b58a4baa7
Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
2012-06-28 22:22:08 +02:00