summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* | | | Revert "Add --prune option to fetch when syncing a mirror repo"v1.12.24David Pursehouse2015-07-201-2/+0
| |/ / |/| | | | | | | | | | | | | | | | | | | | | | | For some users it is not desirable to remove refs that don't exist on the remote server when syncing a mirror repo. This reverts commit b4d43b9f664d6472b6c1e91c98f951037d00cea5. Change-Id: Ie849b66682138ef88da6cd1a5fbb27e993197dd7
* | | Merge "Fail if gitdir does not point to objdir during sync"Conley Owens2015-07-151-20/+47
|\ \ \
| * | | Fail if gitdir does not point to objdir during syncKevin Degi2015-05-121-20/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are a set of cases that can cause the git directory in .repo/projects to point to a directory in .repo/project-objects that is not the one specified in the manifest. This results in a tree that is not sane, and so should cause a failure. In order to reproduce the failure case: 1) Sync to any manifest 2) Change the 'name' of a project to a different repository. Leave the 'path' the same. 3) Resync the modified project. The project-objects directory will not be created, and the projects directory will remain pointed at the old project-objects. Change-Id: Ie6711b1c773508850c5c9f748a27ff72d65e2bf2
* | | | Merge "project.RemoteFetch: Handle depth cases more robustly"Conley Owens2015-07-151-3/+10
|\ \ \ \
| * | | | project.RemoteFetch: Handle depth cases more robustlyKevin Degi2015-07-151-3/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The fetch logic for the case where depth is set and revision is a SHA1 has several failure modes that are not handled well by the current logic. 1) 'git fetch <SHA1>' requires git version >= 1.8.3 2) 'git fetch <SHA1>' can be prevented by a configuration option on the server. 3) 'git fetch --depth=<N> <refspec>' can fail to contain a SHA1 specified by the manifest. Each of these cases cause infinite recursion when _RemoteFetch() tries to call itself with current_branch_only=False because current_branch_only is set to True when depth != None. To try to prevent the infinite recursion, we set self.clone_depth to None before the first retry of _RemoteFetch(). This will allow the Fetch to eventually succeed in the case where clone-depth is specified in the manifest. A user specified depth from the init command will still recurse infinitely. In addition, never try to fetch a SHA1 directly if the git version being used is not at least 1.8.3. Change-Id: I802fc17878c0929cfd63fff611633c1d3b54ecd3
* | | | | Merge "Always output upstream if specified"v1.12.23Conley Owens2015-07-131-5/+7
|\ \ \ \ \
| * | | | | Always output upstream if specifiedConley Owens2015-07-101-5/+7
| | |_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, in running the `manifest` command, we wouldn't output the upstream if the default upstream would include the pinned sha1. However, now that fetching refs/heads/* doesn't guarantee that we will have the sha1, we need to always output the specified upstream branch. Change-Id: Ib8b409a8ecd439397b38ee9649c530407797f841
* | | | | Merge changes Iaefcbe14,I697a0f64,I19bfe9fe,I06e942c4David Pursehouse2015-07-112-7/+27
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * changes: forall: use smart sync override manifest if it exists sync: Remove smart sync override manifest when not in smart sync mode forall: Don't try to get lrev of projects in mirror workspace sync: Improve error message when writing smart sync manifest fails
| * | | | | forall: use smart sync override manifest if it existsDavid Pursehouse2015-07-061-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a workspace is synced with the -s or -t option, the included projects may be different to those in the original manifest. However, when using the forall command, the list of the projects from the original manifest is used. If the smart sync manifest file exists, use it to override the original manifest. Change-Id: Iaefcbe148d2158ac046f158d98bbd8b5a5378ce7
| * | | | | sync: Remove smart sync override manifest when not in smart sync modeDavid Pursehouse2015-07-061-5/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When syncing with the -s or -t option, a smart_sync_override.xml file is created. This file is left in the file system when syncing again without the -s or -t option. Remove the smart sync override manifest, if it exists, when not using the -s or -t option. Change-Id: I697a0f6405205ba5f84a4d470becf7cd23c07b4b
| * | | | | forall: Don't try to get lrev of projects in mirror workspaceDavid Pursehouse2015-07-061-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git rev-parse fails for projects that don't have an explicit revision specified, and don't have a branch of the same name as the default revision. This can be the case in a workspace synced with the smart sync (-s) or smart tag (-t) option. Change-Id: I19bfe9fe7396170379415d85f10f6440dc6ea08f
| * | | | | sync: Improve error message when writing smart sync manifest failsDavid Pursehouse2015-07-061-2/+3
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The error message only states that writing the manifest failed. Include the exception message, so it's easier to track down the reason that the write failed. Change-Id: I06e942c48a19521ba45292199519dd0a8bdb1de7
* | | | | Merge "Improve error message when syncing a project with invalid groups."Conley Owens2015-07-101-0/+7
|\ \ \ \ \ | |/ / / / |/| | | |
| * | | | Improve error message when syncing a project with invalid groups.Jarkko Pöyry2015-06-191-0/+7
| |/ / / | | | | | | | | | | | | Change-Id: Iaf5c2a0f00667dc09bcf455cfe2f39bfbaa2bfc0
* | | | Merge "Fix 'repo cherry-pick' to avoid hanging on commit-msg update."David Pursehouse2015-06-251-0/+1
|\ \ \ \ | |/ / / |/| | |
| * | | Fix 'repo cherry-pick' to avoid hanging on commit-msg update.Than McIntosh2015-06-221-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After performing the actual cherry-pick operation, the code in cherry_pick.py opens a pipe to 'git commit -F' to rewrite the commit message, emits the fixed-up commit msg to the pipe, then waits for 'git commit' to complete. The child 'git' process winds up hanging while reading from the pipe, however, since the parent process still has it open. To fix the hang, change the parent process to close its end of the pipe after it has emitted the message. Change-Id: I5929371e69a5b076f09009d00d40a2c72ac8ac33
* | | | Merge "Teach _LinkFile._Link to handle globs."David Pursehouse2015-06-091-11/+44
|\ \ \ \
| * | | | Teach _LinkFile._Link to handle globs.Wink Saville2015-06-031-11/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows a project to use globs in the linkfile src attribute. When a glob is used in the src the dest field must be a directory. Then _LinkFile._Link(self) calls will create symbolic links in the dest directory to all of the entries in the src as defined by the glob specification. Below all of the entries in master-configs/ will have symbolic links in <root dir>/configs directory: <project name="helloworld.git" path="apps/helloworld"> <linkfile src="master-configs/*" dest="configs"/> </project> Change-Id: Idfed8fa47c83d2ca6e2b8e867731b8e2f9e2eb47
* | | | | forall: setenv, only encode val if encode existsAnthony King2015-06-041-1/+3
| | | | | | | | | | | | | | | | | | | | Change-Id: I655e3043d0118c4e929897d3a51e5e013e5758dc
* | | | | init: don't call urllib.parseAnthony King2015-06-041-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | it's actually urllib.parse.urlparse Change-Id: Ie3532e54625e887c8682d92b932ea21a629e8d60
* | | | | git_config: fix _SaveJson typoAnthony King2015-06-041-1/+1
| | | | | | | | | | | | | | | | | | | | Change-Id: I35ca2b3733e6d1508669f9a6690c6645c582912e
* | | | | error: fix typosAnthony King2015-06-041-2/+2
| | | | | | | | | | | | | | | | | | | | Change-Id: I09c47024ef54c360ea3c15c5d4f169e13444e412
* | | | | git_command: only decode when neededAnthony King2015-06-031-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | strings no longer need decoding, since unicode is str Change-Id: I9516d298fee7ddc058452394b7759327fe3aa7a8
* | | | | decode the buffer before appendingAnthony King2015-06-031-0/+2
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | output from a process is in bytes in python3. we need to decode it. in Python3, bytes don't have an encode attribute. use this to identify it. Change-Id: I152f2ec34614131027db680ead98b53f9b321ed5
* | | | Merge changes I32da12c2,Ie4a65b3eDavid Pursehouse2015-06-022-4/+22
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | * changes: Skip sleep and retry if git remote update exits with a signal Catch exceptions in project list generator
| * | | | Skip sleep and retry if git remote update exits with a signalColin Cross2015-05-131-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pressing ctrl-c during repo sync often hangs for 30 to 45 seconds due to the time.sleep and retry in _RemoteFetch. If git exits with a signal, for example -2 for SIGINT triggered by ctrl-c, skip the sleep and retry. Change-Id: I32da12c2dcc96d9cc0b12a066e824b12ebfb52a0
| * | | | Catch exceptions in project list generatorColin Cross2015-05-131-4/+19
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the generator that produces per-project worker arguments raises an exception it triggers python bug http://bugs.python.org/issue8296. Rewrite the generator expression as a generator function, and catch Exceptions and KeyboardInterrupts to end the iteration. Also add a pool worker initializer to disable SIGINT to prevent KeyboardInterrupts inside multiprocessing.Pool in the worker threads causing the same problem. Fixes easy-to-reproduce hangs when hitting ctrl-c during repo forall -c echo Change-Id: Ie4a65b3e1e07a64ed6bb6ff20f3912c4326718ca
* / / / Make linkfile symlinks relativeColin Cross2015-06-011-6/+7
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The source (target) of the symlink is specified relative to a project within a tree, and the destination is specified relative to the top of the tree, so it should always be possible to create a relative symlink to the target file. Relative symlinks will allow moving an entire tree without breaking the symlink, and copying a tree (with -p) without leaving a symlink to the old tree. Change-Id: I16492a8b59a137d2abe43ca78e3b212e2c835599
* | | Merge "Don't attempt to create "fully qualified names" for SHA1s"David Pursehouse2015-05-111-1/+1
|\ \ \
| * | | Don't attempt to create "fully qualified names" for SHA1sAlexandre Boeglin2015-04-301-1/+1
| |/ / | | | | | | | | | | | | | | | Doing so breaks "repo init -b <SHA1>". Change-Id: Ic071a1b099a9125db22ea446d7e92e7854d69b37
* | | Merge "Add option on sync to avoid fetching from remotes for existing sha1"David Pursehouse2015-05-012-6/+21
|\ \ \
| * | | Add option on sync to avoid fetching from remotes for existing sha1David Pursehouse2015-04-302-6/+21
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In 2fb6466f795eb30c1dfa598501f5b5d2981e6a5f an optimisation was added to avoid fetching from remotes if the project is fixed to a revision and the revision is already available locally. This causes problems for users who expect all objects to be fetched by default. Change the logic so that the optimized behaviour is only enabled if an option is explicitly given to repo sync. Change-Id: I3b2794ddd8e0071b1787e166463cd8347ca9e24f
* / / Add --prune option to fetch when syncing a mirror repoDavid Pursehouse2015-04-301-0/+2
|/ / | | | | | | | | | | | | When syncing a mirror repo, add the --prune option to the fetch command to force removal of stale refs from the mirror. Change-Id: I4b43b2a5c86b9915627887c16f6569066f3ab978
* | Fix substitution err for schemeless manifest urlsv1.12.22Conley Owens2015-04-291-1/+2
| | | | | | | | | | | | | | | | Previously, we used a regex that would only remove a phony string from a url if it existed, but we recently replaced that with a slice. This change goes back to the previous behavior. Change-Id: I8baf527be01c4b49d45b903b31a1cd6315563d5b
* | Don't append branch to fetch spec when syncing to a mirrorv1.12.21David Pursehouse2015-04-271-12/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Appending the branch to the fetch spec causes sync of a mirror to fail for projects that don't have an explicit revision specified, and don't have a branch of the same name as the default revision. For example, a manifest defining a default revision: <default revision="master"> having a project without an explicit revision: <project name="path/to/project"> and not having a branch named "master", will cause repo sync to fail for that project with the error: Couldn't find remote ref refs/heads/master Modify the logic to not append the branch onto the fetch spec when syncing to a mirror. Change-Id: I5c4457bd125519abf27abe682dea62ad708978c9
* | Merge "forall: use a generator to map the Pool"Conley Owens2015-04-081-2/+2
|\ \
| * | forall: use a generator to map the PoolAnthony King2015-04-081-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | Before, a list was generated, which is why there was a massive delay. Using a generator will allow processes to start straight away Change-Id: Ia325b0b340cc328c08c9bcc92a6709bbdaf6a664
* | | Merge "status: lose dependence on StringIO"Conley Owens2015-04-081-33/+15
|\ \ \ | |/ / |/| |
| * | status: lose dependence on StringIOAnthony King2015-04-041-33/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | buflist was being used, which isn't available in Python 3. `Execute` was using StringIO to capture the output of `PrintWorkTreeStatus`, only to redirect it straight to stdout. Instead, just let `PrintWorkTreeStatus` do it's own thing directly to stdout. for handling `_FindOrphans`, we swap StringIO for a list. Nothing was done that needed a a file like object. Change-Id: Ibdaae137904de66a5ffb590d84203ef0fe782d8b
* | | Remove deprecated `include-ids` setting from pylint configDavid Pursehouse2015-04-071-3/+0
| | | | | | | | | | | | Change-Id: Ie5ab21e434d24ff862bb5e0c263761370d71f56f
* | | Merge "Pylint and PEP8 fixes for color.py"David Pursehouse2015-04-071-21/+27
|\ \ \ | |/ / |/| |
| * | Pylint and PEP8 fixes for color.pyAnthony King2015-03-281-21/+27
| | | | | | | | | | | | Change-Id: I1a676e25957a7b5dd800d2585a2ec7fe75295668
* | | Maintain fully qualified tracking branchesConley Owens2015-04-011-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When running repo branch, the git merge line (in many circumstances) is set to the revision of the project specified in the manifest. If this is a branch name that is not fully-qualified, we will end up with something like "merge = master" instead of "merge = refs/heads/master". This change examines the revision if we are going to use that and changes branch short names to fully qualified branch names. Change-Id: Ie1be94fb8d45df8eeac44a47f729a3819a05fa81
* | | Resolve fetch urls more efficientlyAnthony King2015-03-311-16/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of using regex, append the netloc and relative scheme lists with the custom scheme. The schemes will only be appended when needed, instead of passing X amount of regex replaces. see http://bugs.python.org/issue18828 for more details. Change-Id: I10d26d5ddc32e7ed04c5a412bdd6e13ec59eb70f
* | | use the max depth instead of unshallowAnthony King2015-03-301-1/+2
| | | | | | | | | | | | | | | | | | This allows the use of older versions of git Change-Id: I88ea685066603af19896a791829355ddbfa91ffe
* | | Revert "Change the min git version from 1.7.2 to 1.8.2"Anthony King2015-03-301-2/+2
|/ / | | | | | | | | | | This reverts commit 52b99aa91d0fbb5ea363b5febb367d602dbc56db. Change-Id: I01d93704c92f7af1ca2b36dbc9509ee1290e2d3c
* | Always capture output for GitCommandJohn L. Villalovos2015-03-262-17/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Switch the GitCommand program to always capture the output for stdout and stderr. And by default print the output while running. The options capture_stdout and capture_stderr have effectively become options to supress the printing of stdout and stderr. Update the 'git fetch' to use '--progress' so that the progress messages will be displayed. git checks if the output location isatty() and if it is not a TTY it will by default not print the progress messages. Change-Id: Ifdae138e008f80a59195f9f43c911a1a5210ec60
* | Change the min git version from 1.7.2 to 1.8.2Conley Owens2015-03-181-2/+2
| | | | | | | | | | | | This is needed for the --unshallow option of git fetch. Change-Id: Ifdc5cec6130315c643924328fea425f1b94cb04a
* | Revert "Implementation of manifest defined githooks"v1.12.20Jonathan Nieder2015-03-174-117/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 38e4387f8eb8cffd6359d726c38a7c524fef07e3. A "repo init" followed by "repo sync" is meant to be as safe as "git clone". In particular it should not run arbitrary code provided by the manifest owner. It would still be nice to have support for manifest-defined git hooks --- they'd just need a prompt like the upload RepoHook has. Hopefully a later change can bring them back. Change-Id: I5ecd90fb5c2ed64f103d856d1ffcba38a47b062d Signed-off-by: Jonathan Nieder <jrn@google.com>
* | Merge "Don't exit with error on HTTP 401 when downloading clone bundle"Conley Owens2015-03-111-1/+1
|\ \