aboutsummaryrefslogtreecommitdiffstats
path: root/init-repository
Commit message (Collapse)AuthorAgeFilesLines
* init-repo: Resolve alternate url for git sub-submodulesKai Koehne2018-09-131-6/+5
| | | | | | | | | | Do set correct --alternates argument for sub-submodules like qtwebengine/src/3rdparty. So far these repositories were always fully cloned from remote (or the mirror). Fixes: QTBUG-61901 Change-Id: I19f5930a03ab9050b6e62ac5a5c78780d0544e03 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* init-repo: Allow sub-module checkout path to differ from config nameAndy Shaw2018-07-101-1/+2
| | | | | | Change-Id: I622a8ed5daee59a96f4c6c28cc8c5e4d20b88f58 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* init-repo: complain about non-option argumentsOswald Buddenhagen2018-02-201-0/+1
| | | | | | | otherwise abuse may go unnoticed (at this stage ...). Change-Id: Ic8c2a843a941cdeb2d69542830eccf7fadcf252d Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* ignore submodules in dirtiness checkOswald Buddenhagen2017-04-231-1/+1
| | | | | | | | changed submodule sha1s should not prevent updating. Change-Id: Ibd4480bed91de2a04719c32c95a4c603eda4c44b Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* fix url normalizationOswald Buddenhagen2017-04-061-1/+1
| | | | | | | | | | after 8c0390143, we cannot rely on the denormalized segment starting with a slash any more. Task-number: QTBUG-59753 Change-Id: Ia3a3c005d1f41320747a60efc48a180caa88206b Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Valentin Fokin <fokinv@inf.u-szeged.hu>
* Reflect current URL in example commentJason Erb2017-03-161-1/+1
| | | | | Change-Id: I51091c69d2698ba23207a95d17f4748c22cd7cb7 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Remove init-repository assumption of repo url “…/qt/<repo>”Jason Erb2017-03-131-7/+7
| | | | | | | Task-number: QTBUG-59355 Change-Id: I7bc2c94f13c6cf43bd9d4472f18b3b769e75954b Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* don't fail to check out some modules in pinned modeOswald Buddenhagen2016-11-301-1/+8
| | | | | | | | | | | | | | | when used without the --branch option, we clone with --no-checkout, to avoid unnecessarily checking out files twice when the recorded sha1 doesn't happen to be the tip of the default branch. however, that would leave the index in a dirty state which would make the subsequent submodule update abort at some point, silently. to deal with the problem, we ignore this type of index dirtyness and use submodule update with --force. Task-number: QTBUG-57289 Change-Id: I6fc9693b0eaadfb04d2d80f9c8f1f2e11be47ae9 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* refuse to operate with dirty submodulesOswald Buddenhagen2016-11-301-0/+28
| | | | | | | | the operation would later error out anyway, after spending a lot of time fetching the remotes, and leaving a partially updated state behind. Change-Id: Ib2a688e446a9bd4ba3b15fc73082224433c18388 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* produce less ugly paths to the commit template in submodulesOswald Buddenhagen2016-11-141-1/+1
| | | | | | Change-Id: I7ebf3c46088e193c8f4605532c1f4a1b6d62d230 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* add --no-fetch optionOswald Buddenhagen2016-11-141-4/+12
| | | | | | | | | there is no point in re-fetching all repositories just because an update failed due to local modifications. Change-Id: Ie9883586d77f3310058353844f0bbcfb0b775ebb Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* fix cloning of tagged versionsOswald Buddenhagen2016-11-041-2/+7
| | | | | | | | | | | | | | | | the .gitmodules of tagged commits typically refers to a release branch which was deleted shortly after the release. consequently, git clone --branch is bound to fail. of course, cloning a fixed sha1/tag requires no branch in the first place, so revert back to using git clone --no-checkout in that case. amends ac6168c0c. Task-number: QTBUG-49133 Change-Id: Ica032f1d07a70ad89f16b23bdf5cdab785612fdc Reviewed-by: Robert Loehning <robert.loehning@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Fix git_install_hooks for relative gitdirIlia Kirianovskii2016-05-241-11/+13
| | | | | | | | Previously we expected gitdir to be always absolute. This patch fixes git_install_hooks in case of relative gitdir. Change-Id: Ia0883af18229703aaa22c62fd2181ed56d9f2fce Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* make it actually possible to specify 'ignore' as a classOswald Buddenhagen2016-05-051-0/+2
| | | | | | | another thing the doc claims to be possible - also quite reasonably. Change-Id: I2220245b10f02a778345b6549e345b2486630ffd Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* make it actually possible to exclude classesOswald Buddenhagen2016-05-051-11/+19
| | | | | | | the doc - quite reasonably - claims that it is possible. Change-Id: I4668b3feafe721f1db4deb65848206d8197962c8 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.6.0' into 5.6Liang Qi2016-03-311-7/+13
|\ | | | | | | | | | | | | Conflicts: .gitmodules Change-Id: Ic9c8564006c2722f925700f09ff42da3e912f580
| * Update .gitmodules for automated release src package creationv5.6.0Iikka Eklund2016-03-081-7/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduce new "deprecated" value for status attribute. We have two flavors of big source packages we need to produce: qt-everywhere-* which needs to include: - essential - addon - preview - deprecated (e.g. qtscript and qtenginio for Qt5.6 release) Installer only specific source package: - essential - addon The rest (deprecated, preview, ...) need to be shown as split src packages in the installer. The above leads to the following changes: qtscript: addon -> deprecated Needs to be part of big src packages but excluded from installer specific big source package. qtenginio: obsolete -> deprecated We can't exclude this module from qt-everywhere src packages. qtwayland: preview -> addon Needs to be part of installer specific big src package and the module status is not preview anymore. Change-Id: I52e10629bf81860f56ebc4ce9d395e0ca54c4264 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | rework hook installationOswald Buddenhagen2016-02-171-16/+35
|/ | | | | | | | | | | | | | | | | the primary purpose of this change is making it work with new-style submodules (1.7+) and git-worktree (2.5+). this means resolving '.git' and 'commondir' files. we avoid calling git commands, because a) it's slow on windows, b) some of them are unavailable in older git versions and it's tedious to deal with that and c) their output is not necessarily optimal (not always absolute paths). we also don't use relative paths for the hook locations any more, as that's too tedious to deal with. Change-Id: Ie341e748e56d6bef40856e4a49ac368850028d83 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* properly complain about invalid entries in --module-subsetOswald Buddenhagen2016-02-071-0/+4
| | | | | Change-Id: I13ec7a6acdc8a47efea14bfabf0413d8a3570870 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* replace 'initrepo' with more fine-grained 'status'Oswald Buddenhagen2016-02-071-7/+36
| | | | | | | | | | | | instead of a simple bool, we now have five states: preview, active, addon, obsolete, and ignore (the default). the default includes the first three. the CI system is expected to use --module-subset=all,-ignore to include everything that is expected to build (in some configurations). Change-Id: Ifb43412054a8e42db0425f24f8e53acfce363caa Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* don't use POD, to restore msysgit perl compatibilityOswald Buddenhagen2015-12-251-112/+83
| | | | | Change-Id: I360a6d5246e33dcf3f72bc83f2790905af8c1463 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* don't use GetOptionsFromArray, to restore msysgit perl compatibilityOswald Buddenhagen2015-12-251-4/+4
| | | | | Change-Id: Ic02a5d8b5a8a813a23bed1c0b45bcb8ee47e3edb Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Explain what the canonical URLs are.Edward Welbourne2015-10-121-1/+2
| | | | | | | | This caught me out the first time I tried to use init-repository. Documentation should work for noobs. Change-Id: Ia6c9ce395ace034128bfe80f2c31be7f9cd4cf35 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* Removed QtWebkit and QtWebkit-Examples from qt5.gitJani Heikkinen2015-09-031-11/+0
| | | | | | | | | QtWebkit (and QtWebkit-Examples) were deprecated in Qt 5.5 and will now be removed from qt5.git in Qt5.6 release Change-Id: I86e1072141956136fa5e4220cdcdf812492453b3 Reviewed-by: Tuukka Turunen <tuukka.turunen@digia.com> Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Prospective fix for unnecessary submodule cloningSimon Hausmann2015-03-271-1/+1
| | | | | | | | | | | | When cloning qtdeclarative, we end up also cloning qtdeclarative-testsuites, which is not intentional for users of Qt (and init-repository). The init-repository script checks for the submodule "repo".update key and skips the sub module if the value is "ignore". However according to the documentation no checkout is to be done if the value is "none", which is also what qtdeclarative's .gitmodules specifies for the ecmascript test suite. Change-Id: Ieb37607ae4ea7c32d6af886d3e2533fb9dea1f13 Reviewed-by: Jani Heikkinen <jani.heikkinen@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.4' into 5.5Oswald Buddenhagen2015-03-091-3/+4
|\
| * use git clone --branch instead of --no-checkoutOswald Buddenhagen2015-03-041-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | git submodule update does not cause an actual checkout if HEAD matches the recorded submodule sha1 even if it was not actually checked out. it would be possible to work around this by calling git checkout HEAD in each submodule if no files are checked out, but that seems hacky. instead, just make the module cloning already check out the desired branch. this produces checkouts that are within a few commits of the final sha1, so isn't too bad. Change-Id: I435c1a2e24f39fd8c0d65f0d90df0216715668b7
* | Update copyright headersJani Heikkinen2015-02-251-22/+14
|/ | | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Change-Id: Ieb3be34b0d4061fb8dc886991528951f59dbd67e Reviewed-by: Tuukka Turunen <tuukka.turunen@digia.com> Reviewed-by: Iikka Eklund <iikka.eklund@theqtcompany.com>
* don't fetch again when updating submodulesOswald Buddenhagen2015-02-061-1/+1
| | | | | | | | | | we already did it a moment ago. this should affect only the --remote case, but there is no harm in always specifying it. Change-Id: I3ef0854c790726772fb63ab7829b59ef85ac4f18 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* don't checkout when cloningOswald Buddenhagen2015-02-061-1/+2
| | | | | | | | we will subsequently do a submodule update with a possibly different sha1 anyway. Change-Id: I4950f3727e4263a73c32eff8460962d5796bc5f3 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* make manual fetching saneOswald Buddenhagen2015-02-061-2/+11
| | | | | | | | | | | it is in no way said that the remote's HEAD will contain the commit to be checked out - in fact, it's pretty much guaranteed that it won't for anything but the default branch. fetching the whole remote avoids additional roundtrips and makes the --branch feature actually work reasonably. Change-Id: I20de2da848b12aea8c5b2784307fe9860252009b Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* always check out the target branch when using --branchOswald Buddenhagen2015-02-061-14/+15
| | | | | | | | | a submodule update with --remote will use the tip of the remote's branch, but it won't actually switch to the branch if HEAD doesn't point to it yet. Change-Id: If13e31da2646683dfb9e832eaab929190acb0167 Reviewed-by: Sergio Ahumada <sahumada@texla.cl>
* fix --branch without --no-updateOswald Buddenhagen2015-02-061-1/+3
| | | | | | | | clearly, i botched the syntax, but i can't even tell how. that's perl. the new version is more readable anyway. Change-Id: Ic3e93c2cf30ee92f368808070899af4b9f7809a3 Reviewed-by: Sergio Ahumada <sahumada@texla.cl>
* don't fetch unless we are updatingOswald Buddenhagen2014-11-121-1/+1
| | | | | | | | it's just wasting time. Change-Id: I541cc535c5c95b0140cfa14d7cb042dbe029525e Reviewed-by: Simon Hausmann <simon.hausmann@digia.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
* Fix cloning with mirrorsKai Koehne2014-11-121-1/+0
| | | | | | | | | | Commit 486f5f37761 broke the cloning with one of the mirror options: git ls-remote git://mirror/qt/qtactiveqt.git.git test/if/mirror/exists fatal: The remote end hung up unexpectedly Change-Id: Ia154ee34dd10e35b24676777d8dde98ef0790ee1 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* Fix description of --mirror argumentKai Koehne2014-11-121-1/+1
| | | | | | | The argument actually requires a trailing slash. Change-Id: Idc2567746d2b3f4ebf31c2bce5ec683d2a1f425b Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* teach init-repository about branchesOswald Buddenhagen2014-11-121-4/+29
| | | | | | | | specifically, add the --branch option and the necessary keys to .gitmodules. Change-Id: I09e2df6bd012629f76a35238d66697637bdffe44 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Ignore alternate if its not a git repoJan Arve Saether2014-11-031-1/+1
| | | | | | | | Don't just check if the submodule folder exist, since that doesn't qualify it for being a valid git repo. Change-Id: Ia3902714a0554908c0b8fd3228ed6fc2cfddd344 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* fix to let init-repository work on non english localeBruno Coudoin2014-10-171-0/+2
| | | | | | | | This patch forces the C locale before calling 'git submodule' in order to get the non localized string 'Entering' that we filter out. Change-Id: I46d3770956a6b07e574ad15549bbb8942285b800 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* properly recurse submodule initializationOswald Buddenhagen2014-09-231-10/+11
| | | | | Change-Id: Icd438b9da9af0275dd508186a265bc211d9d01ce Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* don't unnecessarily initialize unwanted submodulesOswald Buddenhagen2014-09-231-4/+3
| | | | | | | it wastes time and causes output noise. Change-Id: Ifee01150293431b3c528f30a46280bd142e30b22 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* don't uninit submodules before re-initingOswald Buddenhagen2014-09-231-10/+1
| | | | | | | | | git-submodule init will simply not touch the already initialized submodules. this is just fine, as we'll overwrite the config entries with our own urls (and remove the obsolete ones) afterwards anyway. Change-Id: I6372bd48be9792e456899dc829226921990140c4 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* keep information about default repos in .gitmodulesOswald Buddenhagen2014-09-231-36/+6
| | | | | | | it's backwards to keep this in the script itself. Change-Id: I4248ba3fef984bdff5d034cb2e6db6cae3209d68 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* don't pass around url unnecessarilyOswald Buddenhagen2014-09-231-6/+17
| | | | | | | we now have everything we need to construct it on the fly. Change-Id: I129e49bbcf46428d0fcef31ab8188df9d6a4026c Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* get submodule urls from .gitmodulesOswald Buddenhagen2014-09-231-75/+42
| | | | | | | keeping a redundant copy in the script is plain backwards. Change-Id: Ibdd1bab9d2cb5af7d7747d5caa2afc7d6e7571ad Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* rewrite submodule exclusion logicOswald Buddenhagen2014-09-231-67/+39
| | | | | | | | | | | instead of doing multiple passes over the submodules, do everything in one go. as a bonus, as the internal structure uses exclusion entries in the module list, we can make that feature user-accessible just as well. Change-Id: I8bfb30c8051a9150f92e2e124ff52f64e3efe03c Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* nuke the --http optionOswald Buddenhagen2014-09-231-31/+3
| | | | | | | | | it was a vestige from the times when the submodules had absolute urls pointing at git://gitorious.org. as we now use relative urls, things work just fine without that option. Change-Id: I5e93ff8cd2497a27cfbdd53dbcf9db3cd0c4cd1d Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* init-repository: Support cases where $submodule/.git is a fileJocelyn Turcotte2014-09-101-1/+1
| | | | | | | | | | | | Since git 1.7.8 the $GIT_DIR of the submodule can be a reference to the super-module's $GIT_DIR/modules/<name>/ Test for existence instead of testing for a directory before attempting a git clone there. Change-Id: Ic539e770067da1417a2ad374c21253212473abe6 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* Add qtwebengine as submoduleFrederik Gladhorn2014-08-291-0/+2
| | | | | | | | | | | qtwebkit is listed as an optional dependency for qtwebengine to ensure that qtwebkit and qtwebengine are not linked in parallel on the CI system. Otherwise we could run out of memory. Change-Id: Ib80d72407df03037c928d99f55c8e04e98e506d9 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com> Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
* Add QtWayland to default checkoutFrederik Gladhorn2014-08-201-0/+1
| | | | | | | QtWayland is going to be released with Qt 5.4. Change-Id: I9a9bead92c6c34324510007ad844c9fdf633690d Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>