gclient previously used a CIPD root per DEPS file. This didn't work
in cases in which a DEPS file wanted to specify a CIPD package outside
of its directory hierarchy, though, as is the case with buildspecs.
Bug: 755920
Change-Id: I0d6c3db567f17f9171c0feaaf9ed6bc64db22757
Reviewed-on: https://chromium-review.googlesource.com/955933
Commit-Queue: John Budorick <jbudorick@chromium.org>
Reviewed-by: Aaron Gable <agable@chromium.org>
Reviewed-by: Michael Moss <mmoss@chromium.org>
When someone runs "gclient diff", they expect to be diffing their
local state against the state of a clean gclient checkout.
Up until now, "gclient diff" has been doing... not that. It's been
assuming that the sha1 in DEPS is approximately the head of the
remote's master branch, finding the merge-base between the local
content and that remote master, and diffing against that merge-base.
This makes basically no sense in the context of gclient. With
gclient, we already know exactly what should be checked out: it's
whatever is in DEPS.
This CL updates the behavior of "gclient diff" to do the right thing.
Bug: 731701
Change-Id: I23a43cbc0d6bc7772495097ff615d4d070f5ad19
Reviewed-on: https://chromium-review.googlesource.com/914717
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Commit-Queue: Aaron Gable <agable@chromium.org>
This will allow us to show the progress when cloning a new repo when running
commands like gclient sync.
R=agable@chromium.org
Bug: 722686
Change-Id: I268cba343ea4c3c024292c9341d5009aa112b184
Reviewed-on: https://chromium-review.googlesource.com/890524
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
Reviewed-by: Aaron Gable <agable@chromium.org>
This includes a minor refactor so that some gclient_scm methods
can all share the same core.quotePath specifier.
R=iannucci
Bug: 792302
Change-Id: Iaadf190f5c0666787cf7c2ccda88d6dba9aace9b
Reviewed-on: https://chromium-review.googlesource.com/823131
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Commit-Queue: Aaron Gable <agable@chromium.org>
This is a reland of 9219d35688
The original was reverted due to a typo (core,quotePath instead
of core.quotePath). This version is fixed.
Original change's description:
> Use core.quotePath=false when git is listing files
>
> This prevents git from putting quotes around some file names
> (those that have astral-plane characters) and not around others.
>
> R=maruel
>
> Bug: 792302
>
> Change-Id: I3b6a6b36c4720116de811b40177b59aa25c263db
> Reviewed-on: https://chromium-review.googlesource.com/815454
> Commit-Queue: Aaron Gable <agable@chromium.org>
> Reviewed-by: Marc-Antoine Ruel <maruel@chromium.org>
Bug: 792302
Recipe-Nontrivial-Roll: build
Recipe-Nontrivial-Roll: build_limited_scripts_slave
Change-Id: I28d2260948aaf63bd865888c2f60e4cdee9aea48
Reviewed-on: https://chromium-review.googlesource.com/822990
Commit-Queue: Aaron Gable <agable@chromium.org>
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
This reverts commit 9219d35688.
Reason for revert: unfortunately this says "core,quotePath" and since it includes recipe changes, we need something that the roller can munch on :(
Original change's description:
> Use core.quotePath=false when git is listing files
>
> This prevents git from putting quotes around some file names
> (those that have astral-plane characters) and not around others.
>
> R=maruel
>
> Bug: 792302
> Recipe-Nontrivial-Roll: build
> Recipe-Nontrivial-Roll: build_limited_scripts_slave
> Change-Id: I3b6a6b36c4720116de811b40177b59aa25c263db
> Reviewed-on: https://chromium-review.googlesource.com/815454
> Commit-Queue: Aaron Gable <agable@chromium.org>
> Reviewed-by: Marc-Antoine Ruel <maruel@chromium.org>
TBR=maruel@chromium.org,agable@chromium.org
Change-Id: I226388f19024403240a1443eb2b878b9293220e1
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 792302
Reviewed-on: https://chromium-review.googlesource.com/821671
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Commit-Queue: Robbie Iannucci <iannucci@chromium.org>
This prevents git from putting quotes around some file names
(those that have astral-plane characters) and not around others.
R=maruel
Bug: 792302
Recipe-Nontrivial-Roll: build
Recipe-Nontrivial-Roll: build_limited_scripts_slave
Change-Id: I3b6a6b36c4720116de811b40177b59aa25c263db
Reviewed-on: https://chromium-review.googlesource.com/815454
Commit-Queue: Aaron Gable <agable@chromium.org>
Reviewed-by: Marc-Antoine Ruel <maruel@chromium.org>
Tested end-to-end, for example
https://ci.chromium.org/swarming/task/3a0147207378b910
which contains:
src/media/cdm/api (Elapsed: 0:00:01)
----------------------------------------
[0:00:00] Started.
_____ src\media\cdm\api at ea5df8e78fbd0a4c24cc3a1f3faefefcd1b45237
[0:00:00] running "git cat-file -e ea5df8e78fbd0a4c24cc3a1f3faefefcd1b45237" in "e:\b\s\w\ir\cache\git\chromium.googlesource.com-chromium-cdm"
skipping mirror update, it has rev=ea5df8e78fbd0a4c24cc3a1f3faefefcd1b45237 already
thereby saving on needless git fetch (~40s in glcient sync on win trybots),
and reducing the rate of .pack file accumulation inside cache directories.
Risks: silently broken recipes which run gclient sync (or worse, bot_update)
as a means of fetching latest commits in all repos of a solution. I think
the benefit of faster bot_update in chromium CQ is worth the potential risk.
PSA: https://groups.google.com/a/chromium.org/d/msg/infra-dev/UYLdBwAXm1Y/OV9QB6JnBQAJ
Bug: 749709
Change-Id: I7a9e8ab82a5e2b848e450f19a798ac18a0b5e201
Reviewed-on: https://chromium-review.googlesource.com/787331
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
These aren't in use, and the original problem they were
meant to solve has been solved at the gclient.py layer
using resource locking:
https://codereview.chromium.org/2049583003
Bug: 773008
Change-Id: I6609f39d7f15604e0bb3d742a41c4f9fec87a57a
Reviewed-on: https://chromium-review.googlesource.com/707728
Reviewed-by: Aaron Gable <agable@chromium.org>
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Commit-Queue: Ryan Tseng <hinoka@chromium.org>
This affects a bunch of files, but only changes comments,
and shouldn't make any difference to behavior.
The purpose is to slightly improve readability of pylint
disable comments.
Change-Id: Ic6cd0f8de792b31d91c6125f6da2616450b30f11
Reviewed-on: https://chromium-review.googlesource.com/420412
Reviewed-by: Aaron Gable <agable@chromium.org>
Commit-Queue: Quinten Yearsley <qyearsley@chromium.org>
Reason for revert:
https://codereview.chromium.org/2444403003/ makes this pretty redundant. Reverting this.
Original issue's description:
> Call status before reset in gclient sync.
>
> Calling status before reset will ensure files that have no been changed do not
> get deleted by reset --hard.
>
> BUG=642711
>
> Committed: d74a7b4c14
TBR=sdefresne@chromium.org,maruel@chromium.org,dpranke@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=642711
Review-Url: https://codereview.chromium.org/2453083002
Calling status before reset will ensure files that have no been changed do not
get deleted by reset --hard.
BUG=642711
Review-Url: https://codereview.chromium.org/2447813003
This removes SVN support (most notably the SVNWrapper class, and the git-svn
logic in GitWrapper.GetUsableRev) from gclient_scm. It also removes some
references to SVN from comments in gclient_utils.
R=maruel@chromium.org
BUG=641588
Review-Url: https://chromiumcodereview.appspot.com/2393773003
Reason for revert:
Didn't help.
Original issue's description:
> gclient: kill git fetch operation that hangs.
>
> This provides env variable GCLIENT_KILL_GIT_FETCH_AFTER
> that kills git fetch if it produces no output for that
> many seconds.
>
> Note that this is not final patch, but an experiment.
> See http://crbug.com/635641#c24 for the deployment plan.
>
> BUG=635641
> R=hinoka@chromium.org
>
> Committed: f8757b7e02
TBR=hinoka@chromium.org,hinoka@google.com
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=635641
Review-Url: https://codereview.chromium.org/2410853002
It might be the case for some repositories that there is no merge base
between the current git HEAD and origin/master, which causes git
merge-base to exit with a non-zero code and cause calls to gclient
status/diff/pack to fail, as well as gclient sync if the repository in
question has been removed from DEPS.
This is true for the external/webrtc/trunk/talk repository, for example.
Its recent release branches (branch-heads/45 all the way to /53 at
least) have no ancestry shared with its master branch, so gclient
sync'ing from a Chromium M51 checkout to an M52 one (where it's no
longer in DEPS) fails because of the failed git merge-base calls.
We now ignore failures and just don't specify a merge base when calling
"git diff".
BUG=633962
R=iannucci@chromium.org,agable@chromium.org,maruel@chromium.org
Review-Url: https://codereview.chromium.org/2215673002
BUG=591814
TEST=gclient sync prints the correct report locally
when config is wrong.
Review-Url: https://codereview.chromium.org/2018803002
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@300671 0039d316-1c4b-4281-b951-d872f2087c98
This reverts commit 3f0dacf095.
Reason for revert:
Is causing staged changes to be reverted.
BUG=607913
TBR=hinoka,dnj
Review URL: https://codereview.chromium.org/1983963002 .
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@300598 0039d316-1c4b-4281-b951-d872f2087c98
Instead just do a git checkout --force, since there are some states that reset cannot fix.
BUG=606420
Review URL: https://codereview.chromium.org/1916973002
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@300176 0039d316-1c4b-4281-b951-d872f2087c98
This will clean up index.lock and refs/heads/master.lock-style locks when
invoked as part of the update_scripts step on the bots.
R=dpranke@chromium.org, estaab@chromium.org, pgervais@chromium.org
BUG=421769
Review URL: https://codereview.chromium.org/1862943002
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@299737 0039d316-1c4b-4281-b951-d872f2087c98
I guess I'm the only developer using git-cache, which is sad.
Hopefully these fixes will make it easier to adapt this to developer
usage some time in the FUTURE.
BUG=583420
TEST=Works for me
R=agable@chromium.org,tandrii@chromium.org
Review URL: https://codereview.chromium.org/1650993005
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@298531 0039d316-1c4b-4281-b951-d872f2087c98
Consider an SVN repo which was mirrored to git by git_updater. When SVN repo is migrated to github, the git histories of chromium mirror and new github one are different. As a result, hashes of the objects do not match.
Before, gclient would just get stuck at trying to fetch the repo after changing its remote url with errors like this:
...
[0:01:21] error: refs/heads/master does not point to a valid object!
[0:01:21] error: refs/remotes/origin/HEAD does not point to a valid object!
[0:01:21] error: refs/remotes/origin/master does not point to a valid object!
[0:01:21] error: refs/heads/master does not point to a valid object!
[0:01:21] error: refs/remotes/origin/HEAD does not point to a valid object!
[0:01:21] error: refs/remotes/origin/master does not point to a valid object!
[0:01:21] fatal: bad object HEAD
[0:01:21] error: /b/git-cache/chromium.googlesource.com-external-github.com-google-open--vcdiff did not send all necessary objects
The solution is to notice such state, delete the .git folder, and clone again.
BUG=523239
R=akuegel@chromium.org
Review URL: https://codereview.chromium.org/1303293002
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@296417 0039d316-1c4b-4281-b951-d872f2087c98
Also removed part of the message that encourages users to disable updates to
depot_tools. If the users do not enable updates, it prevents landing changes into
project repositories that depend on having latest version of the depot_tools, e.g.
https://codereview.chromium.org/1152823005/.
R=akuegel@chromium.org
TBR=maruel@chromium.org, iannucci@chromium.org
BUG=475320
Review URL: https://codereview.chromium.org/1162153004
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@295486 0039d316-1c4b-4281-b951-d872f2087c98
Include links to the tracking bug and to request creating git repositories. Also
include note how to keep subversion support, if users require this.
It won't warn when git-svn clones are used.
There is no functional change except printing a warning to stderr.
Remove stale code. The CHROMIUM_SRC_URL variable is also defined in gclient.py
so it looks like a copy-paste error.
R=iannucci@chromium.org
BUG=475320
Review URL: https://codereview.chromium.org/1154173003
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@295478 0039d316-1c4b-4281-b951-d872f2087c98
crrev.com/348703002 has introduced some code into gclient_scm.py which
disables the .git/hooks when gclient is running in managed mode.
The disabling logic renames the individual hook files to hook.disabled
using os.rename. Conversely to what happen on Posix OSs, on Windows
os.rename does not have atomic rename semantics [1] and it fails if the
destination file already exists.
This change improves the hook disable logic.
[1] See https://bugs.python.org/issue8828 and os.replace in Python 3
BUG=474218
Review URL: https://codereview.chromium.org/1063973002
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@294715 0039d316-1c4b-4281-b951-d872f2087c98