summaryrefslogtreecommitdiffstats
path: root/subcmds
Commit message (Collapse)AuthorAgeFilesLines
* 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
* | Removed duplication code in abandon.pyKyunam.jo2016-10-121-1/+0
|/ | | | | | | code about getting argument is duplicated. so this line is removed Change-Id: Id321b999c7dacdb403cd986cbf35f8db62efc157
* Support broken symlinks when cleaning obsolete pathsv1.12.37Dan Willemsen2016-09-271-1/+7
| | | | | | | | | | | When there's a symlink to a directory, os.walk still lists the symlink in dirs, even if it isn't configured to follow symlinks. This will fail the listdirs check if the symlink is broken (either before or during the cleanup). So instead, check for directory symlinks and remove them using os.remove. Bug: Issue 231 Change-Id: I0ec45a26be566613a4a39bf694a3d9c6328481c2
* On project cleanup, don't remove nested projectsDan Willemsen2016-09-201-14/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | When there are nested projects in a manifest, like on AOSP right now: <project path="build" name="platform/build" /> <project path="build/blueprint" name="platform/build/blueprint" /> <project path="build/kati" name="platform/build/kati" /> <project path="build/soong" name="platform/build/soong" /> And the top "build" project is removed (or renamed to remove the nesting), repo just wipes away everything under build/ and re-creates the projects that are still there. But it only checks to see if the build/ project is dirty, so if there are dirty files in a nested project, they'll just be blown away, and a fresh worktree checked out. Instead, behave similarly to how `git clean -dxf` behaves and preserve any subdirectories that have git repositories in them. This isn't as strict as git -- it does not check to see if the '.git' entry is a readable gitdir, just whether an entry named '.git' exists. If it encounters any errors removing files, we'll print them all out to stderr and tell the user that we were unable to clean up the obsolete project, that they should clean it up manually, then sync again. Change-Id: I2f6a7dd205a8e0b7590ca5369e9b0ba21d5a6f77
* Merge "When syncing a project with a shared object store, disable automatic ↵David Pursehouse2016-09-141-4/+7
|\ | | | | | | pruning."
| * When syncing a project with a shared object store, disable automatic pruning.Gabe Black2016-09-141-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The shared object stores confuse git and make it throw away objects which are still in use. We'll avoid that problem by disabling automatic pruning on those projects, but there's nothing preventing a user from changing the config back or pruning a repository manually. BUG=chromium:375945 TEST=Ran repo sync on fresh ChromeOS checkout, starting with a branch of repo with this change. Verified that the kernel projects and no others were identified as having shared object stores, and that repo successfully disabled automatic pruning in their configs. Re-enabled pruning and ran repo sync just on one of the kernel directories. Verified that pruning was re-disabled as a result. Change-Id: I728ed5b06f0087aeb5a23ba8f5410a7cd10af5b0
* | Merge "upload: short circuit when nothing is pending"David Pursehouse2016-09-141-4/+6
|\ \
| * | upload: short circuit when nothing is pendingMike Frysinger2016-09-141-4/+6
| |/ | | | | | | | | | | | | When nothing is pending, most of this code is already short-circuited. Hoist the single check up to make this more obvious/slightly faster. Change-Id: Iec3a7e08eacd23a7c5f964900d5776bf5252c804
* / Consider local project to be default for 'repo start'Vadim Bendebury2016-09-141-2/+1
|/ | | | | | | | | | | | | | | | | | The requirement to explicitly specify the local project when starting a new repo branch is somewhat counter intuitive. This patch uses the current directory's git tree as the default project. Tested by running 'repo start <name>' observed that the result is the same as if running 'repo start <name> .' Change-Id: If106caa801b4cd5ba70dbe8354a227d59f100aa3
* Merge "init: Add --no-clone-bundle option"David Pursehouse2016-08-171-1/+10
|\
| * init: Add --no-clone-bundle optionHu xiuyun2016-08-151-1/+10
| | | | | | | | | | Bug: Issue 218 Change-Id: I42ba1f5fb9168875da0df6bdf4fe44c8d6498d54
* | Merge "init: Respect --quiet option when synching manifest repository"David Pursehouse2016-08-171-1/+1
|\|
| * init: Respect --quiet option when synching manifest repositoryDavid Pursehouse2016-08-151-1/+1
| | | | | | | | Change-Id: Ib58b7dd971670e0888e6428333050700e776b0de
* | RepoHook: allow users to approve hooks via manifestsMike Frysinger2016-08-161-1/+3
|/ | | | | | | | | | | | | | | | | | The constant prompting when registered hooks change can be tedious and has a large multiplication factor when the project is large (e.g. the AOSP). It gets worse as people want to write more checks, hooks, docs, and tests (or fix bugs), but every CL that goes in will trigger a new prompt to approve. Let's tweak our trust model when it comes to hooks. Since people start off by calling `repo init` with a URL to a manifest, and that manifest defines all the hooks, anchor trust in that. This requires that we get the manifest over a trusted link (e.g. https or ssh) so that it can't be MITM-ed. If the user chooses to use an untrusted link (e.g. git or http), then we'll fallback to the existing hash based approval. Bug: Issue 226 Change-Id: I77be9e4397383f264fcdaefb582e345ea4069a13
* diffmanifests: support custom git pretty format stringsSebastian Schuberth2016-04-211-6/+15
| | | | Change-Id: I29f4f1351c421f393328514d145df1a96aed9ee2
* sync: Update help text for --smart-sync to be more specificDavid Pursehouse2016-04-131-1/+1
| | | | | | | The --smart-sync option should return the manifest for *the latest* known good build. Change-Id: I2f3216b5b9e1af2ea5f9c3bf1c025813a3b77581
* Add --inverse-regex option to forall subcommandTakeshi Kanemoto2016-04-051-3/+8
| | | | | | | | | | Make it possible to exclude projects using regex/wildcard. The syntax is similar to that of the -r option, e.g.: repo forall -i ^platform/ ^device/ -c 'echo $REPO_PROJECT' Change-Id: Id250de5665152228c044c79337d3ac15b5696484