summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Add a newline after "Fetching projects" progress outputTim Schumacher2017-06-132-4/+7
| | | | | | | | | | | | | | | | | 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
* Ensure repo waits for child process to terminateRenaud Paquay2017-05-291-1/+5
| | | | | | | | | | See http://stackoverflow.com/questions/7004687/os-exec-on-windows: execv on Windows does not behave as on Linux, i.e. a new process is spawned and the parent process terminates right away, which makes the shell prompt come back too soon. Change-Id: I1f8d23208765988629f081e9b949c67cf71c08ae
* 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-296-13/+236
| | | | | | | | Change-Id: Id4852968ac1b2bf0093007cf2e5ca951ddab8b3b
* | Fix misplaced file separator string.replace callRenaud Paquay2017-05-281-1/+1
| | | | | | | | | | | | | | Project names are stored as path using the '/' file separator, and stored in a dictionary as keys. Change-Id: Ide40dfe840958ac0d46caae5f77f1a49d71c9d90
* | Use OS file separatorRenaud Paquay2017-05-281-1/+1
| | | | | | | | Change-Id: I46b15bc1c1b4f2300a6fd98fe16c755da4910e7a
* | Merge "pre-auto-gc: Add support for Windows"David Pursehouse2017-05-281-3/+13
|\ \ | |/ |/|
| * pre-auto-gc: Add support for WindowsSebastian Schuberth2017-05-031-3/+13
| | | | | | | | | | | | | | Previously, this would always have exited with 1 on Windows, causing "git gc --auto" to abort. Fix this by adding support for Windows. Change-Id: Ie519b366a11b6b18b2d465e892e738de3f4bbc99
* | Set result if sys.exit() is called by subcommand.David Riley2017-05-271-0/+4
| | | | | | | | | | | | Allows the finally branch to make sure of the return code. Change-Id: I7a796da5b60269cbd71aad953f1b9bb762b8eef8
* | Adding include element into the top-level elementJiri tyr2017-05-271-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | The documentation of the XML file format contains DTD which contains definition of all allowed elements and attributes. The "include" element is defined but it's not referenced from the top-level "manifest" element. This patch is adding the "include" element into the list of elements of the top-level "manifest" element. Change-Id: I33beb8ef2846bbf42ffd42e6ae6888828566d604
* | Merge "Add option REPO_IGNORE_SSH_INFO to ignore ssh_info"David Pursehouse2017-05-271-0/+3
|\ \
| * | Add option REPO_IGNORE_SSH_INFO to ignore ssh_infoTimo Lotterbach2017-05-261-0/+3
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is required for setups, where Gerrit access using ssh is only available for some networks. For network without ssh access, repo will get ssh_info from Gerrit and use ssh for communications - which will fail. To support this setup we need to have an option to ignore the ssh_info provided by Gerrit and use http(s). Using git insteadOf as alternative results in the inability to add reviewers using "repo upload --re=...", since the syntax of adding reviewers differs for ssh and https. repo is assuming an ssh connection and uses "git push --receive-pack=...", which will fail since git silently uses https for push operation. repo must be aware that https is used so it uses "git push remote ...:refs/for/...%r=..." for upload. Change-Id: Idd83baef0fb26ffcc9ac65e204b68d323ce177a1
* | Merge "init: add --submodules to sync manifest submodules"David Pursehouse2017-05-275-12/+59
|\ \
| * | init: add --submodules to sync manifest submodulesMartin Kelly2017-05-235-12/+59
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | Update .mailmapDavid Pursehouse2017-05-261-0/+1
| | | | | | | | Change-Id: Icabc7fb2161b661c2df9290a1ca6f75b9b1b8e1b
* | project.py: fix performance issue with --reference when the mirrored ↵heping2017-04-121-4/+6
|/ | | | | | repository has many refs Change-Id: Id0183903597f872eee80ca32a8050125b187a3d4
* 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
* manifest-format: fix EMPTY keyword usageMike Frysinger2016-12-281-10/+10
| | | | | | | | The keyword EMPTY doesn't use parens. BUG=git-repo:140 Change-Id: I7cd28a09c401520a72e5c244a77d9d70385f1b61
* Merge "init: Add no-tags and current branch options"Jonathan Nieder2016-12-092-2/+16
|\
| * init: Add no-tags and current branch optionsNaseer Ahmed2016-12-012-2/+16
| | | | | | | | | | | | This avoids fetching tags and branches for huge manifests Change-Id: I19c9724d75364440b881b297d42b906f541f73ff
* | Merge "Fix removing broken symlink in reference dir"David Pursehouse2016-12-061-7/+8
|\ \ | |/ |/|
| * Fix removing broken symlink in reference dirCheuk Leung2016-06-291-7/+8
| | | | | | | | | | | | | | Re-ordered to first create the symlink before checking the source file and remove the destination if the source does not exists. Change-Id: Iae923ba2ef0ba5a8dc1b8e42d8cc3f3708f773af
* | Merge "Add a check and more output to protect against invalid REPO_URLs"David Pursehouse2016-10-291-1/+8
|\ \
| * | Add a check and more output to protect against invalid REPO_URLsSebastian Schuberth2016-10-281-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If you don't know that the url to git-repo itself can be overridden via REPO_URL, it's hard to debug cases where REPO_URL is accidentally set to another repository, e.g. inside a Jenkins CI job. What makes is even harder is that the ".repo/repo" directory gets silently removed in such cases as verifications fails, which makes it impossible to look at the cloned files to understand the problem. To better protect against such an issue, warn if the cloned git-repo repository does not contain a top-level "repo" file, and state that the ".repo/repo" directory will be removed in case of a clone failure. Change-Id: I697b4999205a5967910c0237772ccaada01e74d4
* | | Merge "Fix checkout error when depth passed to repo init and revision is a sha1"Dan Willemsen2016-10-281-21/+21
|\ \ \
| * | | Fix checkout error when depth passed to repo init and revision is a sha1Aymen Bouaziz2016-10-281-21/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, if direct fetch of a sha1 is not supported by git server and depth option is used, we fallback on syncing the upstream branch by ignoring depth option. This fallback doesn't work in next 2 cases: (1) upstream attribute is not specified in manifest (2) depth option is passed to repo init command (not with clone-depth attribute in manifest) This commit do the following: - fixes (1) by updating condition used to apply fallback first we retry with depth set to None, then by syncing all branches - fixes (2) by passing depth as argument of _RemoteFetch() method thus, its value is not set again to depth value passed to repo init command when applying fallback Change-Id: Ifd6fffafc49ba229df624b0d7b64c83d47619d17
* | | | 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
* | | | | Merge "_CheckDirReference: log actual error before suggesting --force-sync"Dan Willemsen2016-10-281-0/+1
|\ \ \ \ \
| * | | | | _CheckDirReference: log actual error before suggesting --force-syncMarc Herbert2016-10-271-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A recent backward incompatible change created confusion and loss of productivity and highlighted the very limited amount of information provided when repo sync fails; merely recommending to --force-sync and blow-up git repos without any hint as to why. The addition of this basic _error(...) call would have provided a clue and will in the future. BUG=Issue 232 TEST=simulate a breakage similar to the ones reported at https://groups.google.com/a/chromium.org/forum/#!topic/chromium-os-dev/2-0oCy_CX5s cd .repo/projects/src/third_party/libapps.git/ file info; rm info; ln -s wronglink info cd - repo sync src/third_party/libapps/ # error message now shows the failure Change-Id: Idd2f177a096f1ad686caa8c67cb361d594ccaa57
* | | | | | Add sso to list of known schemes for relative URLsJoe Kilner2016-10-271-2/+12
|/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | repo already special-cases sso:// URLs to behave similarly to https:// and rpc:// elsewhere in repo, but it forgot to do so here. Noticed when trying to use relative URLs in a manifest obtained using an sso:// URL. Change-Id: Ia11469a09bbd6e444dbc4f22c82f9bbe9f5fd083
* | | | | status: add -q/--quiet optionAndrew Wheeler2016-10-172-6/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | Revert "Repo: fall back to http, if ssh connection fails for http repos"v1.12.36Dan Willemsen2016-09-221-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 488bf092d5992bd1b8f8681c444f2cc283d05bcb. Issue 230 Change-Id: I3a5725301f576e1a2ac499cb6daa631895115640
* | | Merge "On project cleanup, don't remove nested projects"v1.12.35David Pursehouse2016-09-211-14/+57
|\ \ \
| * | | 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
* | | | implement optional 'pushurl' in the manifest fileSteve Rae2016-09-204-1/+25
|/ / / | | | | | | | | | | | | | | | | | | | | | Allow the 'remote' element in the manifest file to define an optional 'pushurl' attribute which is passed into the .git/config file. Change-Id: If342d299d371374aedc4440645798888869c9714 Signed-off-by: Steve Rae <steve.rae@raedomain.com>
* | | Merge "Repo: improve error detection for new ssh connections"David Pursehouse2016-09-201-1/+5
|\ \ \
| * | | Repo: improve error detection for new ssh connectionsTimo Lotterbach2016-08-301-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | this check can only detect errors that happen within 1 sec after launching ssh. But this is typically enough to catch configuration issues like 'connection refused' or 'authentication failed'. Change-Id: I00b6f62d4c2889b1faa6c820e49a198554c92795
* | | | Merge "Repo: fall back to http, if ssh connection fails for http repos"David Pursehouse2016-09-201-1/+4
|\ \ \ \
| * | | | Repo: fall back to http, if ssh connection fails for http reposTimo Lotterbach2016-08-301-1/+4
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | if a gerrit server has ssh and https access enabled, but user access (for some users) is limited to https, 'repo upload' command will fail for them. Gerrit returns a ssh configuration (gerrit/ssh_info), that does not work for users limited to https. With this patch repo will test, if the returned ssh configuration from gerrit/ssh_info is working. if not, it will fall back to https for upload. Change-Id: If98f472e994f350bf71f35610cd649b163f1ab33
* | | | Merge "Replace pylint with pyflakes/flake8"David Pursehouse2016-09-203-302/+27
|\ \ \ \
| * | | | Replace pylint with pyflakes/flake8David Pursehouse2016-09-143-302/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | pylint reports a lot of warnings, but many of them are false positive, and it's difficult to configure it. It also seems that for some reason the included config file is not working well with the latest version. Update the documentation to recommend using pyflakes and flake8 instead of pylint. Remove the pylint config and add a basic flake8 config with minimum settings: - Maximum line length 80 columns - Ignore warnings about indentation (repo uses 2 rather than expected 4) - Ignore warnings about import placement In this commit no code cleanup is done, and it's expected that most of the files will throw up quite a few warnings, at least for flake8. These can be cleaned up in follow-up commits. The existing pylint suppression comments are left as-is. These will be helpful when cleaning up pyflakes warnings later. Change-Id: I2f7cb4340266ed07cc973ca6483b8f09d66a765b
* | | | | Merge "When syncing a project with a shared object store, disable automatic ↵David Pursehouse2016-09-141-4/+7
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | pruning."