- 08 Apr, 2016 1 commit
-
-
Mark E. Hamilton authored
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
-
- 06 Apr, 2016 1 commit
-
-
Dan Willemsen authored
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
-
- 05 Apr, 2016 2 commits
-
-
David Pursehouse authored
-
Takeshi Kanemoto authored
Make it possible to exclude projects using regex/wildcard. The syntax is similar to that of the -r option, e.g.: repo forall -i proxy_http_version 1.1;platform/ proxy_http_version 1.1;device/ -c 'echo $REPO_PROJECT' Change-Id: Id250de5665152228c044c79337d3ac15b5696484
-
- 15 Mar, 2016 1 commit
-
-
David Pursehouse authored
* changes: command.py: Cleaned up pylint/pep8 violations project.py: Cleaned up pylint/pep8 violations
-
- 14 Mar, 2016 1 commit
-
-
Mike Bjorge authored
Change-Id: I31b74aba998f8e83f370a759218777f2557a8872
-
- 05 Mar, 2016 1 commit
-
-
Mike Frysinger authored
A common design pattern is to use __file__ to find the location of the active python module to assist in output or loading of related assets. The current hook systems runs the pre-upload.py hook in a context w/out that set leading to runtime errors: $ repo upload --cbr . ERROR: Traceback (most recent call last): File ".../repo/project.py", line 481, in _ExecuteHook self._script_fullpath, 'exec'), context) File ".../repohooks/pre-upload.py", line 32, in <module> path = os.path.dirname(os.path.realpath(__file__)) NameError: name '__file__' is not defined Define this variable in this context so code can safely use it. Change-Id: If6331312445fa61d9351b59f83abcc1c99ae6748
-
- 02 Mar, 2016 2 commits
-
-
Mark E. Hamilton authored
I noticed when running pylint (as the SUBMITTING_PATCHES file directs) that there were a few violations reported. This makes it difficult to see violations I might have introduced. This commit corrects all pylint violations in the command.py script. This script now has a pylint score of 10.0. Change-Id: Ibb35fa9af0e0b9b40e02ae043682b3af23286748
-
Mark E. Hamilton authored
I noticed when running pylint (as the SUBMITTING_PATCHES file directs) that there were a number of violations reported. This makes it difficult to see violations I might have introduced. This commit corrects all pylint violations in the project.py script. This script now has a pylint score of 10.0, and no violations reported by pep8. Change-Id: I1462fd84f5b6b4c0dc893052671373e7ffd838f1
-
- 27 Feb, 2016 1 commit
-
-
Jonathan Nieder authored
Change-Id: I57e1c3d93c0ce56da9c487df65eb3d258e0260e8
-
- 18 Feb, 2016 1 commit
-
-
Alexandre Garnier authored
It was only displaying 'Project list error: GitError()' without any useful info about the project nor the error Change-Id: Iad66cbaa03cad1053b5ae9ecc90d7772aa42ac13
-
- 17 Feb, 2016 1 commit
-
-
Mark E. Hamilton authored
This commit adds additional instructions on getting patches submitted, based on my recent experience doing so. Change-Id: I8e0d37d316214cc9a39383414773aad181f83f18
-
- 15 Feb, 2016 1 commit
-
-
Mark E. Hamilton authored
I noticed when running pylint (as the SUBMITTING_PATCHES file directs) that there were a number of violations reported. This makes it difficult to see violations I might have introduced. This commit corrects all pylint violations in the repo script. First I ran this to clean up the formatting: autopep8 --max-line-length=80 --indent-size 2 repo Following that the following violations remained: % pylint --rcfile=.pylintrc repo ************* Module repo W:220,21: Redefining name 'init_optparse' from outer scope (line 156) (redefined-outer-name) W:482, 2: No exception type(s) specified (bare-except) C:704, 0: Old-style class defined. (old-style-class) For line 220, the parameter to _GitcInitOptions was renamed so as not to mask the init_optparse global. For line 482, a pylint directive was added to disable the bare-execpt violation for just that line. For line 704, the _Options class was changed to subclass object. Additionally, the comments at lines 107-113 were spaced out to line up with the comment at line 112 that autopep8 moved. This script now has a pylint score of 10.0 Change-Id: I779b66eb6b061a195d3c4372b99dec1b6d2a214f
-
- 10 Feb, 2016 1 commit
-
-
Mark E. Hamilton authored
We want to be able to run repo on a system that is not connected to the Internet and cannot access https://gerrit.googlesource.com. We can put a clone of that repos there, but would prefer to use the stable version of the repo script instead of a locally modified version. This commit adds a check for the REPO_URL environment variable. If that is set and not empty its value will be set in the REPO_URL global in repo. Otherwise the standard path will be used. Change-Id: I0616f5f81ef75f3463b73623b892cb5eed6bb7ba
-
- 04 Feb, 2016 4 commits
-
-
Dan Willemsen authored
-
Dan Willemsen authored
-
Dan Willemsen authored
-
Dan Willemsen authored
As soon as we wrote the gitc manifest, the folder for that repo became empty, causing the next GetProjects lookup to fail. Reorder the GetProjects calls so that they all happen while we still have the repository contents available. If you were already in a subdir, for cases like 'repo start <branch> .', this would still fail, since the working directory would disappear out from under you. That's fine most of the time, since we shouldn't be doing operations based on the local directory, but git has a realpath function that tries to restore CWD by chdir'ing back to it. So if the working directory no longer exists, chdir to the topdir before continuing. Change-Id: Ibdf6cd37ff6e5a5f8338347c3919175491f7166f
-
- 28 Jan, 2016 1 commit
-
-
Xiaohui Chen authored
Some teams have a continuous build server that would mark certain manifest green and safe to sync to. Then team members could repo sync to that particular manifest file and make sure they always sync to a green build. But if she/he has some local changes and wants to rebase, currently it would be a manual process to find the correct version to rebase onto. This patch helps with that use case by automating the process to rebase onto the currently synced manifest version. Change-Id: I847c9eb6addf7f84fd3f5594fbf8c0bcc103f9a5
-
- 15 Dec, 2015 1 commit
-
-
Dan Willemsen authored
We don't really use HEAD much in the bare git repositories, but there have been reports of errors in git-symbolic-ref: symbolic-ref: fatal: Refusing to point HEAD outside of refs/ That happen when the bare git repo is in the detached head state. It's possible that previous operations were killed while we were pruning branches. Use DetachHead instead of SetHead if we're restoring the repo into a detached head state. Change-Id: I9062e8957bc70367d3ded399685ac026fbb421fc
-
- 11 Dec, 2015 1 commit
-
-
Kenny Ho authored
Change-Id: If53721544eca570e2bcce4598cdc2670a679c681
-
- 26 Nov, 2015 2 commits
-
-
Hu Xiuyun authored
When repo sync is used with -f (--force-error) and a project fails to sync, the sync will continue but then exit with an error status. However if -n (--network-only) is also used, the exit code is 0, even when a project failed. Modify the logic to make sure the sync exits with the correct status. Bug: Issue 214 Change-Id: I0b5d97a34642c5aa3743750ef14a42c9d5743c1d
-
Dan Willemsen authored
See git commit 33cfccbbf35a -- some protocols allow arbitrary command execution as part of the URL. Instead of blindly allowing those, whitelist the allowed URL protocols unless the user has already done so. Bug: Issue 210 Change-Id: I6bd8e721aa5e3dab53ef28cfdc8fde33eb74ef76
-
- 19 Nov, 2015 1 commit
-
-
Dan Willemsen authored
If a linkfile is a broken link (destination does not exist), and it needs to be updated, we didn't notice that it needed to be removed first. Use lexists instead of exists to check for this condition. Change-Id: I1f6a1f0193d3fd2b9f7a647836044997f6ab32eb
-
- 27 Oct, 2015 1 commit
-
-
David Pursehouse authored
By passing --prune to the sync command, the --prune option is given to the `git fetch`, causing refs that no longer exist on the remote to be removed. Change-Id: I3cedacce14276d96ac2d5aabf2d07fd05e92bc02
-
- 22 Oct, 2015 1 commit
-
-
Pascal Muetschard authored
Adds windows as one of the allowed platforms flags. Fixes -p foo to append 'platform-foo', instead of each letter (list.extend expects a list and thus appends each char in the string, rather than the string itself). Change-Id: I73a92127ac29a32fc31b335cc54a246302904140
-
- 07 Oct, 2015 1 commit
-
-
Dan Willemsen authored
With gitc-init, a gitc client may be specified using '-c'. If we're not currently in that client, we need to change directories so that we don't affect the local checkout, and to ensure that repo is checked out in the new client. This also makes '-c' optional if already in a gitc client, to match the rest of the init options. Change-Id: Ib514ad9fd101698060ae89bb035499800897e9bd
-
- 02 Oct, 2015 2 commits
-
-
David Pursehouse authored
The .gitcookies file generated by googlesource.com does not have the header: # (Netscape) HTTP Cookie File which causes python's MozillaCookieJar.load to fail with the error: "does not look like a Netscape format cookies file" Prepend the expected header onto the generated cookie file. We don't bother to check if the header already exists on the file; repeating it does not cause any problem. Bug: Issue 207 Change-Id: I7d39720a1d36a6aae00f70691156514ebc04e579
-
David Pursehouse authored
If the git cookies file fails to load, use a default cookie jar instead. Bug: Issue 207 Change-Id: I7cb326c204f2784ab4dbd13801b3186667af5b78
-
- 01 Oct, 2015 1 commit
-
-
Simran Basi authored
repo gitc-delete deletes a GITC client and all the locally saved sources. Useful for removing unnecessary clients and recovering disk space. Change-Id: Idf23addcea52b8713d268c34a7b37da0c5e5cd26
-
- 29 Sep, 2015 1 commit
-
-
Dan Willemsen authored
These won't show up as common commands in the help text unless in a GITC client, and will refuse to execute. Change-Id: Iffe82adcc9d6ddde9cb4b204f83ff018042bdab0
-
- 14 Sep, 2015 2 commits
-
-
Dan Willemsen authored
-
David Pursehouse authored
-
- 11 Sep, 2015 1 commit
-
-
Alexander Bird authored
Change-Id: I86459bf63297487457d6c4c995dfd1e63133ec53
-
- 10 Sep, 2015 2 commits
-
-
Ruslan Bilovol authored
The "copyfile" element is available since 2009 and have been used in every Android manifest; the "linkfile" element is available since 2014. Now it's a good time to add both to the documentation Change-Id: Ia987edf5f69a006235fbd3f33b744e9794a6d964 Signed-off-by:
Ruslan Bilovol <ruslan.bilovol@gmail.com>
-
Dan Willemsen authored
This way any changes made to the main manifest are reflected in the gitc manifest. It's also necessary to use both manifests to sync since the information required to update the gitc manifest is actually in the repo manifest. This also fixes a few issues that came up when testing. notdefault groups weren't being saved to the gitc manifest in a method that matched 'sync'. The merge branch wasn't always being set to the correct value either. Change-Id: I435235cb5622a048ffad0059affd32ecf71f1f5b
-
- 09 Sep, 2015 4 commits
-
-
Dan Willemsen authored
-
Dan Willemsen authored
This reverts commit 250303b4. Change-Id: I1fd8af20f802553151aacb953c913f3305ca6057
-
Dan Willemsen authored
-
Dan Willemsen authored
This way any changes made to the main manifest are reflected in the gitc manifest. It's also necessary to use both manifests to sync since the information required to update the gitc manifest is actually in the repo manifest. This also fixes a few issues that came up when testing. notdefault groups weren't being saved to the gitc manifest in a method that matched 'sync'. The merge branch wasn't always being set to the correct value either. Change-Id: I5dbc850dd73a9fbd10ab2470ae4c40e46ff894de
-