summaryrefslogtreecommitdiffstats
path: root/subcmds
Commit message (Collapse)AuthorAgeFilesLines
* Add option for git-repo to support 'silent' uploadsVadim Bendebury2018-11-051-0/+4
| | | | | | | | | | | | | | | | | | | 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
* Merge "init: --dissociate option to copy objects borrowed with --reference"David Pursehouse2018-10-281-0/+11
|\
| * init: --dissociate option to copy objects borrowed with --referenceNikolai Merinov2018-10-191-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "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-222-14/+15
|/ | | | | | | | | | | | | | | | | | | | * 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-108-37/+13
|\
| * update markdown/help header formatMike Frysinger2018-10-108-37/+13
| | | | | | | | | | | | | | 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-101-1/+1
|/ | | | Change-Id: I482a72bf296978625b1e82ef580b0e0d4d57ff25
* manifest-format: convert to markdownMike Frysinger2018-10-051-1/+1
| | | | | | | The gitiles system doesn't render .txt files, so convert this to .md for better display online. Change-Id: Ie12e46daf008dd8c97ae2ffd21fb68bd948fe625
* Remove unused pylint suppressionsDavid Pursehouse2018-07-243-6/+0
| | | | | | | | | | | 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
* Pass refs to ls-remoteAkshay Verma2018-03-241-2/+3
| | | | | | This will fix the issue of parsing large output locally Change-Id: I9a5cf1238147a02c92a3fca53eab9bd57f9d16b4
* Download latest patch when no patch is specifiedAkshay Verma2018-03-171-0/+8
| | | | | | | | | | | 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
* 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-221-1/+1
| | | | | | | | 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
* Support --push-option in upload subcommandMasaya Suzuki2017-11-131-1/+6
| | | | Change-Id: I44836f8c66ded5a96cbf5431912e027e681f6529
* 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
* Replace all os.remove callsRenaud Paquay2017-08-311-5/+5
| | | | | | | | os.remove raises an exception when deleting read-only files on Windows. Replace all calls with calls to platform_utils.remove, which deals with deals with that issue. Change-Id: I4dc9e0c9a36b4238880520c69f5075eca40f3e66
* Implement islink, readlink and realpath using Win32 apiRenaud Paquay2017-08-311-1/+1
| | | | Change-Id: I18452cbb32d24db73601ad10485dbe6bb278731c
* Merge "Add option '--no-cert-checks' for 'upload' sub command."David Pursehouse2017-08-301-1/+6
|\
| * Add option '--no-cert-checks' for 'upload' sub command.Łukasz Gardoń2017-08-231-1/+6
| | | | | | | | | | | | | | This option allow to bypass verification ssl certification while establishing connection with Gerrit to upload review. Change-Id: If2e15f5a273c18a700eb5093ca8a4d5a4cbf80cd
* | Merge changes from topic "windows-support"David Pursehouse2017-08-304-26/+15
|\ \ | | | | | | | | | | | | | | | | | | | | | * changes: Port os.rename calls to work on Windows Workaround shutil.rmtree limitation on Windows Add support for creating symbolic links on Windows Make "git command" and "forall" work on Windows
| * | Workaround shutil.rmtree limitation on WindowsRenaud Paquay2017-05-293-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | By default, shutil.rmtree raises an exception when deleting readonly files on Windows. Replace all shutil.rmtree with platform_utils.rmtree, which adds an error handler to make files read-write when they can't be deleted. Change-Id: I9cfea9a7b3703fb16a82cf69331540c2c179ed53
| * | Make "git command" and "forall" work on WindowsRenaud Paquay2017-05-291-20/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Python on Windows does not support non blocking file operations. To workaround this issue, we instead use Threads and a Queue to simulate non-blocking calls. This is happens only when running with the native Windows version of Python, meaning Linux and Cygwin are not affected by this change. Change-Id: I4ce23827b096c5138f67a85c721f58a12279bb6f
* | | When starting a branch, do not use a tag or change value for branch.mergeZac Livingston2017-08-251-5/+5
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | When starting a branch, branch.merge is set to project revision unless the revision is a SHA1. In that case, branch.merge is set to dest_branch if defined or manifest default revision otherwise. This special handling allows repo upload to work when the project revision is a SHA1. Extend the special handling to also happen when the project revision is a tag value or a change value so that repo upload will work in those case as well. Change-Id: Iff81ece40e770cd02535e80dcb023564d42dcf47
* | Revert "Migrate git-repo to create private changes rather than drafts"Jonathan Nieder2017-08-081-3/+4
| | | | | | | | | | | | | | | | This reverts commit d88f53e2b9634b9645f80b2d8e653beac24711fe. I merged it too hastily without paying enough attention to compatibility with released Gerrit versions. Change-Id: I4028d4737df1255f11e217da183a19a010597d5b
* | Migrate git-repo to create private changes rather than draftsChangcheng Xiao2017-08-071-4/+3
| | | | | | | | | | | | | | | | Considering that some users might expect changes created with '-d' option are not public. Private changes may be a better choice here than work-in-progress changes. Change-Id: I46a8fb9ae38beb41cf96d6abe82bea6db2439669
* | Add options for git-repo to support private and wip changesChangcheng Xiao2017-08-071-1/+12
| | | | | | | | | | | | | | This change adds options for git-repo tool to support private changes and work-in-progress changes. Change-Id: I343491f5949f06f1580d53f9cc0dee2dca09130f
* | Merge "download: try to choose . as default project if none"David Pursehouse2017-08-021-2/+3
|\ \
| * | download: try to choose . as default project if noneNicolas Cornu2017-07-121-2/+3
| | | | | | | | | | | | Change-Id: I28b5e3be5f3c9a4c077af87d6a3e0cc3b96a1b9d
* | | Merge "Always print percentage when syncing quietly"David Pursehouse2017-08-021-1/+2
|\ \ \
| * | | Always print percentage when syncing quietlyTim Schumacher2017-07-151-1/+2
| |/ / | | | | | | | | | Change-Id: I574396e63520781067ed1e991c41caf7640e5731
* / / Fix "list comprehension redefines 'x'" warnings from pyflakesDavid Pursehouse2017-07-103-6/+6
|/ / | | | | | | | | | | | | | | | | $ git ls-files | grep py$ | xargs pyflakes subcmds/stage.py:101: list comprehension redefines 'p' from line 63 subcmds/sync.py:784: list comprehension redefines 'p' from line 664 subcmds/upload.py:467: list comprehension redefines 'avail' from line 454 Change-Id: Ia65d1a72ed185ab3357e1a91ed4450c719e75a7c
* | init: add missing submodule argMartin Kelly2017-07-101-1/+1
| | | | | | | | | | | | | | | | | | The submodule argument to Sync_LocalHalf was missing in MetaBranchSwitch, causing submodules not to get synced when the -b/--manifest-branch argument to init is used. Change-Id: Ie86d271abac2020725770be36ead83be3326e64b Signed-off-by: Martin Kelly <mkelly@xevo.com>
* | Tell the user if it will upload a draftNicolas Cornu2017-07-101-1/+2
| | | | | | | | Change-Id: Ie004ec9d61603f3f618c47597947b82c59f2839c
* | Merge "Add a newline after "Fetching projects" progress output"David Pursehouse2017-06-281-1/+2
|\ \
| * | Add a newline after "Fetching projects" progress outputTim Schumacher2017-06-131-1/+2
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Output before change: Fetching project platform/packages/providers/UserDictionaryProvider Fetching projects: 66% (773/1171) Fetching project platform/external/regex-re2 Fetching project device/generic/mini-emulator-x86_64 Output after change: Fetching project platform/packages/providers/UserDictionaryProvider Fetching projects: 66% (773/1171) Fetching project platform/external/regex-re2 Fetching project device/generic/mini-emulator-x86_64 Change-Id: I4da84da58316c69294e4da2792f83885dc942701
* / sync: Continue job if some fetchs failed but force-broken is setNicolas Cornu2017-06-161-1/+1
|/ | | | | | | With --force-broken it continue to fetch other projects but nothing is added in directory because it abort some lines later. Change-Id: I32c4a4619b3028893dc4f98e8d4e5bc5c09adb27
* Merge "init: allow relative path on --reference argument"David Pursehouse2017-05-291-1/+1
|\
| * init: allow relative path on --reference argumentYOUNG HO CHA2017-05-281-1/+1
| | | | | | | | | | Change-Id: I41d6be6bc035fdddb5a27c072994439986d58d58 Signed-off-by: YOUNG HO CHA <ganadist@gmail.com>
* | sync: Add support to dump a JSON event log of all sync events.David Riley2017-05-291-7/+24
|/ | | | Change-Id: Id4852968ac1b2bf0093007cf2e5ca951ddab8b3b
* Merge "init: add --submodules to sync manifest submodules"David Pursehouse2017-05-272-4/+11
|\
| * init: add --submodules to sync manifest submodulesMartin Kelly2017-05-232-4/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | repo sync can sync submodules via the --fetch-submodules option. However, if the manifest repo has submodules, those will not be synced. Having submodules in the manifest repo -- while not commonly done -- can be useful for inheriting a manifest from another project using <include> and layering changes on top of it. In this way, you can avoid having to deal with merge conflicts between your own manifests and the other project's manifests (for example, if you're managing an Android fork). Add a --submodule option to init that automatically syncs the submodules in the manifest repo whenever the manifest repo changes. Change-Id: I45d34f04517774c1462d7f233f482d1d81a332a8 Signed-off-by: Martin Kelly <mkelly@xevo.com>
* | gitc_delete: Remove unused importsDavid Pursehouse2017-05-261-2/+0
| | | | | | | | Change-Id: I672189ba99e18dca3956e2396c921d1ef0ca2ddd
* | abandon: fix usage of undefined variableDavid Pursehouse2017-05-261-1/+1
|/ | | | | | | | | | As reported by pyflakes: subcmds/abandon.py:84: undefined name 'p' The name of the variable should be 'proj'. Change-Id: Ic09eb92e8db6b510e99efce010bd0bb094d7cbfe
* sync.py: report the remote URL on fatal git remote errorsMarc Herbert2017-04-041-1/+3
| | | | | | | | | | | | | | | | | repo can be configured to download from any number of remote git repos. However when one fails repo doesn't report which one. Example: Fatal: remote error: Daily ls-remote rate limit exceeded for IP xx.xx.xx.xx TEST=repo init -q -u https://chromium.googlesource.com/chromiumos/manifest.git # Apply patch in ./.repo/repo/ # Simulate a git remote error: sed -i -e 's#chromiumos/docs#chromiumos/XXdocs#' .repo/manifests/full.xml repo sync --quiet --force-sync docs # error message now shows the remote URL Optional test tip: reduce the time.sleep(random(...)) in ./.repo/repo/project.py Change-Id: I4509383b6a43a8e66064778e8ed612d8a735c8b6
* init: Add no-tags and current branch optionsNaseer Ahmed2016-12-011-1/+9
| | | | | | This avoids fetching tags and branches for huge manifests Change-Id: I19c9724d75364440b881b297d42b906f541f73ff
* Merge "implement optional '--all' in the abandon command"David Pursehouse2016-10-281-21/+49
|\
| * implement optional '--all' in the abandon commandKyunam.jo2016-10-171-21/+49
| | | | | | | | | | | | | | | | | | | | when you want to delete all local branches, you should be find all branches' name, and type them behind 'repo abandon' command. Usage: repo abandon --all [<project>...] Change-Id: I4d391f37fb9d89b8095488c585468eafc1a35f31
* | status: add -q/--quiet optionAndrew Wheeler2016-10-171-5/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The --quiet option reduces the output to just a list of projects with modified workspaces (and orphans if -o is specified) A common use case is when performing a full-workspace merge. The integrator will kick-off a merge via: repo forall -c git merge <some tag> And then produce a short list of conflicted projects via: repo status -q The integrator can then iteratively fix and clean up all conficted components. The merge is complete when: repo status -q returns no output. Change-Id: Ibbba8713eac35befd8287c95948874e23fd5c7e2
* | Merge "sync: Fix semaphore release bug that causes thread 'leaks'"David Pursehouse2016-10-171-10/+12
|\ \ | |/ |/|
| * sync: Fix semaphore release bug that causes thread 'leaks'Andrew Wheeler2016-10-111-10/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When repo syncs a manifest that utilizes multiple branches in the same project, then the sync will use an extra thread for each "duplicate". For example, if the manifest includes the project "foo" and "bar" twice, then "repo sync -jN" will fetch with N+2 threads. This is caused by _FetchHelper() releasing the thread semaphore object each time it's called, even though _FetchProjectList() may call this function multiple times within the scope of a single thread. Fix by moving the thread semaphore release to _FetchProjectList(), which is only called once per thread instance. Change-Id: I1da78b145e09524d40457db5ca5c37d315432bd8