summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Merge "Use depth flag when fetching"Conley Owens2015-01-301-3/+1
|\
| * Use depth flag when fetchingConley Owens2015-01-221-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, we only use the depth flag when cloning. The result is that when new project history has merges, the entire history of the merged branch is brought in and the project becomes unshallow very quickly. --depth and clone-depth are often used to save on space, not just network load, so this seems less than ideal. This change uses --depth on every fetch (when the user has depth specified), not just the initial clone. The result is that the given project stays consistently shallow as opposed to growing over time, especially when merges are involved. Change-Id: Iac706cfdad4a555c72f9d9f1119195d38d91df12
* | Merge "Handle shallow checkout of SHA1 pinned repos"Conley Owens2015-01-281-8/+20
|\ \
| * | Handle shallow checkout of SHA1 pinned reposBertrand SIMONNET2015-01-211-8/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | When doing a shallow checkout SHA1 pinned repos with repo init --depth=1 and repo sync -c, repo would try to fetch only some reference and fail if the exact SHA1 repo was missing. Instead, when depth is set, fetch only the specific commit. Change-Id: If3f799d0e78c03faea47f796380bb5e367b11998
* | | Merge "Don't delete hooks in .git/hooks"Conley Owens2015-01-281-9/+0
|\ \ \
| * | | Don't delete hooks in .git/hooksMitchel Humpherys2015-01-151-9/+0
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We currently delete all hooks in .git/hooks for each project before symlink'ing in the standard project hooks. This can be annoying for users who have installed custom git hooks. There's no reason to delete all existing hooks. Just rip out the deletion code. Change-Id: I5062a6cd20af700f6d6a17b11ad6c94853987c57 Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
* | / pylint fixes for project.pyAnthony King2015-01-222-105/+105
| |/ |/| | | | | | | | | Fix all the formatting warnings and unused variables Change-Id: I17d88a23572303879530077f3a80451de5417fbb
* | Respect --quiet when looking up bundle cookie filev1.12.17Dave Borowitz2015-01-021-3/+3
| | | | | | | | Change-Id: I02a244132c49e4bb50ecda978974d6d2b220f6d1
* | Save cookies back to jar when fetching clone.bundleDave Borowitz2015-01-021-1/+1
| | | | | | | | Change-Id: I3ef71b5e7f8ee1cda66057e46ae234866c7258c4
* | Hold persistent proxy connection open while fetching clone.bundleDave Borowitz2015-01-021-41/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The persistent proxy may choose to present a per-process cookie file that gets cleaned up after the process exits, to help with the fact that libcurl cannot save cookies atomically when a cookie file is shared across processes. We were letting this cleanup happen immediately by closing stdin as soon as we read the configuration option, resulting in a nonexistent cookie file by the time we use the config option. Work around this by converting the cookie logic to a context manager method, which closes the process only when we're done with the cookie file. Change-Id: I12a88b25cc19621ef8161337144c1b264264211a
* | Merge "add a global --color option"Conley Owens2015-01-022-2/+31
|\ \
| * | add a global --color optionMike Frysinger2014-12-302-2/+31
| |/ | | | | | | | | | | | | | | | | | | | | If you want to turn off colors for commands, you have to manually adjust the git config settings (in various locations). If you're writing scripts though, you often don't want to modify those locations. Add a commandline option to explicitly control things. The default behavior is unchanged -- we still scan the config files. Change-Id: I54a3fd8e1918bac180aadd7c7d3004f069b02522
* / Silence warnings about invalid clone.bundle files when quietedKris Giesing2014-12-241-3/+4
|/ | | | | | | The invalid clone.bundle file warning is not typically user actionable, and can be confusing. So don't show it when -q flag is in effect. Change-Id: If9fef4085391acf54b63c75029ec0e161c38eb86
* Revert "Check for existence of refs upon initial fetch"Conley Owens2014-11-101-5/+0
| | | | | | | | | | | | This reverts commit 565480588d2bff4205b437862505e77382189811. We are reverting this change for 2 reasons: 1) It introduced a bug for users using sync -c with a reference mirror. 2) The fetch specs have recently changed to cause git to properly fail when we request a non-existent branch of a manifest, removing the need for this change. Change-Id: I0f63da9bfb40cf5ffafb7979f1b8c929a738fc7b
* If revision is sha hash and dest-branch is defined, use it for starting branchMax Liu2014-10-271-2/+6
| | | | Change-Id: I538c7d216f72b87629b61aee547d374a398c95da
* Support persistent-http(s) review urlsConley Owens2014-10-231-0/+2
| | | | Change-Id: I8e0065685c968dfa9dc26bcdb6ee2fa14019c509
* Merge changes I1f71be22,I5b119f11Conley Owens2014-10-223-13/+17
|\ | | | | | | | | | | * changes: Always fetch the specific revision given Support specifying non-HEADS refs as upstream
| * Always fetch the specific revision givenNasser Grainawi2014-10-091-8/+8
| | | | | | | | | | | | Don't assume the revision is in refs/heads/. Change-Id: I1f71be222ed3ed940d2265aad43d1f2d601fc03a
| * Support specifying non-HEADS refs as upstreamNasser Grainawi2014-10-093-9/+13
| | | | | | | | | | | | | | | | | | While not typical, some users might have an upstream that isn't in the usual refs/heads/* namespace. There's no reason not to use those refs as the value for the upstream attribute, so support doing so. Change-Id: I5b119f1135c3268c20e7c4084682e860d3ee1fb1
* | Merge "upload: report names of uncommitted files"Conley Owens2014-10-212-12/+38
|\ \
| * | upload: report names of uncommitted filesVadim Bendebury2014-10-142-12/+38
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When there are uncommitted files in the tree, 'repo upload' stops to ask if it is OK to continue, but does not report the actual names of uncommitted files. This patch adds plumbing to have the outstanding file names reported if desired. BUG=None TEST=verified that 'repo upload' properly operates with the following conditions present in the tree: . file(s) modified locally . file(s) added to index, but not committed . files not known to git . no modified files (the upload proceeds as expected) Change-Id: If65d5f8e8bcb3300c16d85dc5d7017758545f80d Signed-off-by: Vadim Bendebury <vbendeb@chromium.org> Signed-off-by: Vadim Bendebury <vbendeb@google.com>
* / Exit 1 if repo download -c failsScott Anderson2014-10-171-0/+1
|/ | | | Change-Id: I6985548bf87032b121eeccf858c4eeca1a60598c
* Allow selection of a target when using smart sync.Jeff Davidson2014-10-021-1/+4
| | | | Change-Id: I02a24471b9b62dbba3773f22a289825bc566acd9
* Merge "Add extend-project tag to support adding groups to an existing project"Conley Owens2014-09-182-2/+44
|\
| * Add extend-project tag to support adding groups to an existing projectJosh Triplett2014-06-202-2/+44
| | | | | | | | | | | | | | | | | | | | | | | | Currently, if a local manifest wants to add groups to an existing project, it must use remove-project and then re-add the project with the new groups. This makes the local manifest more fragile, requiring updates to the local manifest if the original manifest changes. Add a new extend-project tag, which supports adding groups to an existing project. Change-Id: Ib4d1352efd722a65dd263d02644b9ea5ab6ed400
* | Add support for rpc:// protocol schemes.T.R. Fullhart2014-09-101-0/+4
| | | | | | | | Change-Id: I0e500e45cacc20ac04b43435c4bd189299e9e97b
* | Change implementation of cleanup in case of clone failure during "repo init"Mani Chandel2014-09-031-1/+1
| | | | | | | | | | | | | | | | Fix includes: 1. It deletes only .repo/repo instead of the whole .repo repository. Bug: Issue 161 Change-Id: I1ab8caa7538fec5e6206d1b029f63bd3f60dedcd
* | Merge "Provide detail print-out when not all projects of a branch are current."Conley Owens2014-08-261-3/+17
|\ \
| * | Provide detail print-out when not all projects of a branch are current.Etan Cohen2014-07-111-3/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When current is "split" (i.e. some projects are current while others are not): - Disable 'not in' printout (i.e. will print out all projects) - Disable printing of multiple projects on one line - Print current projects in green, non-current in white Since using color to differentiate current from non-current in "split" cases: - In non-split cases also print out project names in color (green for current white for non-current) Change-Id: Ia6b826612c708447cecfe5954dc767f7b2ea2ea7
* | | Merge "Enable transferring of attribute using command 'repo manifest -o -'"Conley Owens2014-08-222-6/+8
|\ \ \
| * | | Enable transferring of attribute using command 'repo manifest -o -'Mani Chandel2014-07-242-6/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 'upstream' attribute is now transferred to the new manifest xml that is created when using command 'repo manifest -o -'. Manifest help is updated for the attributes 'sync-c','sync-s' and 'sync-j'. Bug: Issue 164 Change-Id: If63f781e91d25c5b5b5ea0696b0c04337b0a686a
* | | | Decode git versionChirayu Desai2014-08-201-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Used by 'repo --version' With Python 3, * Before: b'git version 2.1.0' * After: git version 2.1.0 Change-Id: I4321bb0f09e92cda1123c35910338b940e82a305
* | | | Don't open non-binary files as binaryChirayu Desai2014-08-192-2/+2
|/ / / | | | | | | | | | | | | | | | * Don't pen the git config file, and the git ".lock" file as binary. Change-Id: I7b3939658456f2fd0a0500443cdd8d1ee1a4459d
* | | Update the commit-msg hook to the version from Gerrit 2.8.2Dave Borowitz2014-07-151-3/+7
| | | | | | | | | | | | Change-Id: Id911bc6841f488a42d08580de800c3afafa2937e
* | | Merge "Fix UrlInsteadOf to handle multiple strings"Conley Owens2014-06-301-3/+3
|\ \ \
| * | | Fix UrlInsteadOf to handle multiple stringsDan Willemsen2014-03-061-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | For complex .gitconfig url rewrites, multiple insteadOf lines may be used for a url. Search all of them for the right rewrite. Change-Id: If5e9ecd054e86226924b0baf513801cd57c389cd
* | | | Add --jobs option to forall subcommandTakeshi Kanemoto2014-06-241-113/+177
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Enable '--jobs' ('-j') option in the forall subcommand. For -jn where n > 1, the '-p' option can no longer guarantee the continuity of console output between the project header and the output from the worker process. SIG_INT is sent to all worker processes upon keyboard interrupt (Ctrl+C). Bug: Issue 105 Change-Id: If09afa2ed639d481ede64f28b641dc80d0b89a5c
* | | | Use fetch --unshallow when appropriate.Conley Owens2014-05-091-4/+24
| |_|/ |/| | | | | | | | | | | | | | | | | | | | If a user reinits to a different manifest or the manifest updates so that a project no longer has a fixed depth, we need to use --unshallow when we fetch. Change-Id: I6d3f15e5464b5eaad9205654bc24354947a78aea
* | | Merge "Enable remotes to define their own revision"Conley Owens2014-05-083-9/+28
|\ \ \
| * | | Enable remotes to define their own revisionAnthony King2014-05-073-9/+28
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some projects use multiple remotes. In some cases these remotes have different naming conventions. Add an option to define a revision in the remote configuration. The `project` revision takes precedence over `remote` and `default`. The `remote` revision takes precedence over `default`. The `default` revision acts as a fall back as it originally did. Change-Id: I2b376160d45d48b0bab840c02a3eef1a1e32cf6d
* | | 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