Commit Graph

339 Commits

Author SHA1 Message Date
Orgad Shaneh
391094ed2c Git: Do not detect repository inside git dir
Change-Id: I74f7c7eab6dee584bd4c42499ce8e1613d008043
Reviewed-by: Petar Perisin <petar.perisin@gmail.com>
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-02-28 17:52:40 +01:00
Orgad Shaneh
0cabae0f77 Git: Remove unneeded class qualification
Change-Id: I7f604973ba1fdb974d6097abeb7127273786f69c
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-02-28 17:52:25 +01:00
Orgad Shaneh
75c15d1f9d Git: Remove redundant check
outputWindow() cannot be null.

Change-Id: Ie50bff33a3590a20e9de6b2602dac9cd70eb77bc
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-02-28 17:52:11 +01:00
Orgad Shaneh
9376c24fd0 Git: Fix regexp for cherry-pick and revert conflict
Output should contain a \n in the end, so $ is counter-productive

Change-Id: I3a7d1dcbed1aa7c78e9a96cafdb3c0d1e65edc7a
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-02-28 17:51:58 +01:00
Orgad Shaneh
a547b6af46 Git: Fix unstaging modified files
Regression introduced in ab85e7342e

Change-Id: I92ec1f9d45b713d426fdae99d16e93ba5eb455cb
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-02-26 12:54:48 +01:00
Orgad Shaneh
cdcc8256a0 Git: Require 1.7.2
Remove legacy code

Change-Id: I0ce03f7a34c92b48ceb705a0feec43e0ba89ef5c
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
2013-02-20 13:29:11 +01:00
Orgad Shaneh
4e3f83e388 Git: Mute status calls
Called from several places for which popping the pane is strange

Change-Id: Ib83cb51e7926a6b27ff59631f6f4452a41f6a950
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-02-18 10:19:28 +01:00
Orgad Shaneh
7f2191ddb6 Git: Disambiguate file argument on log
Change-Id: Ie89dc32b59af8900764e2af4b8b93354a6c56a51
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-02-18 10:06:21 +01:00
Orgad Shaneh
610a355eb3 Git: Fix cherry-pick/revert commit resolving on conflict
Change-Id: I3dee32864f1000afce098c1716307929b4da2462
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-02-18 10:06:12 +01:00
Orgad Shaneh
e5e384a237 Fix popping a saved stash
stash pop accepts only explicit object (stash@{N})

Change-Id: Ie3d40173ffd94849bde30076235f65d5e4e92cc2
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-02-18 10:05:54 +01:00
Orgad Shaneh
0e86785019 Git: Preserve multiple branches that link to the same commit
If remote HEAD commit is referenced by multiple branches, only the last
one is currently listed

Change-Id: Iac689125610aaf49c0bc31285a0d283fd48a271c
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-02-14 15:00:18 +01:00
Orgad Shaneh
976c052c0b Git: Remove debug output
Change-Id: I5610ce9117c997a82ce8d28ff2440bebd28d9181
Reviewed-by: hjk <hjk121@nokiamail.com>
2013-02-13 21:12:01 +01:00
Orgad Shaneh
34fd5ca532 Git: Handle "no changes" case on conflict resolving
Change-Id: I75bb18c9564ffac3de2654bd388465794481b487
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-02-12 18:41:39 +01:00
Orgad Shaneh
c68adbf9c0 Git: Enable skipping a commit on rebase
Change-Id: Ib83ca453c86b93cb359a2a0a9774c7d39533be4e
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-02-12 18:41:31 +01:00
Orgad Shaneh
bf61858375 Git: Show conflicted commit
Change-Id: I398437db96082e8813090b5eb78ae1c8b8158ffe
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-02-12 18:41:15 +01:00
Orgad Shaneh
2c68c80196 Git: Make file state resolving more accurate
Change-Id: I238ef964df126a341c87dacf9344ff1570f31845
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-02-11 11:10:11 +01:00
Leena Miettinen
81a69f3e42 UI text: fix Git messages
Fix capitalization and punctualization of Git messages.

Change-Id: I76de86dc87727b17eca6d0deabc530f889fa284e
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2013-02-09 19:27:03 +01:00
Yuchen Deng
79e8f88536 Git: Fix log encoding
We should using "i18n.logOutputEncoding" as we can.
In default, it should be 'utf-8'.

