summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* | | | Merge "Return a list rather than dict_values in XmlManifest.projects()"Conley Owens2014-05-071-1/+1
|\ \ \ \
| * | | | Return a list rather than dict_values in XmlManifest.projects()Anthony King2014-05-061-1/+1
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | dict.values() produce dict_values objects rather than list objects. Convert this to a list to maintain functionality with certain functions. Change-Id: Ie76269e19f8d68479a1d7ae03aa965252d759a9e
* | | | Merge "Define unicode as str if using Python 3"Conley Owens2014-05-071-2/+4
|\ \ \ \
| * | | | Define unicode as str if using Python 3Anthony King2014-05-061-2/+4
| |/ / / | | | | | | | | | | | | | | | | | | | | The unicode object was renamed to str in Python 3 Change-Id: I1e4972fb07b313d3462587b3059bb3638d779625
* | | | Merge "Use exec() rather than execfile()"Conley Owens2014-05-071-1/+2
|\ \ \ \
| * | | | Use exec() rather than execfile()Anthony King2014-05-051-1/+2
| |/ / / | | | | | | | | | | | | | | | | | | | | execfile() is not in Python 3. Change-Id: I5af222340f13c1e8edaa820e7675d3e4d62a1689
* | | | Use JSON instead of pickleAnthony King2014-05-072-58/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Use JSON as it is shown to be much faster than pickle. Also clean up the loading and saving functions. Change-Id: I45b3dee7b4d59a1c0e0d38d4a83b543ac5839390
* | | | Use next(iterator) rather than iterator.next()Anthony King2014-05-072-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | iterator.next() was replaced with iterator.__next__() in Python 3. Use next(iterator) instead which will select the correct method for returning the next item. Change-Id: I6d0c89c8b32e817e5897fe87332933dacf22027b
* | | | Merge "Prevent warning twice about Python 3 usage"David Pursehouse2014-05-071-4/+4
|\ \ \ \
| * | | | Prevent warning twice about Python 3 usageAnthony King2014-05-061-4/+4
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | Only warn about using Python 3 when running the repo script directly. This prevents the user being warned twice. Change-Id: I2ee51ea2fa0127ea310598320e460ec9f38c6488
* / / / Use sorted() rather than .sort()Anthony King2014-05-061-4/+2
|/ / / | | | | | | | | | | | | | | | | | | dict.keys() produces a dict_keys object in Python 3, which does not support .sort(). Use sorted() which will give the same outcome. Change-Id: If6b33db07a31995b4e44959209d08d8fb74ae339
* | | Ensure HEAD is correct when skipping remote fetchv1.12.16Conley Owens2014-05-011-11/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A recent optimization (2fb6466f795eb30c1dfa598501f5b5d2981e6a5f) skips performing a remote fetch if we already know we have the sha1 we want. However, that optimization skipped initialization steps that ensure HEAD points to the correct sha1. This change makes sure not to skip those steps. Here is an example of how to test this change: """"""""" url=<manifest url> branch1=<branch name> branch2=<branch name> project=<project with revision set to different sha1 in each branch> repo init -u $url -b $branch1 --mirror repo sync $project first=$(cd $project.git; git rev-parse HEAD) repo init -b $branch2 repo sync $project second=$(cd platform/build.git; git rev-parse HEAD) if [[ $first == $second ]] then echo 'problem!' else echo 'no problem!' fi """""""""
* | | Add 'shallow' gitfile to symlinksv1.12.15Conley Owens2014-04-301-1/+1
| | | | | | | | | | | | | | | | | | | | | This fixes the bug that kept clients from doing things like `git log` in projects using the clone-depth feature. Change-Id: Ib4024a7b82ceaa7eb7b8935b007b3e8225e0aea8
* | | Merge "Ignore clone-depth attribute when fetching to a mirror"v1.12.14Conley Owens2014-04-241-4/+10
|\ \ \
| * | | Ignore clone-depth attribute when fetching to a mirrorDavid Pursehouse2014-04-161-4/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a manifest includes projects with a clone-depth=1 attribute, and a workspace is initialised from that manifest using the --mirror option, any workspaces initialised and synced from the mirror will fail with: fatal: attempt to fetch/clone from a shallow repository on the projects that had the clone-depth. Ignore the clone-depth attribute when fetching from the remote to a mirror workspace. Thus the mirror will be synched with a complete clone of all the repositories. Change-Id: I638b77e4894f5eda137d31fa6358eec53cf4654a
* | | | Add linkfile support.Jeff Hamilton2014-04-222-8/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's just like copyfile and runs at the same time as copyfile but instead of copying it creates a symlink instead. This is needed because copyfile copies the target of the link as opposed to the symlink itself. Change-Id: I7bff2aa23f0d80d9d51061045bd9c86a9b741ac5
* | | | Merge "Don't try to remove .repo if it doesn't exist"David Pursehouse2014-04-181-6/+2
|\ \ \ \ | |/ / / |/| | |
| * | | Don't try to remove .repo if it doesn't existMitchel Humpherys2014-03-121-6/+2
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Part of the cleanup path for _Init is removing the .repo directory. However, _Init can fail before creating the .repo directory, so trying to remove it raises another exception: fatal: invalid branch name 'refs/changes/53/55053/4' Traceback (most recent call last): File "/home/mitchelh/bin/repo", line 775, in <module> main(sys.argv[1:]) File "/home/mitchelh/bin/repo", line 749, in main os.rmdir(repodir) OSError: [Errno 2] No such file or directory: '.repo' Fix this by only removing .repo if it actually exists. Change-Id: Ia251d29e9c73e013eb296501d11c36263457e235
* | | Add total count and iteration count to forall environmentMitchel Humpherys2014-03-311-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For long-running forall commands sometimes it's useful to know which iteration is currently running. Add REPO_I and REPO_COUNT environment variables to reflect the current iteration count as well as the total number of iterations so that the user can build simple status indicators. Example: $ repo forall -c 'echo $REPO_I / $REPO_COUNT; git gc' 1 / 579 Counting objects: 41, done. Delta compression using up to 8 threads. Compressing objects: 100% (19/19), done. Writing objects: 100% (41/41), done. Total 41 (delta 21), reused 41 (delta 21) 2 / 579 Counting objects: 53410, done. Delta compression using up to 8 threads. Compressing objects: 100% (10423/10423), done. Writing objects: 100% (53410/53410), done. Total 53410 (delta 42513), reused 53410 (delta 42513) 3 / 579 ... Change-Id: I9f28b0d8b7debe423eed3b4bc1198b23e40c0c50 Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
* | | Make --no-tags work with -cMitchel Humpherys2014-03-121-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, the --no-tags option is ignored if the user asks to only fetch the current branch. There is no reason for this restriction. Fix it. Change-Id: Ibaaeae85ebe9955ed49325940461d630d794b990 Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
* | | Fix indentation in project.pyDavid Pursehouse2014-03-111-1/+1
|/ / | | | | | | Change-Id: I81c630536eaa54d5a25b9cb339a96c28619815ea
* / More verbose errors for NoManifestExceptions.Dan Sandler2014-03-113-13/+25
|/ | | | | | | | | | | | | | | | The old "manifest required for this command -- please run init" is replaced by a more helpful message that lists the command repo was trying to execute (with arguments) as well as the str() of the NoManifestException. For example: > error: in `sync`: [Errno 2] No such file or directory: > 'path/to/.repo/manifests/.git/HEAD' > error: manifest missing or unreadable -- please run init Other failure points in basic command parsing and dispatch are more clearly explained in the same fashion. Change-Id: I6212e5c648bc5d57e27145d55a5391ca565e4149
* Add reviewers automatically from project's git configbijia2014-03-041-3/+14
| | | | | | | | | | | The `review.URL.autocopy` setting sends email notification to the named reviewers, but does not add them as reviewer on the uploaded change. Add a new setting `review.URL.autoreviewer`. The named reviewers will be added as reviewer on the uploaded change. Change-Id: I3fddfb49edf346f8724fe15b84be8c39d43e7e65 Signed-off-by: bijia <bijia@xiaomi.com>
* Don't fetch from remotes if commit id exists locallyChris AtLee2014-03-031-12/+18
| | | | | | | | | In existing workspaces where the manifest specifies a commit id in the manifest, we can avoid doing a fetch from the remote if we have the commit locally. This substantially improves sync times for fully specified manifests. Change-Id: Ide216f28a545e00e0b493ce90ed0019513c61613
* Merge "Clean up duplicate logic in subcmds/sync.py."Conley Owens2014-02-281-49/+34
|\
| * Clean up duplicate logic in subcmds/sync.py.David James2014-02-141-49/+34
| | | | | | | | | | | | | | The fetch logic is now shared between the jobs == 1 and jobs > 1 cases. This refactoring also fixes a bug where opts.force_broken was not honored when jobs > 1. Change-Id: Ic886f3c3c00f3d8fc73a65366328fed3c44dc3be
* | Fix to mirror manifest when --mirror is givenKwanhong Lee2014-02-201-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 8d201 "repo: Support multiple branches for the same project." (Change id is I5e2f4e1a7abb56f9d3f310fa6fd0c17019330ecd) caused missing mirroring manifest repository when 'repo sync' after 'repo init --mirror'. When the function _AddMetaProjectMirror() is called to add two of meta projects - git-repo itself and manifest repository to mirror, it didn't add them into self._paths which has list of projects to be sync'ed by 'repo sync'. In addition, because member var of Project 'relpath' is used as a key of self._paths, it should be set with proper value other than None. Since this is only for meta projects which are not described in manifest xml, 'relpath' is name of the projects. Change-Id: Icc3b9e6739a78114ec70bf54fe645f79df972686 Signed-off-by: Kwanhong Lee <kwanhong.lee@windriver.com>
* | Add the "diffmanifests" commandJulien Campergue2014-02-173-1/+287
| | | | | | | | | | | | | | | | | | This command allows a deeper diff between two manifest projects. In addition to changed projects, it displays the logs of the commits between both revisions for each project. Change-Id: I86d30602cfbc654f8c84db2be5d8a30cb90f1398 Signed-off-by: Julien Campergue <julien.campergue@parrot.com>
* | Merge "Add error message for download -c conflicts"David Pursehouse2014-02-171-1/+7
|\ \ | |/ |/|
| * Add error message for download -c conflictsRob Ward2014-02-111-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently if you run repo download -c on a change and the cherry-pick runs into a merge conflict a Traceback is produced: rob@rob-i5-lm ~/Programming/repo_test/repo1 $ repo download -c repo1 3/1 From ssh://rob-i5-lm:29418/repo1 * branch refs/changes/03/3/1 -> FETCH_HEAD error: could not apply 0c8b474... 2 hint: after resolving the conflicts, mark the corrected paths hint: with 'git add <paths>' or 'git rm <paths>' hint: and commit the result with 'git commit' Traceback (most recent call last): File "/home/rob/Programming/git-repo/main.py", line 408, in <module> _Main(sys.argv[1:]) File "/home/rob/Programming/git-repo/main.py", line 384, in _Main result = repo._Run(argv) or 0 File "/home/rob/Programming/git-repo/main.py", line 143, in _Run result = cmd.Execute(copts, cargs) File "/home/rob/Programming/git-repo/subcmds/download.py", line 90, in Execute project._CherryPick(dl.commit) File "/home/rob/Programming/git-repo/project.py", line 1943, in _CherryPick raise GitError('%s cherry-pick %s ' % (self.name, rev)) error.GitError: repo1 cherry-pick 0c8b4740f876f8f8372bbaed430f02b6ba8b1898 This amount of error message is confusing to users and has the side effect of the git message telling you the actual issue being ignored. This change introduces a message stating that the cherry-pick couldn't be completed removing the Traceback. To reproduce the issue create a change that causes a conflict with one currently in review and use repo download -c to cherry-pick the conflicting change. Change-Id: I8ddf4e0c8ad9bd04b1af5360313f67cc053f7d6a
* | Check for existence of refs upon initial fetchConley Owens2014-02-121-0/+6
|/ | | | | | | | | | | | | | | When we do an initial fetch and have not specified any branch etc, the following fetch command will not error: git fetch origin --tags +refs/heads/*:refs/remotes/origin/* In this change we make sure something got fetched and if not we report an error. This fixes the bug that occurs when we init using a bad manifest url and then are unable to init again (because a manifest project has been inited with no manifest). Change-Id: I6f8aaefc83a1837beb10b1ac90bea96dc8e61156
* Merge "Stop appending 'p/' to review urls"Conley Owens2014-02-101-1/+1
|\
| * Stop appending 'p/' to review urlsConley Owens2014-02-041-1/+1
| | | | | | | | | | | | | | Gerrit no longer requires 'p/', and this causes unexpected behavior. In this change we stop appending 'p/' to the urls. Change-Id: I72c13bf838f4112086141959fb1af249f9213ce6
* | Merge "Implement Kerberos HTTP authentication handler"David Pursehouse2014-02-051-0/+87
|\ \ | |/ |/|
| * Implement Kerberos HTTP authentication handlerCarlos Aguado2014-02-041-0/+87
| | | | | | | | | | | | | | | | | | | | | | | | This commit implements a Kerberos HTTP authentication handler. It uses credentials from a local cache to perform an HTTP authentication negotiation using the GSSAPI. The purpose of this handler is to allow the use Kerberos authentication to access review endpoints without the need to transmit the user password. Change-Id: Id2c3fc91a58b15a3e83e4bd9ca87203fa3d647c8
* | Merge "Changes to support sso: repositories for upload"Conley Owens2014-02-041-1/+4
|\ \
| * | Changes to support sso: repositories for uploadSteve Pucci2014-01-311-1/+4
| |/ | | | | | | Change-Id: Iddf90d52f700a1f6462abe76d4f4a367ebb6d603
* / Fix persistent-https relative url resolvingConley Owens2014-01-311-8/+10
|/ | | | | | | | | | | | | | Previously, we would remove 'persistent-' then tack it on at the end if it had been previously found. However, this would ignore urljoin's decision on whether or not the second path was relative. Instead, we were always assuming it was relative and that we didn't want to use a different absolute url with a different protocol. This change handles persistent-https:// in the same way we handled the absense of an explicit protocol. The only difference is that this time instead of temporarily replacing it with 'gopher://', we use 'wais://'. Change-Id: I6e8ad1eb4b911931a991481717f1ade01315db2a
* Update the version number on the repo launcherv1.12.13Conley Owens2014-01-301-1/+1
| | | | | | | The repo launcher version needs to be updated so some users can take advantage of the more robust version number parsing. Change-Id: Ibcd8036363311528db82db2b252357ffd21eb59b
* Share git version parsing code with wrapper modulev1.12.12Conley Owens2014-01-302-14/+19
| | | | | | | 'repo' and 'git_command.py' had their own git version parsing code. This change shares that code between the modules. DRY is good. Change-Id: Ic896d2dc08353644bd4ced57e15a91284d97d54a
* Add wrapper moduleConley Owens2014-01-303-17/+37
| | | | | | | | This takes the wrapper importing code from main.py and moves it into its own module so that other modules may import it without causing circular imports with main.py. Change-Id: I9402950573933ed6f14ce0bfb600f74f32727705
* Respect version hyphenationv1.12.11Conley Owens2014-01-301-1/+1
| | | | | | | | The last change regarding version parsing lost handling of version hyphenation, this restores that. In otherwords, 1.1.1-otherstuff is parsed as (1,1,1) instead of (1,1,0) Change-Id: I3753944e92095606653835ed2bd090b9301c7194
* Handle release candidates in git version parsingConley Owens2014-01-301-4/+8
| | | | | | | Right now repo chokes on git versions like "1.9.rc1". This change treats 'rc*' as a '0'. Change-Id: I612b7b431675ba7415bf70640a673e48dbb00a90
* repo: Fix 'remove-project' regression with multiple projects.v1.12.10David James2014-01-301-3/+6
| | | | | | | In CL:50715, I updated repo to handle multiple projects, but the remove-projects code path was not updated accordingly. Update it. Change-Id: Icd681d45ce857467b584bca0d2fdcbf24ec6e8db
* Properly iterate through valuesv1.12.9Conley Owens2014-01-291-1/+1
| | | | | | | | | | | | | | | | | | | the value of Manifest.projects has changed from being the dictionary to the values of the dictionary. Here we handle this change correctly on a PostRepoUpgrade. From a `git diff v1.12.7 -- manifest_xml.py`: + @property def projects(self): self._Load() - return self._projects + return self._paths.values() self._paths does contain the projects according to this line of manifest_xml.py: 484 self._paths[project.relpath] = project Change-Id: I141f8d5468ee10dfb08f99ba434004a307fed810
* Merge "Only fetch current branch on shallow clients"v1.12.8Conley Owens2014-01-291-4/+7
|\
| * Only fetch current branch on shallow clientsShawn Pearce2014-01-291-4/+7
| | | | | | | | | | | | | | | | Fetching a new branch on a shallow client may download the entire project history, as the depth parameter is not passed to git fetch. Force the fetch to only download the current branch. Change-Id: Ie17ce8eb5e3487c24d90b2cae8227319dea482c8
* | Merge "Don't backtrace when current branch is not uploadable."David Pursehouse2014-01-141-1/+10
|\ \
| * | Don't backtrace when current branch is not uploadable.Warren Turkal2013-12-111-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | The backtrace currently occurs when one uses the "--cbr" argument with the repo upload subcommand if the current branch is not tracking an upstream branch. There may be other cases that would backtrace as well, but this is the only one I found so far. Change-Id: Ie712fbb0ce3e7fe3b72769fca89cc4c0e3d2fce0
* | | Merge "hooks/pre-auto-gc: fix AC detection on OSX Maverick"David Pursehouse2014-01-101-1/+1
|\ \ \