summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* 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."
| * | | 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 "repo: add comment for updating maintainer keys"David Pursehouse2016-09-141-0/+3
|\ \ \ \ | |_|/ / |/| | |
| * | | repo: add comment for updating maintainer keysMike Frysinger2016-09-141-0/+3
| | | | | | | | | | | | | | | | Change-Id: Ic1e7557f9597234033561ab9fb3104b87e30015e
* | | | Merge "Fix submodule checkout error when using sync-s option"David Pursehouse2016-09-141-1/+1
|\ \ \ \ | |/ / / |/| | |
| * | | Fix submodule checkout error when using sync-s optionAymen Bouaziz2016-06-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When sync-s="true" option is used, the checkout of a submodule will try to use the revision attribute of the parent project. If this revision is a named reference, the checkout will fail if there is no reference with this name in the submodule. The proposed solution is to use the git commit id as revisionExpr for submodules. Change-Id: Ie8390a11957fd6a9c61289c6861d13cb3fa11678
* | | | 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
* | / Update mailmapDavid Pursehouse2016-09-021-1/+4
| |/ |/| | | | | | | | | Order the entries alphabetically and add a couple more. Change-Id: I8d98e8a5a1dd6868b566a42428030d2040b8af7a
* | gitc: Lower concurrent ls-projects requestsv1.12.34Dan Willemsen2016-08-231-1/+1
| | | | | | | | | | | | Too many requests at the same time is causing 502 errors. Change-Id: Ic8fbb2fbb7fb6014733fa5be018d2dc02472f704
* | RepoHook: do not list options twice during hash based approvalJonathan Nieder2016-08-181-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | Instead of Do you want to allow this script to run (yes/yes-never-ask-again/NO)? (yes/always/NO)? ask Do you want to allow this script to run (yes/always/NO)? Change-Id: I5f5a2d0e88086a8d85e54fb8623a62d74a20956a Signed-off-by: Jonathan Nieder <jrn@google.com>
* | Increment the wrapper versionDavid Pursehouse2016-08-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | There have been a number of changes in the repo wrapper since the last increment that was done in fee390ee: - 9711a98 init: Add --no-clone-bundle option - 631d0ec Support non-ASCII GNUPGHOME environment variable - 4088eb4 repo: Cleaned up pylint/pep8 violations - 5553628 repo: Add check of REPO_URL env variable - 745b4ad Fix gitc-init behavior - d3ddcdb Ignore clone.bundle on HTTP 501, i.e. Not Implemented Change-Id: I3f763ef0ec2df2d726dff429021b48ad474148f1
* | Merge "init: Add --no-clone-bundle option"David Pursehouse2016-08-172-4/+16
|\ \
| * | init: Add --no-clone-bundle optionHu xiuyun2016-08-152-4/+16
| | | | | | | | | | | | | | | 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
* | | Merge "project: Set config option to skip lfs smudge filter"David Pursehouse2016-08-171-0/+1
|\ \ \
| * | | project: Set config option to skip lfs smudge filterDavid Pursehouse2016-08-161-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | During sync, repo runs `git read-tree --reset -u -v HEAD` which causes git-lfs's smudge filter to run. However this fails because git-lfs does not work with bare repositories. Add lfs.filter configuration to the project config as suggested in the comments on the upstream git-lfs client issue [1]. This prevents the smudge filter from running, and the sync completes successfully. For any projects that have LFS objects, `git lfs pull` must be executed. [1] https://github.com/github/git-lfs/issues/1422 Bug: Issue 224 Change-Id: I091ff37998131e2e6bbc59aa37ee352fe12d7fcd
* | | | Merge "RepoHook: allow users to approve hooks via manifests"Jonathan Nieder2016-08-162-23/+84
|\ \ \ \ | |/ / / |/| | |
| * | | RepoHook: allow users to approve hooks via manifestsMike Frysinger2016-08-162-23/+84
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* / / improve docsMike Frysinger2016-08-162-14/+28
|/ / | | | | | | Change-Id: Ide4008f09c2f17f8fb3d85dfffe94544abfdd6a6
* | Merge "Support non-ASCII GNUPGHOME environment variable"David Pursehouse2016-08-151-2/+8
|\ \
| * | Support non-ASCII GNUPGHOME environment variableDāvis Mosāns2016-07-161-2/+8
| | | | | | | | | | | | | | | | | | | | | Here we don't need to encode this gpg_dir string when using Python 2.7 on Linux. Change-Id: I56724e9511d3b1aea61535e654a45c212130630d
* | | Merge "repo: Repo does not always handle '.' parameter correctly"David Pursehouse2016-08-142-1/+6
|\ \ \ | |/ / |/| |
| * | repo: Repo does not always handle '.' parameter correctlyMark E. Hamilton2016-04-082-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The repo script allows a manifest to specify a '.' as the path the top-level directory, which co-locates the .git and .repo directories, and places files from the git repository at the top-level: <project name="proj_name" path="." /> <project name="sierra.other.git" path="other" /> Most commands work correctly with this setup. Some commands, however, fail to find the project. For instance, 'repo sync' works, and 'repo sync .' works in a sub-project ('other' in this case) but 'repo sync .' in the top-level directory fails with the error: error: project . not found There are two reasons for this: 1. The self.worktree attribute of the Project object is not normalized, so with a '.' for path its value would be '/my/project/root/.'. This is fine when used as a path, since it's the same path as '/my/project/root', but when used in a string comparison it fails. This commit applies os.path.normpath() to that value before storing it. 2. The _GetProjectByPath method in command.py was not checking the path against manifest.topdir, so even once it was normalized the project was not found. This commit adds a check against manifest.topdir if the loop drops out without finding a project. Change-Id: Ic84d053f1bbb5a357cad566805d5a326ae8246d2
* | | Bail out when manifest is referencing a bad SHA-1 revision.Xin Li2016-06-291-1/+7
| | | | | | | | | | | | | | | BUG: Issue 222 Change-Id: Ie0a64b39922d6fdf1be2989eb514985be8490278
* | | Merge "Adds additional crlf clobber avoidance."David Pursehouse2016-06-291-1/+1
|\ \ \
| * | | Adds additional crlf clobber avoidance.Fredrik Berggren2016-06-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds the hook-scripts to .gitattributes due to the shell-scripts not liking CRLF which they will get if a user sets 'autocrlf = true' in their global gitconfig. Further, since the python interpreter can handle either CRLF or LF, python-scripts specific line-ending rules have been removed. Change-Id: I2d6bfd491b2f626b9ca93c40a3a7f2cfba6c54f0
* | | | Merge "Fix variable assignment"David Pursehouse2016-06-291-1/+4
|\ \ \ \
| * | | | Fix variable assignmentAymen Bouaziz2016-06-281-1/+4
| | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If upstream string is empty, current_branch_only variable will be assigned to an empty string. This is not what we expect here as this variable is a boolean. Change-Id: Ibba935e25a74c2be1e50c88b4b403cf394ba365e
* | | | pylint: Fix unused-{argument,variable} warningStefan Beller2016-06-212-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit fixes 4 out of the remaining 5 pylint warnings: $ pylint --rcfile=.pylintrc *.py ************* Module gitc_utils W:146, 0: TODO(sbasi/jorg): Come up with a solution to remove the sleep below. (fixme) W:130, 6: Unused variable 'name' (unused-variable) ************* Module main W:382,32: Unused argument 'fp' (unused-argument) W:382,36: Unused argument 'code' (unused-argument) W:382,42: Unused argument 'msg' (unused-argument) Change-Id: Ie3d77b9a65b7daefaa9aa4b80f4b682c1678fd58 Signed-off-by: Stefan Beller <sbeller@google.com>
* | | | pylint: fix indentation in manifest_xmlStefan Beller2016-06-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes pylint warning: ************* Module manifest_xml W:975, 0: Bad indentation. Found 8 spaces, expected 6 (bad-indentation) Change-Id: I967212f9439430351836ebdc27e442d7b77476e2 Signed-off-by: Stefan Beller <sbeller@google.com>
* | | | pylint: ignore bad-whitespaceStefan Beller2016-06-171-1/+1
| |/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This ignores whitespaces errors, which we have quite a few of in argument lists, for example: ************* Module git_config C:209, 0: No space allowed around keyword argument assignment def HasSection(self, section, subsection = ''): ^ (bad-whitespace) C:320, 0: No space allowed around keyword argument assignment capture_stdout = True, ^ (bad-whitespace) C:321, 0: No space allowed around keyword argument assignment capture_stderr = True) ^ (bad-whitespace) C:427, 0: Exactly one space required after comma '-o','ControlPath %s' % ssh_sock(), ^ (bad-whitespace) C:436, 0: Exactly one space required after comma check_command = command_base + ['-O','check'] ^ (bad-whitespace) C:464, 0: Exactly one space required after comma % (host,port, str(e)), file=sys.stderr) ^ (bad-whitespace) C:707, 0: No space allowed around keyword argument assignment return self._config.GetString(key, all_keys = all_keys) ^ (bad-whitespace) C:759, 0: No space allowed around keyword argument assignment return self._config.GetString(key, all_keys = all_keys) ^ (bad-whitespace) Change-Id: Ia8f154f6741ce609787551f65877d7584c457903 Signed-off-by: Stefan Beller <sbeller@google.com>
* | | Merge "Fix XmlManifest.Save with remotes that have 'alias' set"Dan Willemsen2016-04-222-6/+11
|\ \ \
| * | | Fix XmlManifest.Save with remotes that have 'alias' setDan Willemsen2016-04-222-6/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the alias attribute is set for a remote, the RemoteSpec attached to a Project only contains the alias name used by git, not the original name used in the manifest. But that's not enough information to reconstruct the manifest, so save off the original manifest name as another RemoteSpec parameter, only used to write the manifest out. Bug: Issue 181 Bug: Issue 219 Change-Id: Id7417dfd6ce5572e4e5fe14f22924fdf088ca4f3
* | | | diffmanifests: support custom git pretty format stringsSebastian Schuberth2016-04-212-10/+24
|/ / / | | | | | | | | | Change-Id: I29f4f1351c421f393328514d145df1a96aed9ee2
* | | Add a .mailmap fileDavid Pursehouse2016-04-181-0/+8
| | | | | | | | | | | | Change-Id: I3c7e68fae0f8c082b2e0fbfc26cfb7dda31f1d34
* | | 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
* | | Improve documentation of manifest server RPC methodsDavid Pursehouse2016-04-131-2/+4
| |/ |/| | | | | | | | | | | Mention that the RPC endpoints are used when running repo sync with the --smart-sync and --smart-tag options Change-Id: I4b0b82e8b714fe923a5b325a6135f0128bf636ff
* | Fix symlinking of new projectsDan Willemsen2016-04-051-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We weren't copying these lists, so the += was actually changing the underlying lists. When a new project was added to the manifest, we run _CheckDirReference against the manifest project with share_refs=True, which added the working_tree_* to the shareable_* lists. Then, when we load the new manifest and create the new project, it uses the lists that already contain the working_tree_* files, even though we passed share_refs=False. This happens reliably under the above conditions, but doesn't seem to happen when syncing a fresh tree. So we've got a mixture of links that may need to be cleaned up later. This patch will just stop it from happening in the future. Change-Id: Ib7935bfad78af1e494a75e55134ec829f13c2a41
* | Merge "Ignore clone.bundle on HTTP 501, i.e. Not Implemented"David Pursehouse2016-04-051-1/+1
|\ \
| * | Ignore clone.bundle on HTTP 501, i.e. Not ImplementedJohn Törnblom2015-08-121-1/+1
| | | | | | | | | | | | Change-Id: I03ee003d3bd5d0684a31bdf7961a55a511dfa0e2