Change-Id: Ic5af2869e5fd5273a712f28e8e59149a4c2ef2b7
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-02-05 10:50:12 +01:00
Oswald Buddenhagen
1fda2111d4 Merge remote-tracking branch 'origin/2.6'
Conflicts:
	src/plugins/autotoolsprojectmanager/AutotoolsProjectManager.pluginspec.in
	src/plugins/debugger/qtmessageloghandler.cpp
	src/plugins/debugger/qtmessagelogwindow.cpp
	src/plugins/madde/maemodeployconfigurationwidget.cpp
	src/plugins/qmldesigner/components/integration/designdocumentcontroller.cpp
	src/plugins/qmldesigner/designercore/include/widgetqueryview.h
	src/plugins/qmldesigner/designercore/metainfo/metainfoparser.cpp
	src/plugins/qmldesigner/designercore/model/modelnodecontextmenu.cpp
	src/plugins/qmldesigner/designercore/model/modelnodecontextmenu.h
	src/plugins/qmlprojectmanager/qmlprojectapplicationwizard.cpp
	src/plugins/qnx/bardescriptormagicmatcher.h
	src/plugins/qt4projectmanager/profilekeywords.cpp
	src/plugins/remotelinux/deployablefilesperprofile.cpp
	src/plugins/remotelinux/deployablefilesperprofile.h
	src/plugins/remotelinux/deploymentinfo.cpp
	src/plugins/remotelinux/deploymentsettingsassistant.cpp
	src/plugins/remotelinux/profilesupdatedialog.cpp
	tests/auto/icheckbuild/ichecklib.cpp
	tests/auto/icheckbuild/parsemanager.cpp
	tests/auto/icheckbuild/parsemanager.h

Change-Id: Ie465a578446a089e1c502d1cb1096e84ca058104
2013-01-31 16:25:33 +01:00
Robert Loehning
298531e370 Incremented year in copyright info
Change-Id: Ic6a9ff0359625021ebc061d22db6811814534205
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2013-01-29 16:27:03 +01:00
Orgad Shaneh
cf5f109b68 Git: Remove "Branch" from synchronousCheckoutBranch
Other refs can also be checked out using this function

Change-Id: I80a1c15244b1043cfce650a121c71174b9d322cb
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-01-24 13:25:06 +01:00
Orgad Shaneh
120f03061d Git: Remove unused functions
Change-Id: I6cb9752f435255379cf7a8a321b3192a410d91df
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-01-24 12:32:52 +01:00
Orgad Shaneh
177f774036 Git: Use StashGuard for merge and rebase
Change-Id: I7c9059396aaac78c769518b34c7bf68bfe9932ec
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
Reviewed-by: Petar Perisin <petar.perisin@gmail.com>
2013-01-24 12:32:40 +01:00
Orgad Shaneh
5551c1e906 Git: Introduce StashGuard
Offers the user to stash changes (if relevant), stores
the results and pops the stash when it goes out of scope
(unless disabled)

Change-Id: Ibc0d2a5d3e3c953062fb17ecba903ca814524837
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-01-24 12:32:26 +01:00
Orgad Shaneh
c670a66fe1 Git: Explicitly pop stored stashes
If the user created another stashed between save and
pop, this stash will be restored instead of the intended
one.

Change-Id: I605c9f440345d8c7e0876f4f60daa7146bebb212
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-01-24 12:32:17 +01:00
Orgad Shaneh
e463c56c32 Git: Fix calls to ensureStash
Change-Id: I581afbe314055796d22f883e501dfb5fd17117fe
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-01-23 17:56:57 +01:00
Orgad Shaneh
89d16332d1 Git: Replace synchronousStash with ensureStash
When flags are not used. syncStash doesn't return result,
which can be useful for StashGuard

Change-Id: I1327b5d8d10410e7a3b9fdb07a03b476d5abcdc4
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-01-23 15:13:27 +01:00
Orgad Shaneh
8b67ae7395 Git: Write error to error stream in executeSyncStash
Change-Id: I36c70fc3df5958b7bb5378e2529a451c497d6632
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-01-23 15:11:03 +01:00
Orgad Shaneh
246f8e9aaf Git: Fix indentation in ensureStash()
Change-Id: I5243fce895ae21a2b07cb9e0d98a60d69f848b10
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-01-23 15:05:27 +01:00
Orgad Shaneh
daef1fbb88 Git: Use stash pop instead of apply...
... when the stash should be removed on successful pop

Change-Id: I39b2c01b0a518d3c70bcb8dc898191cca6d3e84d
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-01-23 14:59:24 +01:00
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