summaryrefslogtreecommitdiffstats
path: root/repo
Commit message (Collapse)AuthorAgeFilesLines
* Update gpg key for cco3@android.comv1.12.3.1v1.12.3Conley Owens2013-07-011-28/+28
| | | | | | | cco3@android.com has a new gpg key, so this needs to be updated in the repo scripts so that he can sign updates. Change-Id: I9f058263b35bd027502d6e3b814d7aeb801a1e6e
* Move Python version checking to a separate moduleDavid Pursehouse2013-05-231-5/+3
| | | | | | | | | | | | | | | | | Add a new module with methods for checking the Python version. Instead of handling Python3 imports with try...except blocks, first check the python version and then import the relevant modules. This makes the code a bit cleaner and will result in less diff when/if we remove support for Python < 3 later. Use the same mechanism to handle `input` vs. `raw_input` and add suppression of pylint warnings caused by redefinition of the built-in method `input`. Change-Id: Ia403e525b88d77640a741ac50382146e7d635924 Also-by: Chirayu Desai <cdesai@cyanogenmod.org> Signed-off-by: Chirayu Desai <cdesai@cyanogenmod.org>
* repo: add rudimentary version checkingChirayu Desai2013-04-171-0/+14
| | | | | Change-Id: I957775c7ce0821971cc2320597e1a7a31950bcf3 Signed-off-by: Chirayu Desai <cdesai@cyanogenmod.org>
* Special handling for manifest group "default"David Holmer2013-04-031-1/+2
| | | | | | | | | | | | | | | | | | | | | Change Details: * Make "default" a special manifest group that matches any project that does not have the special project group "notdefault" * Use "default" instead of "all,-notdefault" when user does not specify manifest group * Expand -g option help to include example usage of manifest groups Change Benefits: * Allow a more intuitive and expressive manifest groups specification: * "default" instead of "all,-notdefault" * "default,foo" instead of "all,-notdefault,foo" * "default,-foo" instead of "all,-notdefault,-foo" * "foo,-default" which has no equivalent * Default manifest groups behavior can be restored by the command 'repo init -g default'. This is significantly more intuitive than the current equivalent command 'repo init -g all,-notdefault'. Change-Id: I6d0673791d64a650110a917c248bcebb23b279d3
* Don't exit with error on HTTP 403 when downloading clone bundleDavid Pursehouse2013-01-311-1/+1
| | | | | | | | If the server returns HTTP 403 (forbidden) when attempting to download clone bundle files, ignore it and continue, rather than exiting with a fatal error. Change-Id: Icf78cba0332b51b0e7b622f7c7924369b551b6f6
* Sync help text in repo from init.pyDavid Pursehouse2012-11-151-2/+3
| | | | | | | | Change Ia6032865f9296b29524c2c25b72bd8e175b30489 improved the help text for the init command, but the same improvement was not made in repo. Change-Id: Idc34e479b5237137b90e8b040824776e4f7883b0
* Tidy up code formatting a bit moreDavid Pursehouse2012-11-141-3/+3
| | | | | | | | | | | | Enable the following Pylint warnings: C0322: Operator not preceded by a space C0323: Operator not followed by a space C0324: Comma not followed by a space And make the necessary fixes. Change-Id: I74d74283ad5138cbaf28d492b18614eb355ff9fe
* Fix: "Statement seems to have no effect"David Pursehouse2012-11-141-1/+1
| | | | | | | | | | | | Pylint raises an error on the call: print Change it to: print() Change-Id: I507e1b3dd928fa6c32ea7e86260fb3d7b1428e6f
* Change print statements to work in python3Sarah Owens2012-11-131-67/+59
| | | | | | This is part of a series of changes to introduce Python3 support. Change-Id: I373be5de7141aa127d7debdbce1df39148dbec32
* More code style cleanupDavid Pursehouse2012-11-141-5/+5
| | | | | | | | | Clean up a few more unnecessary usages of lambda in `repo` that were missed in the previous sweep that only considered files ending in .py. Remove a duplicate import. Change-Id: I03cf467a5630cbe4eee6649520c52e94a7db76be
* Remove magic hackDavid Pursehouse2012-11-141-9/+1
| | | | | | | | | | | | | It should be assumed that on modern development environments, python is accessible to /usr/bin/env Change the shebang as necessary and remove the magic hack. This also means losing the -E option on the call to python, so that PYTHONPATH and PYTHONHOME will be respected and local configuration problems in those vars would be noticed Change-Id: I6f0708ca7693f05a4c3621c338f03619563ba630
* Change usages of xrange() to range()Sarah Owens2012-11-011-1/+1
| | | | | | | | | | | | In Python3, range() creates a generator rather than a list. None of the parameters in the ranges changed looked large enough to create an impact in memory in Python2. Note: the only use of range() was for iteration and did not need to be changed. This is part of a series of changes to introduce Python3 support. Change-Id: I50b665f9296ea160a5076c71f36a65f76e47029f
* Merge "Use python3 urllib when urllib2 not available"Conley Owens2012-11-011-11/+22
|\
| * Use python3 urllib when urllib2 not availableSarah Owens2012-10-311-11/+22
| | | | | | | | | | | | This is part of a series of changes to introduce Python3 support. Change-Id: I605b145791053c1f2d7bf3c907c5a68649b21d12
* | Merge "Use 'stat' package instead of literals for mkdir()"Conley Owens2012-11-011-1/+2
|\ \ | |/ |/|
| * Use 'stat' package instead of literals for mkdir()Sarah Owens2012-10-311-1/+2
| | | | | | | | | | | | This is part of a series of changes to introduce Python3 support. Change-Id: Ic988ad181d32357d82dfa554e70d8525118334c0
* | Update minimum git version to 1.7.2Conley Owens2012-10-261-2/+2
| | | | | | | | | | | | We now use the -c flag which was introduced in git 1.7.2. Change-Id: I9195c0f6ac9fa63e783a03628049fe2c67d258ff
* | Add a PGP key for cco3@android.comv1.11.0Conley Owens2012-10-261-1/+33
| | | | | | | | | | | | This change adds a PGP key to allow cco3@android.com to sign releases. Change-Id: I18a70c8b7d8f272dd1aad9d6b2e4a237ef35af33
* | Update PGP keys during _PostRepoUpgrade in `sync`Conley Owens2012-10-251-7/+7
|/ | | | | | | | Previously, if a key was added, a client wouldn't add the key during the sync step. This would cause issues if a new key were added and a subsequent release were signed by that key. Change-Id: I4fac317573cd9d0e8da62aa42e00faf08bfeb26c
* Use modern Python exception syntaxSarah Owens2012-10-231-10/+10
| | | | | | | | | | | "except Exception as e" instead of "except Exception, e" This is part of a transition to supporting Python 3. Python >= 2.6 support "as" syntax. Note: this removes Python 2.5 support. Change-Id: I309599f3981bba2b46111c43102bee38ff132803
* Rename "dir" variablesMickaël Salaün2012-10-101-15/+15
| | | | | | | The variable name "dir" conflicts with the name of a Python built-in function: http://docs.python.org/library/functions.html#dir Change-Id: I850f3ec8df7563dc85e21f2876fe5e6550ca2d8f
* Clean up importsDavid Pursehouse2012-09-181-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | manifest_xml: import `HEAD` and `R_HEADS` from correct module version: import `HEAD` from correct module `HEAD` and `R_HEADS` should be imported from the git_refs module, where they are originally defined, rather than from the project module. repo: remove unused import of readline cherry_pick: import standard modules on separate lines smartsync: import subcmd modules explicitly from subcmd Use: `import re import sys` and `from subcmds.sync import Sync` Instead of: `import sys, re` and `from sync import Sync` Change-Id: Ie10dd6832710939634c4f5c86b9ba5a9cd6fc92e
* Use gerrit.googlesource.com/git-repo as the default URLShawn O. Pearce2012-06-051-1/+1
| | | | | | | This is basically the same repository, but may be slightly more up-to-date than the one on code.google.com/p/git-repo. Change-Id: I5c99539f53231958eefb6993f00997c9adf0a3c9
* Detect git is not installedShawn O. Pearce2012-06-051-2/+12
| | | | | | | Fix detection for Git not being in $PATH during the initial run of `repo init` in a new directory. Change-Id: I2b1fcce1fb8afc47271f5c3bd2a28369009b2fb7
* Add a --platform flagConley Owens2012-04-231-0/+5
| | | | | | | | | | Projects may optionally specify their platform (eg, groups="platform-linux" in the manifest). By default, repo will automatically detect the platform. However, users may specify --platform=[auto|all|linux|darwin]. Change-Id: Ie678851fb2fec5b0938aede01f16c53138a16537
* Refine groups functionalityConley Owens2012-04-231-2/+2
| | | | | | | | | | | | | | | Every project is in group "default". "-default" does not remove it from this project. All group names specified in the manifest are positive names as opposed to a mix of negative and positive. Specified groups are resolved in order. If init is supplied with --groups="group1,-group2", the following describes the project selection when syncing: * all projects in "group1" will be added, and * all projects in "group2" will be removed. Change-Id: I1df3dcdb64bbd4cd80d675f9b2d3becbf721f661
* Add manifest groupsv1.8.2Colin Cross2012-04-131-1/+5
| | | | | | | | | | | | | | | | | Allows specifying a list of groups with a -g argument to repo init. The groups act on a group= attribute specified on projects in the manifest. All projects are implicitly labelled with "default" unless they are explicitly labelled "-default". Prefixing a group with "-" removes matching projects from the list of projects to sync. If any non-inverted manifest groups are specified, the default label is ignored. Change-Id: I3a0dd7a93a8a1756205de1d03eee8c00906af0e5 Reviewed-on: https://gerrit-review.googlesource.com/34570 Reviewed-by: Shawn Pearce <sop@google.com> Tested-by: Shawn Pearce <sop@google.com>
* Add support for Apache Digest authentication for repo init.Xiaodong Xu2012-03-141-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | repo tool supports only Basic authentication for now. For those who want to use this tool to manage their own projects, in case the administrator has configured the Apache server with Digest authentication method, users will fail to be authenticated when they run the command 'repo init'. Add the digest authentication password manager to the handler list will fix this issue. Since Git HTTP protocol will require the user be authenticated for fetch operation first before pushing commits to the remote, it is unlikely for the administrator to implement anonymous read (aka pull) access and write access (aka push) for authenticated user. Both read and write have to be authenticated. Be aware that the user may have to add an extra line in his ~/.netrc file: ------------------- account example.com ------------------- where 'example.com' is the realm for Apache Digest authentication. Change-Id: I76eb27b205554426d9ce1965deaaf727b87916cd Signed-off-by: Xiaodong Xu <stid.smth@gmail.com>
* Revert "Default repo manifest settings in git config"v1.7.8.1Shawn O. Pearce2011-11-301-2/+2
| | | | | | | This reverts commit ee1c2f5717fcc137ab887a4aae8a08d50a539b9a. This breaks a lot of buildbot systems. Rolling it back for now until we can understand what the breakage was and how to fix it.
* Don't prompt the user for name/email unless necessaryVictor Boivie2011-11-291-0/+5
| | | | | | | | | | | | If the user has already configured a workspace, use these values when re-running 'repo init'. Otherwise, if the user has global name and e-mail set, use these. It's always possible to override this and be prompted by specifying --config-name when running 'repo init'. Change-Id: If45f0e4b14884071439fb02709dc5cb53f070f60
* Default repo manifest settings in git configVictor Boivie2011-11-291-2/+2
| | | | | | | | | | | | | | | | | | | | | | A default manifest URL can be specified using: git config --global repo-manifest.<id>.url <url> A default manifest server can be specified using: git config --global repo-manifest.<id>.server <url> A default git mirror reference can be specified using: git config --global repo-manifest.<id>.reference <path> This will allow the user to use 'repo init -u <id>' as a shorter alternative to specifying the full URL. Also, manifest server will not have to be specified in the manifest XML and the reference will not have to be specified on the command line. If they are, they will override these default values however. Change-Id: Ifdbc160bd5909ec7df9efb0c5d7136f1d9351754 Signed-off-by: Victor Boivie <victor.boivie@sonyericsson.com>
* sync: Support downloading bundle to initialize repositoryv1.7.7Shawn O. Pearce2011-09-281-10/+93
| | | | | | | | | | | | | | | | | | | | | | | | | | An HTTP (or HTTPS) based remote server may now offer a 'clone.bundle' file in each repository's Git directory. Over an http:// or https:// remote repo will first ask for '$URL/clone.bundle', and if present download this to bootstrap the local client, rather than relying on the native Git transport to initialize the new repository. Bundles may be hosted elsewhere. The client automatically follows a HTTP 302 redirect to acquire the bundle file. This allows servers to direct clients to cached copies residing on content delivery networks, where the bundle may be closer to the end-user. Bundle downloads are resumeable from where they last left off, allowing clients to initialize large repositories even when the connection gets interrupted. If a bundle does not exist for a repository (a HTTP 404 response code is returned for '$URL/clone.bundle'), the native Git transport is used instead. If the client is performing a shallow sync, the bundle transport is not used, as there is no way to embed shallow data into the bundle. Change-Id: I05dad17792fd6fd20635a0f71589566e557cc743 Signed-off-by: Shawn O. Pearce <sop@google.com>
* Change default REPO_URL to code.google.comShawn O. Pearce2011-09-051-2/+2
| | | | Change-Id: If7700daf96fb8f3ee449e5774017272ef31b4b44
* Add --depth option to main repo wrapper.Doug Anderson2011-06-141-2/+5
| | | | | | | See related repo change: https://review.source.android.com/#change,22722 Change-Id: I9bdd86971c94604477b91cdf47d6fac2c0bc186e
* Bump repo version to 1,10v1.7.3Shawn O. Pearce2011-01-101-1/+1
| | | | Change-Id: Ifdc041e7152af31de413b9269f20000acd945b3b
* Make path references OS independentAnthony Newnam2011-01-091-1/+5
| | | | | | | | | Change-Id: I5573995adfd52fd54bddc62d1d1ea78fb1328130 (cherry picked from commit b0f9a02394779c1c9422a9649412c9ac5fb0f12f) Conflicts: command.py
* Encode the environment variables passed to gitShawn O. Pearce2011-01-091-4/+4
| | | | | | | | Windows allows the environment to have unicode values. This will cause Python to fail to execute the command. Change-Id: I37d922c3d7ced0d5b4883f0220346ac42defc5e9 Signed-off-by: Shawn O. Pearce <sop@google.com>
* Exit with statuscode 0 for repo help initTrond Norbye2011-01-091-0/+1
| | | | | | | | | | | The complete help text is printed, so the program executed successfully. Some tools (like OpenGrok) detects the availibility of a program by running it with a known set of options and check the return code. It is an easy and portable way of checking for the existence of a program instead of searching the path (and handle extensions) ourselves. Change-Id: Ic13428c77be4a36d599ccb8c86d893308818eae3
* sync: Enable use of git clone --referenceShawn O. Pearce2010-10-291-1/+4
| | | | | | | | | Use git clone to initialize a new repository, and when possible allow callers to use --reference to reuse an existing checkout as the initial object storage area for the new checkout. Change-Id: Ie27f760247f311ce484c6d3e85a90d94da2febfc Signed-off-by: Shawn O. Pearce <sop@google.com>
* Refactor Manifest to be XmlManifestShawn O. Pearce2009-05-291-1/+1
| | | | | | | | We'll soon be supporting two different manifest formats, but we can't immediately remove support for the current XML one that is in wide spread use within Android. Signed-off-by: Shawn O. Pearce <sop@google.com>
* Clarify options that control the repo executable versionShawn O. Pearce2009-04-181-1/+1
| | | | Signed-off-by: Shawn O. Pearce <sop@google.com>
* Correct the REPO_URL in the wrapper script to android.git.kernel.orgv1.4.3Shawn O. Pearce2008-12-181-2/+2
| | | | Signed-off-by: Shawn O. Pearce <sop@google.com>
* Add 'repo init --mirror' to download a complete forrestv1.1Shawn O. Pearce2008-11-051-1/+4
| | | | | | | | | | | | | | | The mirror option downloads a complete forrest (as described by the manifest) and creates a replica of the remote repositories rather than a client working directory. This permits other clients to sync off the mirror site. A mirror can be positioned in a "DMZ", where the mirror executes "repo sync" to obtain changes from the external upstream and clients inside the protected zone operate off the mirror only, and therefore do not require direct git:// access to the external upstream repositories. Signed-off-by: Shawn O. Pearce <sop@google.com>
* wrapper 1.6Shawn O. Pearce2008-10-281-1/+1
| | | | Signed-off-by: Shawn O. Pearce <sop@google.com>
* Added missing wait after git-version call in wrapperShawn O. Pearce2008-10-281-0/+1
| | | | Signed-off-by: Shawn O. Pearce <sop@google.com>
* Remove the Python 2.4 dependency and use just 'python'v1.0.1Shawn O. Pearce2008-10-211-2/+2
| | | | | | | | | Many Linux distributions are including python2.5 by default, as it is the latest stable release of the language. Using python2.4 (and asking users to specifically install it) is just cruel and unusual punishment. Signed-off-by: Shawn O. Pearce <sop@google.com>
* Initial Contributionv1.0The Android Open Source Project2008-10-211-0/+587