summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* | sync: deleted unused repos in reversed order (children before parent)Kuang-che Wu2019-04-061-1/+2
|/ | | | | Bug: chromium:950002 Test: repo sync chromeos using release manifest file Change-Id: I613df6a1973eb36acd806a703e72f5172554bcc7
* sync: respect --force-sync when fetching updatesMike Frysinger2019-03-181-2/+6
| | | | | | | | | | | | | | | | | | If a tag is rewritten on the server (which is bad), trying to recover locally with `repo sync --force-sync` doesn't actually work. People have to manually delete things themselves to fix syncing. While tags should never be rewritten in practice, allow users to easily recover from broken servers. We updated some of these code paths already (see commit 6e53844f1edd3 "Allow clobbering of existing tags from remote."), but the incremental update flow was missed. Bug: b/120778183 Bug: chromium:932651 Test: delete local tag & recreate to diff commit, then check `repo sync` & `repo sync --force-sync` behavior Change-Id: I3648f7d2526732c06016b691a9a36c003157618d
* docs: fixed typo error.Kyunam Jo2019-03-181-1/+1
| | | | Change-Id: Ic3ec1bfb150ec932e05ba5eda43537784f1fdcda
* Merge "project: Relax the submodule name pattern to accept dots"Sebastian Schuberth2019-03-141-2/+2
|\
| * project: Relax the submodule name pattern to accept dotsSebastian Schuberth2019-03-111-2/+2
| | | | | | | | | | | | | | | | Even if dots are used as separators for Git config keys, they are not forbidden as part of submodule names. This fixes the issue of submodules with a name like e.g. "long.js" to be skipped from checkout. Change-Id: I77da07925ad207fa3d043067dfbbcb4a1ebdac4d
* | Merge "sync: Add option '--force-remove-dirty'"Oleksii Okolielov2019-03-111-3/+17
|\ \ | |/ |/|
| * sync: Add option '--force-remove-dirty'Oleksii Okolielov2019-03-111-3/+17
| | | | | | | | | | | | | | | | | | | | Forcefully remove dirty projects if option '--force-remove-dirty' is given. The '--force-remove-dirty' option can be used to remove previously used projects with uncommitted changes. WARNING: This may cause data to be lost since uncommitted changes may be removed with projects that no longer exist in the manifest. Change-Id: I844a6e943ded522fdc7b1b942c0a1269768054bc
* | docs: document a Python 3 migration planMike Frysinger2019-02-011-0/+32
| | | | | | | | | | Bug: https://crbug.com/gerrit/10418 Change-Id: I72d82ce3a2d9af45d942bb10de82340110864ea5
* | event_log: turn id generation from a generator to a func callv1.13.2Mike Frysinger2019-01-141-12/+11
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | Running lots of sync processes in parallel can hit the failure: Fetching projects: 23% (124/523)Exception in thread Thread-201: Traceback (most recent call last): File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner self.run() File "/usr/lib/python2.7/threading.py", line 754, in run self.__target(*self.__args, **self.__kwargs) File "/usr/local/src/repo/subcmds/sync.py", line 278, in _FetchProjectList success = self._FetchHelper(opt, project, *args, **kwargs) File "/usr/local/src/repo/subcmds/sync.py", line 357, in _FetchHelper start, finish, success) File "/usr/local/src/repo/event_log.py", line 104, in AddSync event = self.Add(project.relpath, task_name, start, finish, success) File "/usr/local/src/repo/event_log.py", line 74, in Add 'id': (kind, next(self._next_id)), ValueError: generator already executing It looks like, while we lock the multiprocessing value correctly, the generator that wraps the value isn't parallel safe. Since we don't have a way of doing that (as it's part of the language), turn it into a plain function call instead. Bug: https://crbug.com/gerrit/10293 Change-Id: I0db03601986ca0370a1699bab32adb03e7b2910a
* init: Remove -c short option for --current-branchv1.13.1Ereth McKnight-MacNeil2018-12-202-3/+3
| | | | | | | This option conflicts with the gitc-init -c short option. Bug: https://crbug.com/gerrit/10200 Change-Id: I06f37564429ca0bd4c0bbea6066daae4f663c838
* Merge "README: link in new bug tracker"Mike Frysinger2018-12-201-1/+1
|\
| * README: link in new bug trackerMike Frysinger2018-12-201-1/+1
| | | | | | | | Change-Id: I043afc0b77e709919e49ce548dff47776fddaddf
* | Leverage the next keyword from python 2.7Eli Ribble2018-12-193-9/+10
|/ | | | | | | This is literally what the next keyword is for. https://www.python.org/dev/peps/pep-3114/ Change-Id: I843755910b847737b077ff2361ba3e04409db0f0
* Allow clobbering of existing tags from remote.v1.13.0Xin Li2018-12-102-2/+2
| | | | | Bug: 120778183 Change-Id: Id44e2b68abc410a3afd4e07a3c943b0936347e38
* platform_utils: Fix exception handling in _walk_windows_implDavid Pursehouse2018-11-061-1/+1
| | | | Change-Id: I6b79cbc4c1bbbe17ffe8361fe1544434beaa9059
* Add option for git-repo to support 'silent' uploadsVadim Bendebury2018-11-052-0/+9
| | | | | | | | | | | | | | | | | | | When --ne/--no-emails is added to 'repo upload' command line, gerrit server will not generate notification emails. project.py:Project.UploadForReview method is modified to accept a string recognizable by gerrit to indicate different sets of destination email addressees, but the upload command line allows only one option - disable sending emails completely. Default repo upload behavior is not being changed. TEST=tried in the Chrome OS repo, observed that patches uploaded with --ne or --no-emails indeed do not trigger any emails, while patches uploaded without these command line options still trigger email notifications. Change-Id: I0301edec984907aedac277d883bd0e6d3099aedc
* upload: Unify option passing in ssh and other transportsJonathan Nieder2018-11-051-15/+9
| | | | | | | | | | | | Pass options through the refspec for all transports, including ssh. This means the behavior will be more consistent between the ssh and https cases. A downside is that this prevents passing special characters in reviewer options. That already didn't work over https, so it seems okay. It could be fixed by using push options instead. Change-Id: Ia38d16e350cb8cb0de14463bfb3d9724e13bc4bf
* Merge "init: --dissociate option to copy objects borrowed with --reference"David Pursehouse2018-10-283-0/+24
|\
| * init: --dissociate option to copy objects borrowed with --referenceNikolai Merinov2018-10-193-0/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "repo init --reference" has two purposes: to decrease bandwidth used at clone time, and to decrease disk usage afterward, by using the reference repositories as an alternate store of objects even after the clone. The downside is that it makes the borrowing repositories dependent on the reference repositories, so it is easy to end up with missing objects by mistake after a cleanup operation like "git gc". To prevent that, v2.3.0-rc0~30^2 (clone: --dissociate option to mark that reference is only temporary, 2014-10-14), "git clone" gained a --dissociate option that makes --reference reuse objects from the reference repository at clone time but copy them over instead of using the reference as an alternate. This is more straightforward to use than plain --reference, at the cost of higher disk usage. Introduce a --dissociate to "repo init" that brings the same benefits to repo. The option is simply passed on to "git clone". Change-Id: Ib50a549eb71e0a2b3e234aea57537923962a80d4
* | Add support for long pathsRenaud Paquay2018-10-227-42/+138
|/ | | | | | | | | | | | | | | | | | | | * Add more file i/o wrappers in platform_utils to allow using long paths (length > MAX_PATH) on Windows. * Paths using the long path syntax ("\\?\" prefix) should never escape the platform_utils API surface area, so that this specific syntax is not visible to the rest of the repo code base. * Forward many calls from os.xxx to platform_utils.xxx in various place to ensure long paths support, specifically when repo decides to delete obsolete directories. * There are more places that need to be converted to support long paths, this commit is an initial effort to unblock a few common use cases. * Also, fix remove function to handle directory symlinks Change-Id: If82ccc408e516e96ff7260be25f8fd2fe3f9571a
* Merge "update markdown/help header format"Jonathan Nieder2018-10-109-65/+27
|\
| * update markdown/help header formatMike Frysinger2018-10-109-65/+27
| | | | | | | | | | | | | | Since gitiles recommends using # headers over ---/=== underlines, change the manifest-format.md over and all our help texts. Change-Id: I96391d41fba769e9f26870d497cf7cf01c8d8ab3
* | update homepage URIsMike Frysinger2018-10-102-3/+3
|/ | | | Change-Id: I482a72bf296978625b1e82ef580b0e0d4d57ff25
* manifest-format: convert to markdownMike Frysinger2018-10-054-101/+105
| | | | | | | The gitiles system doesn't render .txt files, so convert this to .md for better display online. Change-Id: Ie12e46daf008dd8c97ae2ffd21fb68bd948fe625
* Windows: Add support for creating symlinks as an unprivileged userRenaud Paquay2018-10-031-7/+15
| | | | | | | | | | See https://blogs.windows.com/buildingapps/2016/12/02/symlinks-windows-10/ for announcement of new flag. This change follow the same pattern as what was done in "go": https://github.com/golang/go/pull/24307/files#diff-b87bc12e4da2497308f9ef746086e4f0 Change-Id: If1e99fefdd3f787598e695731019c34b9bfcd1c2
* fix some sync error while using python3Dylan Deng2018-07-243-3/+12
| | | | Change-Id: I70925e48756c356d48359679d8ad1b9e33a68595
* Remove unused pylint suppressionsDavid Pursehouse2018-07-249-25/+6
| | | | | | | | | | | pylint is not used since bb5b1a0. The pyflakes cleanup mentioned in that commit has not been done, but given that this project is no longer being actively developed I don't think it's worth spending time doing it. Leaving the pylint suppressions causes confusion because it leads people to think that we are still using pylint. Change-Id: If7d9f280a0f408c780f15915ffdb80579ae21f69
* Merge "Flush stderr on Windows"Sebastian Schuberth2018-07-131-0/+4
|\
| * Flush stderr on WindowsSebastian Schuberth2018-07-131-0/+4
| | | | | | | | | | | | | | | | While on Linux stderr is unbuffered, it is buffered on Windows. Always flush stderr on Windows to ensure any error messages appear in the right order to ease diagnosing. Change-Id: I37300e384ecd3a51a321a48818f0114d6f3357a0
* | Fix the initial existence check for "repo"Sebastian Schuberth2018-07-131-4/+5
|/ | | | | | | | | | | | | | | | | | | Commit 27226e742d7e1a3d371531c19a3fdd91a4f9ab4a introduced a warning if "repo" is not part of the bootstrapped REPO_URL. However, that check was done too early, directly after the call to _Clone. As the _Clone function does not actually clone but it only initializes and fetches, the check needs to be moved to after the call to _Checkout. To reproduce, call repo init --no-clone-bundle --repo-branch=master -u https://android.googlesource.com/platform/manifest which will currently always show the (bogus) warning message. With this fix, the warning will only be shown if "repo" indeed does not exist. While at it, also slightly improve the code by using os.path.join(). Change-Id: Ied89e24231addabab6075005065748df1ffa74c4
* hooks/pre-auto-gc-battery: allow gc to run on non-laptopsAdam Borowski2018-07-111-1/+1
| | | | | | | | | | | | | | | | | | Desktops and servers tend to have no power sensor, thus on_ac_power returns 255 ("unknown"). Thus, let's take any answer other than 1 ("battery") as no contraindication to run gc. If that tool returns "unknown", there's no point in querying other sources as it already queried them, and is smarter than us (can handle multiple adapters). Reported by: Xin Li <delphij@google.com> Signed-off-by: Adam Borowski <kilobyte@angband.pl> Signed-off-by: Junio C Hamano <gitster@pobox.com> (cherry picked from git.git commit 781262c5e7ad4a7813c528803117ed0d2e8c5172) Signed-off-by: Fredrik Roubert <roubert@google.com> Signed-off-by: Jonathan Nieder <jrn@google.com> Change-Id: I51fe2eb1eb879492a61e8e09c86ee34d049036c1
* manifest: Support a default upstream valueNasser Grainawi2018-05-092-2/+14
| | | | | | | It's convenient to set upstream for all projects in a manifest instead of repeating the same value for each project. Change-Id: I946b1de4efb01b351c332dfad108fa7d4f443cba
* Merge "docs: repo-hooks: fix cwd details"Mike Frysinger2018-04-261-3/+8
|\
| * docs: repo-hooks: fix cwd detailsMike Frysinger2018-04-251-3/+8
| | | | | | | | | | | | | | The hooks are run from the top of the manifest checkout, not from the individual git repos. It's up to individual hooks to chdir as needed. Change-Id: I53325e0c3dcaa9c250b02b223e78d238d2cbd36d
* | Pass refs to ls-remoteAkshay Verma2018-03-242-4/+5
|/ | | | | | This will fix the issue of parsing large output locally Change-Id: I9a5cf1238147a02c92a3fca53eab9bd57f9d16b4
* Download latest patch when no patch is specifiedAkshay Verma2018-03-172-0/+18
| | | | | | | | | | | When someone does "repo download -c <project> <change>" without specifying a patch number, by default patch 1 is downloaded. An alternative is to look for the latest patch and download the same when no explicit patch is given. This commit does the same by identifying the latest patch using "git ls-remote". Change-Id: Ia5fa7364415f53a3d9436df4643e38f3c90ded58
* Merge changes I9c1ab65f,I7b2027aeDavid Pursehouse2018-03-162-3/+9
|\ | | | | | | | | | | * changes: init: Remove string concat in no-op os.path.join Support relative paths in --reference
| * init: Remove string concat in no-op os.path.joinSamuel Holland2018-01-221-1/+2
| | | | | | | | | | | | This also fixes a line length warning. Change-Id: I9c1ab65f83a35581dd657a707c7bc3c69db2b1dc
| * Support relative paths in --referenceSamuel Holland2018-01-222-2/+7
| | | | | | | | | | | | | | | | Put the correctly-expanded relative paths in objects/info/alternates. From gitrepository-layout(5), this path should be "relative to the object database, not to the repository". Change-Id: I7b2027ae23cf7d367b80f5a187603c4cbacdb2de
* | Add a way to override the revision of an <extend-project>Luis Hector Chavez2018-03-152-0/+7
| | | | | | | | | | | | | | | | This change adds support for the 'revision' attribute in <extend-project>. This avoids the need to perform a <remove-project> followed by a <project> in local manifests. Change-Id: Id2834fcfc1ae0d74b3347bed3618f250bf696b1f
* | Merge "implement optional 'sync-tags' in the manifest file"David Pursehouse2018-02-263-0/+34
|\ \
| * | implement optional 'sync-tags' in the manifest fileYOUNG HO CHA2018-02-143-0/+34
| |/ | | | | | | | | | | | | | | Allow the 'default' and 'project' element in the manifest file to apply "--no-tags" option equivalent. Change-Id: I7e0f8c17a0e25cca744d45df049076d203c52ff5 Signed-off-by: YOUNG HO CHA <ganadist@gmail.com>
* / Take care of a tilde on cookie file pathDaichi Ueura2018-02-261-2/+5
|/ | | | | | This handles cookie file path like "~/.gitcookies". Change-Id: I87ba120a940fff38073d520f83b70654e6a239ba
* event_log: Fix order of parameters to Add method callDavid Pursehouse2018-01-101-1/+1
| | | | Change-Id: I5add20eadfde39806ef4b2cc819da0ae0bfec2f5
* Sync correctly when subproject url is a relative url to its parent urlShouheng Zhang2017-12-211-0/+2
| | | | | | | | | | | Issue: when subproject url is a relative in .gitmodules repo tool cannot handle this and cause: "fatal: '***' does not appear to be a git repository fatal: Could not read from remote repository." issue. Signed-off-by: Shouheng Zhang <shouheng.zhang@intel.com> Change-Id: I2a24c291ea0074ba13a740b32a11c0c25975e72b
* Merge "Update commit-msg hook to version from Gerrit 2.14.6"David Pursehouse2017-12-071-2/+2
|\
| * Update commit-msg hook to version from Gerrit 2.14.6Dana Dahlstrom2017-12-061-2/+2
| | | | | | | | Change-Id: I14403fea4d017b97be5131e695803f121d404af2
* | Support --push-option in upload subcommandMasaya Suzuki2017-11-132-4/+16
| | | | | | | | Change-Id: I44836f8c66ded5a96cbf5431912e027e681f6529
* | document repo hooks mechanismMike Frysinger2017-11-102-0/+107
| | | | | | | | Change-Id: I9e25b92c846f887f515efcc706cf5a869645e0ec
* | forall: Clarify expansion of REPO_ environment values with -cDavid Pursehouse2017-10-311-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a user executes: repo forall -c echo $REPO_PROJECT then $REPO_NAME is expanded by the user's shell first, and passed as $1 to the shell that executes echo. This will either result in no output, or output of whatever REPO_NAME is set to in the user's shell. Either way, this is an unexpected result. The correct way to do it is: repo forall -c 'echo $REPO_PROJECT' such that $REPO_NAME is passed in to the shell literally, and then expanded to the value set in the environment that was passed to the shell. Update the documentation to make this clearer. Change-Id: I713caee914172ad8d8f0fafacd27026502436f0d