Commit Graph

1070 Commits (43906384aa4afb45703b75eecd771253d588f042)

Author SHA1 Message Date
martiniss@chromium.org d6648e2d3a git_cl: Add the ability to set the description. (reland)
BUG=607359

Review-Url: https://codereview.chromium.org/1935653002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@300366 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
martiniss@chromium.org 611cd7ab02 Revert of git_cl: Add the ability to set the description. (patchset #3 id:40001 of https://codereview.chromium.org/1922133006/ )
Reason for revert:
splitlines man

Original issue's description:
> git_cl: Add the ability to set the description.
> 
> BUG=607359
> 
> Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=300357

TBR=iannucci@chromium.org,tandrii@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=607359

Review-Url: https://codereview.chromium.org/1935633002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@300360 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
martiniss@chromium.org b73176a772 git_cl: Add the ability to set the description.
BUG=607359

Review-Url: https://codereview.chromium.org/1922133006

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@300357 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
tandrii@chromium.org 37b07a78ee Reland Implement owners check in presubmit for Gerrit.
R=machenbach@chromium.org,phajdan.jr@chromium.org
BUG=605563

Review-Url: https://codereview.chromium.org/1927773002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@300353 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
tandrii@chromium.org 83b1b238c6 Revert of Implement owners check in presubmit for Gerrit. (patchset #5 id:80001 of https://codereview.chromium.org/1927773002/ )
Reason for revert:
now it doesn't work for gerrit. Damn it.

Original issue's description:
> Implement owners check in presubmit for Gerrit.
> 
> R=machenbach@chromium.org,phajdan.jr@chromium.org
> BUG=605563
> 
> Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=300350

TBR=machenbach@chromium.org,phajdan.jr@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=605563

Review-Url: https://codereview.chromium.org/1935563002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@300352 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
tandrii@chromium.org b4cd1960d5 Implement owners check in presubmit for Gerrit.
R=machenbach@chromium.org,phajdan.jr@chromium.org
BUG=605563

Review-Url: https://codereview.chromium.org/1927773002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@300350 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
machenbach@chromium.org 6996a10666 Revert of Implement owners check in presubmit for Gerrit. (patchset #3 id:40001 of https://codereview.chromium.org/1927773002/ )
Reason for revert:
Breaks presubmit:
https://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/175120/steps/presubmit/logs/stdio

Original issue's description:
> Implement owners check in presubmit for Gerrit.
> 
> R=machenbach@chromium.org,phajdan.jr@chromium.org
> BUG=605563
> 
> Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=300320

TBR=phajdan.jr@chromium.org,tandrii@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=605563

Review-Url: https://codereview.chromium.org/1928343002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@300326 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
tandrii@chromium.org f48a375153 Implement owners check in presubmit for Gerrit.
R=machenbach@chromium.org,phajdan.jr@chromium.org
BUG=605563

Review-Url: https://codereview.chromium.org/1927773002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@300320 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
martiniss@chromium.org 242de27df2 Revert of Add ability to override DEPS file in recursedeps. (patchset #1 id:1 of https://codereview.chromium.org/1919103003/ )
Reason for revert:
Looks like this broke some bots; see https://build.chromium.org/p/chromium.infra.cron/builders/recipe-autoroller-public/builds/2960

https://build.chromium.org/p/chromium.infra.cron/builders/gsubtreed-luci-py/builds/52912

Original issue's description:
> Add ability to override DEPS file in recursedeps.
> 
> This will allow ANGLE to have a recursible deps-file in their repo instead of
> relying on chromium's DEPS file to specify an accurate dependency for itself.
> 
> R=agable@chromium.org, jmadill@chromium.org
> BUG=
> 
> Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=300293

TBR=agable@chromium.org,dpranke@chromium.org,jmadill@chromium.org,iannucci@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=

Review-Url: https://codereview.chromium.org/1932063002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@300304 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
iannucci@chromium.org c38fd01b2f Add ability to override DEPS file in recursedeps.
This will allow ANGLE to have a recursible deps-file in their repo instead of
relying on chromium's DEPS file to specify an accurate dependency for itself.

R=agable@chromium.org, jmadill@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/1919103003

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@300293 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
tandrii@chromium.org 9dea2ac16f Remove manual check using Rietveld for dry run.
It's now passed using command line flags.

This depends on https://codereview.chromium.org/1931633002,
which actually uses this command line flag.

R=sergiyb@chromium.org,phajdan.jr@chromium.org
BUG=601128

Review-Url: https://codereview.chromium.org/1929653002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@300268 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
tandrii@chromium.org 57bafac9aa Add --dry_run to presubmit_support.
Also, implement skipping of CheckOwners presumbit canned check. To be used by run_presubmit recipe in build repo in 
https://codereview.chromium.org/1931633002

R=sergiyb@chromium.org,phajdan.jr@chromium.org,machenbach@chromium.org
BUG=594127

Review-Url: https://codereview.chromium.org/1923623004

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@300262 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
martiniss@chromium.org 2b55fe30e6 git_cl: description fetching from code review servers.
BUG=

Review URL: https://codereview.chromium.org/1901733003

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@300207 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
tandrii@chromium.org 015ebae720 Add basic Gerrit support for presubmit_support.
R=andybons@chromium.org,scottmg@chromium.org
BUG=605563

Review URL: https://codereview.chromium.org/1915153003

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@300164 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
tandrii@chromium.org 0b2d70724f Gerrit git cl: temporary disable cc option on upload.
Gerrit doesn't allow arbitrary non-member emails for now,
thus removign this feature until either Gerrit allows it,
or we have a per-repo opt-in way.

TBR=andybons@chromium.org
BUG=604377

Review URL: https://codereview.chromium.org/1895863002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@299988 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
shinyak@chromium.org 00dbccdcef Use hyphen for gerrit.skip-ensure-authenticated
git config key should consist of alphanumeric characters and '-'.
The underscore '_' is not allowed. So we're getting 'invalid key' error
when GERRIT_SKIP_ENSURE_AUTHENTICATED is set.

Let's use '-' instead of '_'.

BUG=603378

Review URL: https://codereview.chromium.org/1882833005

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@299952 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
tandrii@chromium.org 2825353c97 Allow to skip EnsureAuthenticated for Gerrit.
Adding this line to codereview.settings should do the trick:
  GERRIT_SKIP_ENSURE_AUTHENTICATED: true

And I also cleaned up tests so they don't spill too much to stdout.

BUG=603378
R=machenbach@chromium.org,andybons@chromium.org
CC=shinyak@chromium.org

Review URL: https://codereview.chromium.org/1884173003

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@299926 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
tandrii@chromium.org 1a8ef44ce2 Followup for git cl set-commit tests.
Based on review of https://codereview.chromium.org/1889483002.

R=sergiyb@chromium.org
BUG=599931

Review URL: https://codereview.chromium.org/1885963002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@299905 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
tandrii@chromium.org dde6462520 git cl: add --gerrit and --rietveld options to force codereview.
This makes it possible to override the codereview set in:
 * repository codereview.settings
 * cached/set in local .git/config, either repo-wide or
   current branch only.

Examples:

    cd $SOME_RIETVELD_USING_REPO
    # Enable Gerrit codereview on it. Contact Infra-Git admin:
    # https://bugs.chromium.org/p/chromium/issues/entry?template=Infra-Git

    # Uploading
    git cl upload --gerrit --squash
    # Hack, hack, re-upload uses Gerrit automatically.
    git cl upload --squash

    # Patching
    git new-branch patched-in-issue
    git cl patch --gerrit XXXXXX

    # (Re-)setting issue
    git cl issue --gerrit 0
    git cl issue --gerrit XXXXXX

R=andybons@chromium.org,sergiyb@chromium.org
BUG=598681

Review URL: https://codereview.chromium.org/1880243003

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@299901 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
tandrii@chromium.org fa330e8012 git cl set-commit: for Gerrit + dry-run support.
This provides workaround for not functioning git cl try.

R=sergiyb@chromium.org,andybons@chromium.org,phajdan.jr@chromium.org
BUG=599931

Review URL: https://codereview.chromium.org/1889483002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@299900 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
tandrii@chromium.org 8acd833e45 Gerrit git cl upload: implement setting cc and reviewers.
R=machenbach@chromium.org,andybons@chromium.org
BUG=323819

Review URL: https://codereview.chromium.org/1885883002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@299887 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
tandrii@chromium.org bf766ba3d3 Gerrit git cl upload: implement patchset title (message).
R=machenbach@chromium.org,andybons@chromium.org
BUG=579178

Review URL: https://codereview.chromium.org/1886433003

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@299886 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
tandrii@chromium.org fe30f18fc5 Gerrit git cl upload: add check for missing credentials.
Checks creds before uploading and running presubmit, generalizing
the case of Rietveld. If they are missing, suggests a URL to
generate them.

R=andybons@chromium.org,phajdan.jr@chromium.org
BUG=583153

Review URL: https://codereview.chromium.org/1882583003

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@299883 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
tandrii@chromium.org 26c8fd2b1a Fix git cl checkout when no branch has issues.
TBR=machenbach@chromium.org
BUG=579182

Review URL: https://codereview.chromium.org/1878613003

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@299843 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
tandrii@chromium.org 5df290f6af git cl checkout: implement for Gerrit + add test.
R=sergiyb@chromium.org,andybons@chromium.org
BUG=579182

Review URL: https://codereview.chromium.org/1873233002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@299833 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
iannucci@chromium.org 30a07987c2 Revert of Revert "Add (another) argument to break git locks in gclient." (patchset #1 id:1 of https://codereview.chromium.org/1865403003/ )
Reason for revert:
This revert breaks /everything/

Original issue's description:
> Revert "Add (another) argument to break git locks in gclient."
> 
> This reverts commit 51797b1d8f.
> 
> BUG=601564
> TBR=iannucci,dpranke,estaab,pgervais
> 
> Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=299771

TBR=dpranke@google.com,estaab@chromium.org,pgervais@chromium.org,smut@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=601564

Review URL: https://codereview.chromium.org/1867843003

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@299773 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
smut@google.com 66f23f3eb1 Revert "Add (another) argument to break git locks in gclient."
This reverts commit 51797b1d8f.

BUG=601564
TBR=iannucci,dpranke,estaab,pgervais

Review URL: https://codereview.chromium.org/1865403003 .

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@299771 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
iannucci@chromium.org 51797b1d8f Add (another) argument to break git locks in gclient.
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
9 years ago
tandrii@chromium.org f86c7d3500 Reland of Gerrit git cl: implement git cl patch. (patchset #1 id:1 of https://codereview.chromium.org/1848393002/ )
Reason for revert:
nope, the windows breakage is due to apply_issue failing to connect to Rietveld.

Original issue's description:
> Revert of Gerrit git cl: implement git cl patch. (patchset #7 id:120001 of https://codereview.chromium.org/1852593002/ )
> 
> Reason for revert:
> just in case.
> 
> Original issue's description:
> > Gerrit git cl: implement git cl patch.
> > 
> > BUG=579182
> > 
> > Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=299644
> 
> TBR=andybons@chromium.org
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=579182
> 
> Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=299645

TBR=andybons@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=579182

Review URL: https://codereview.chromium.org/1852803002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@299647 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
tandrii@chromium.org e0a10585da Revert of Gerrit git cl: implement git cl patch. (patchset #7 id:120001 of https://codereview.chromium.org/1852593002/ )
Reason for revert:
just in case.

Original issue's description:
> Gerrit git cl: implement git cl patch.
> 
> BUG=579182
> 
> Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=299644

TBR=andybons@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=579182

Review URL: https://codereview.chromium.org/1848393002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@299645 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
tandrii@chromium.org cc0856a314 Gerrit git cl: implement git cl patch.
BUG=579182

Review URL: https://codereview.chromium.org/1852593002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@299644 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
tandrii@chromium.org 4c72b08fce Gerrit git cl: do per CL check for Gerrit, not repo-wide.
The purpose is to allow mixed usage of Rietveld/Gerrit in the same repo.
There, a branch can use Gerrit, even though repo's default is Rietveld.
The only remaining repo-wide check GetIsGerrit is to determine codereview
for a branch which has no uploads yet.

This also simplifies future test expectations.

R=andybons@chromium.org,bauerb@chromium.org
BUG=598681

Review URL: https://codereview.chromium.org/1851663002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@299603 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
tandrii@chromium.org 512d79cd3d Gerrit git cl: stop creating a shadow branch.
R=bauerb@chromium.org,ukai@chromium.org,iannucci@chromium.org
BUG=579175,580136

Review URL: https://codereview.chromium.org/1835963003

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@299587 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
tandrii@chromium.org aa5ced1815 git cl: Rework Changelist class for Rietveld/Gerrit use.
This adds pluggable codereview-specific implementations into
Changelist class. The specific implementation is chosen at
Changelist automatically, with Rietveld being default for
backwards compatibility.

Gerrit implementation for Gerrit is incomplete, and will be
added in later CLs. However, it is sufficient to ensure
current functionality of this tool is not diminished.

Sadly, the base class isn't completely free from Rietveld
assumptions because of presubmit_support. Apparently, PRESUBMIT
scripts can make use of Rietveld instance for RPCs directly.
This use doesn't make sense for Gerrit, which substitutes
rietveld instance with a dummy object, which raises exception
on any attribute access with a diagnostic message.

This also includes refactoring of some related code which
(ab)used ChangeList. Overall, this CL adds a few extra call to
git config in order to determine which codereview to use, but
but it shouldn't have any performance impact.

These is a reland of these 4 CLs + with several fixes.
patch from issue 1827523003 at patchset 20001 (http://crrev.com/1827523003#ps20001)
patch from issue 1830703004 at patchset 1 (http://crrev.com/1830703004#ps1)
patch from issue 1830923002 at patchset 60001 (http://crrev.com/1830923002#ps60001)
patch from issue 1805193002 at patchset 380001 (http://crrev.com/1805193002#ps380001)

This CL without a fix was also committed and reverted as
patch from issue 1830973003 at patchset 40001 (http://crrev.com/1830973003#ps40001)

R=machenbach@chromium.org,sergiyb@chromium.org,andybons@chromium.org
BUG=579160,597638

Review URL: https://codereview.chromium.org/1838143002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@299530 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
tandrii@chromium.org fa3fb615a2 Revert of git cl: Rework Changelist class for Rietveld/Gerrit use. (patchset #1 id:1 of https://codereview.chromium.org/1844523002/ )
Reason for revert:
argh, CQ is way too quick.

Original issue's description:
> Reland of git cl: Rework Changelist class for Rietveld/Gerrit use. (patchset #1 id:1 of https://codereview.chromium.org/1840833002/ )
> 
> Reason for revert:
> with a fix.
> 
> Original issue's description:
> > Revert of git cl: Rework Changelist class for Rietveld/Gerrit use. (patchset #3 id:40001 of https://codereview.chromium.org/1830973003/ )
> > 
> > Reason for revert:
> > Speculative revert, see crbug.com/598428.
> > 
> > Original issue's description:
> > > git cl: Rework Changelist class for Rietveld/Gerrit use.
> > > 
> > > This adds pluggable codereview-specific implementations into
> > > Changelist class. The specific implementation is chosen at
> > > Changelist automatically, with Rietveld being default for
> > > backwards compatibility.
> > > 
> > > Gerrit implementation for Gerrit is incomplete, and will be
> > > added in later CLs. However, it is sufficient to ensure
> > > current functionality of this tool is not diminished.
> > > 
> > > Sadly, the base class isn't completely free from Rietveld
> > > assumptions because of presubmit_support. Apparently, PRESUBMIT
> > > scripts can make use of Rietveld instance for RPCs directly.
> > > This use doesn't make sense for Gerrit, which substitutes
> > > rietveld instance with a dummy object, which raises exception
> > > on any attribute access with a diagnostic message.
> > > 
> > > This also includes refactoring of some related code which
> > > (ab)used ChangeList. Overall, this CL adds a few extra call to
> > > git config in order to determine which codereview to use, but
> > > but it shouldn't have any performance impact.
> > > 
> > > 
> > > 
> > > These is a reland of these 4 CLs + a fix.
> > > patch from issue 1827523003 at patchset 20001 (http://crrev.com/1827523003#ps20001)
> > > patch from issue 1830703004 at patchset 1 (http://crrev.com/1830703004#ps1)
> > > patch from issue 1830923002 at patchset 60001 (http://crrev.com/1830923002#ps60001)
> > > patch from issue 1805193002 at patchset 380001 (http://crrev.com/1805193002#ps380001)
> > > 
> > > 
> > > 
> > > R=machenbach@chromium.org,sergiyb@chromium.org,andybons@chromium.org
> > > BUG=579160,597638
> > > 
> > > Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=299506
> > 
> > TBR=andybons@chromium.org,machenbach@chromium.org,sergiyb@chromium.org,tandrii@chromium.org
> > # Skipping CQ checks because original CL landed less than 1 days ago.
> > NOPRESUBMIT=true
> > NOTREECHECKS=true
> > NOTRY=true
> > BUG=579160,597638
> > 
> > Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=299515
> 
> TBR=andybons@chromium.org,machenbach@chromium.org,sergiyb@chromium.org,dnj@chromium.org
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=579160,597638
> 
> Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=299528

TBR=andybons@chromium.org,machenbach@chromium.org,sergiyb@chromium.org,dnj@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=579160,597638

Review URL: https://codereview.chromium.org/1839973002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@299529 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
tandrii@chromium.org 278a25d2f1 Reland of git cl: Rework Changelist class for Rietveld/Gerrit use. (patchset #1 id:1 of https://codereview.chromium.org/1840833002/ )
Reason for revert:
with a fix.

Original issue's description:
> Revert of git cl: Rework Changelist class for Rietveld/Gerrit use. (patchset #3 id:40001 of https://codereview.chromium.org/1830973003/ )
> 
> Reason for revert:
> Speculative revert, see crbug.com/598428.
> 
> Original issue's description:
> > git cl: Rework Changelist class for Rietveld/Gerrit use.
> > 
> > This adds pluggable codereview-specific implementations into
> > Changelist class. The specific implementation is chosen at
> > Changelist automatically, with Rietveld being default for
> > backwards compatibility.
> > 
> > Gerrit implementation for Gerrit is incomplete, and will be
> > added in later CLs. However, it is sufficient to ensure
> > current functionality of this tool is not diminished.
> > 
> > Sadly, the base class isn't completely free from Rietveld
> > assumptions because of presubmit_support. Apparently, PRESUBMIT
> > scripts can make use of Rietveld instance for RPCs directly.
> > This use doesn't make sense for Gerrit, which substitutes
> > rietveld instance with a dummy object, which raises exception
> > on any attribute access with a diagnostic message.
> > 
> > This also includes refactoring of some related code which
> > (ab)used ChangeList. Overall, this CL adds a few extra call to
> > git config in order to determine which codereview to use, but
> > but it shouldn't have any performance impact.
> > 
> > 
> > 
> > These is a reland of these 4 CLs + a fix.
> > patch from issue 1827523003 at patchset 20001 (http://crrev.com/1827523003#ps20001)
> > patch from issue 1830703004 at patchset 1 (http://crrev.com/1830703004#ps1)
> > patch from issue 1830923002 at patchset 60001 (http://crrev.com/1830923002#ps60001)
> > patch from issue 1805193002 at patchset 380001 (http://crrev.com/1805193002#ps380001)
> > 
> > 
> > 
> > R=machenbach@chromium.org,sergiyb@chromium.org,andybons@chromium.org
> > BUG=579160,597638
> > 
> > Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=299506
> 
> TBR=andybons@chromium.org,machenbach@chromium.org,sergiyb@chromium.org,tandrii@chromium.org
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=579160,597638
> 
> Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=299515

TBR=andybons@chromium.org,machenbach@chromium.org,sergiyb@chromium.org,dnj@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=579160,597638

Review URL: https://codereview.chromium.org/1844523002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@299528 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
dnj@chromium.org f585b1f850 Revert of git cl: Rework Changelist class for Rietveld/Gerrit use. (patchset #3 id:40001 of https://codereview.chromium.org/1830973003/ )
Reason for revert:
Speculative revert, see crbug.com/598428.

Original issue's description:
> git cl: Rework Changelist class for Rietveld/Gerrit use.
> 
> This adds pluggable codereview-specific implementations into
> Changelist class. The specific implementation is chosen at
> Changelist automatically, with Rietveld being default for
> backwards compatibility.
> 
> Gerrit implementation for Gerrit is incomplete, and will be
> added in later CLs. However, it is sufficient to ensure
> current functionality of this tool is not diminished.
> 
> Sadly, the base class isn't completely free from Rietveld
> assumptions because of presubmit_support. Apparently, PRESUBMIT
> scripts can make use of Rietveld instance for RPCs directly.
> This use doesn't make sense for Gerrit, which substitutes
> rietveld instance with a dummy object, which raises exception
> on any attribute access with a diagnostic message.
> 
> This also includes refactoring of some related code which
> (ab)used ChangeList. Overall, this CL adds a few extra call to
> git config in order to determine which codereview to use, but
> but it shouldn't have any performance impact.
> 
> 
> 
> These is a reland of these 4 CLs + a fix.
> patch from issue 1827523003 at patchset 20001 (http://crrev.com/1827523003#ps20001)
> patch from issue 1830703004 at patchset 1 (http://crrev.com/1830703004#ps1)
> patch from issue 1830923002 at patchset 60001 (http://crrev.com/1830923002#ps60001)
> patch from issue 1805193002 at patchset 380001 (http://crrev.com/1805193002#ps380001)
> 
> 
> 
> R=machenbach@chromium.org,sergiyb@chromium.org,andybons@chromium.org
> BUG=579160,597638
> 
> Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=299506

TBR=andybons@chromium.org,machenbach@chromium.org,sergiyb@chromium.org,tandrii@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=579160,597638

Review URL: https://codereview.chromium.org/1840833002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@299515 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
tandrii@chromium.org 39b24c3a2d git cl: Rework Changelist class for Rietveld/Gerrit use.
This adds pluggable codereview-specific implementations into
Changelist class. The specific implementation is chosen at
Changelist automatically, with Rietveld being default for
backwards compatibility.

Gerrit implementation for Gerrit is incomplete, and will be
added in later CLs. However, it is sufficient to ensure
current functionality of this tool is not diminished.

Sadly, the base class isn't completely free from Rietveld
assumptions because of presubmit_support. Apparently, PRESUBMIT
scripts can make use of Rietveld instance for RPCs directly.
This use doesn't make sense for Gerrit, which substitutes
rietveld instance with a dummy object, which raises exception
on any attribute access with a diagnostic message.

This also includes refactoring of some related code which
(ab)used ChangeList. Overall, this CL adds a few extra call to
git config in order to determine which codereview to use, but
but it shouldn't have any performance impact.



These is a reland of these 4 CLs + a fix.
patch from issue 1827523003 at patchset 20001 (http://crrev.com/1827523003#ps20001)
patch from issue 1830703004 at patchset 1 (http://crrev.com/1830703004#ps1)
patch from issue 1830923002 at patchset 60001 (http://crrev.com/1830923002#ps60001)
patch from issue 1805193002 at patchset 380001 (http://crrev.com/1805193002#ps380001)



R=machenbach@chromium.org,sergiyb@chromium.org,andybons@chromium.org
BUG=579160,597638

Review URL: https://codereview.chromium.org/1830973003

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@299506 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
tandrii@chromium.org 87985d2a9a Revert of git cl: Rework Changelist class for Rietveld/Gerrit use. (patchset #8 id:380001 of https://codereview.chromium.org/1805193002/ )
Reason for revert:
Broke one project presubmit.

Original issue's description:
> git cl: Rework Changelist class for Rietveld/Gerrit use.
> 
> This adds pluggable codereview-specific implementations into
> Changelist class. The specific implementation is chosen at
> Changelist automatically, with Rietveld being default for
> backwards compatibility.
> 
> Gerrit implementation for Gerrit is incomplete, and will be
> added in later CLs. However, it is sufficient to ensure
> current functionality of this tool is not diminished.
> 
> Sadly, the base class isn't completely free from Rietveld
> assumptions because of presubmit_support. Apparently, PRESUBMIT 
> scripts can make use of Rietveld instance for RPCs directly.
> This use doesn't make sense for Gerrit, which substitutes
> rietveld instance with a dummy object, which raises exception
> on any attribute access with a diagnostic message.
> 
> This also includes refactoring of some related code which
> (ab)used ChangeList. Overall, this CL adds a few extra call to
> git config in order to determine which codereview to use, but
> but it shouldn't have any performance impact.
> 
> 
> BUG=579160
> 
> Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=299462

TBR=phajdan.jr@chromium.org,andybons@chromium.org,machenbach@chromium.org,sergiyb@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=579160,597638

Review URL: https://codereview.chromium.org/1831813003

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@299476 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
tandrii@chromium.org c4a945495d Revert of git cl: refactor Changelist codereview detection. (patchset #4 id:60001 of https://codereview.chromium.org/1830923002/ )
Reason for revert:
broke presubmit

Original issue's description:
> git cl: refactor Changelist codereview detection.
> 
> BUG=579160
> 
> Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=299464

TBR=sergiyb@chromium.org,machenbach@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=579160,597638

Review URL: https://codereview.chromium.org/1826203003

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@299475 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
tandrii@chromium.org c24bb3b7d7 git cl: refactor Changelist codereview detection.
BUG=579160

Review URL: https://codereview.chromium.org/1830923002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@299464 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
tandrii@chromium.org e044c81799 git cl: Rework Changelist class for Rietveld/Gerrit use.
This adds pluggable codereview-specific implementations into
Changelist class. The specific implementation is chosen at
Changelist automatically, with Rietveld being default for
backwards compatibility.

Gerrit implementation for Gerrit is incomplete, and will be
added in later CLs. However, it is sufficient to ensure
current functionality of this tool is not diminished.

Sadly, the base class isn't completely free from Rietveld
assumptions because of presubmit_support. Apparently, PRESUBMIT 
scripts can make use of Rietveld instance for RPCs directly.
This use doesn't make sense for Gerrit, which substitutes
rietveld instance with a dummy object, which raises exception
on any attribute access with a diagnostic message.

This also includes refactoring of some related code which
(ab)used ChangeList. Overall, this CL adds a few extra call to
git config in order to determine which codereview to use, but
but it shouldn't have any performance impact.


BUG=579160

Review URL: https://codereview.chromium.org/1805193002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@299462 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
tandrii@chromium.org 139595ec3e Gerrit git cl: temporarily disable gerritissue setting.
Reason: it breaks re-upload.

R=andybons@chromium.org,machenbach@chromiu.org,mmentovai@chromium.org
BUG=

Review URL: https://codereview.chromium.org/1810683003

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@299354 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
tandrii@chromium.org 9fc50db2cc Gerrit git cl: fix change-id appending.
Special case when the change description has no footers, but looks
like a footer.

R=machenbach@chromium.org,andybons@chromium.org
BUG=579176

Review URL: https://codereview.chromium.org/1812803002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@299343 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
tandrii@chromium.org a342c92be8 Gerrit git cl upload: record issue id for a branch.
BUG=

Review URL: https://codereview.chromium.org/1777603002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@299312 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
tandrii@chromium.org e7d3d1652c Stop installing Gerrit commit-msg hooks in git cl config.
R=bauerb@chromium.org,ukai@chromium.org,andybons@chromium.org
BUG=579176,579160

Review URL: https://codereview.chromium.org/1799553003

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@299293 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
tandrii@chromium.org 1062500617 git cl: stop downloading Gerrit commit-hook with --squash mode.
BUG=579176

Review URL: https://codereview.chromium.org/1760063002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@299117 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
tandrii@chromium.org 57d8654568 git cl for Gerrit: make --squash generate Change-Id directly.
BUG=579183

Review URL: https://codereview.chromium.org/1763593002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@299107 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
tandrii@chromium.org 09d7a6a817 git cl upload for Gerit no-squash: correct detect missing Change-Id.
BUG=579183

Review URL: https://codereview.chromium.org/1761743002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@299105 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
tandrii@chromium.org 65874e1466 git cl: add python implementation of Change-Id generation.
This allows to generate new IDs on the fly without installing
commit-msg hook and works just fine on Windows.

BUG=579183

Review URL: https://codereview.chromium.org/1757133002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@299094 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
tandrii@chromium.org 3c3c034d82 Add Gerrit's Change-Id handling to git_footers.
This should insert the message according to Gerrit's own commit-msg
hook implementation.

BUG=579183

Review URL: https://codereview.chromium.org/1758943002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@299093 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
mgiuca@chromium.org cd0a1cf362 git hyper-blame: Added automatically ignoring revs from a file.
Added --ignore-file argument, so you can specify ignored commits in a
file rather than as raw command-line arguments. Also, automatically
searches for a file called .git-blame-ignore-revs, which is
automatically used as an ignore list by default.

Also, specifying an unknown revision (either on the command line or in a
file) now generates a warning, not an error.

Notes on some decisions:
- The file is called .git-blame-ignore-revs (not mentioning hyper-blame)
  because we may use the same list in tools other than hyper-blame in
  the future.
- We look at the *currently checked out* version of
  .git-blame-ignore-revs (not the version at the specified revision) for
  consistency with .git-ignore. Because we only expect revisions to be
  added (not deleted), it should be fine to use an ignore list from a
  newer version than the revision being blamed.
- We considered using git notes for the ignore list so that you could
  add a revision to the ignore list without needing a follow-up CL.
  However, there are some problems with this approach. git notes is not
  automatically synced with git clone/pull. Also the Chromium infra
  tools (Reitveld, CQ) are not set up to allow modification of git
  notes, nor are changes to git notes subject to OWNERS checks. Using a
  regular file ensures all users synced to a particular revision are
  using the same ignore list.

BUG=574290

Review URL: https://codereview.chromium.org/1697423004

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@298897 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
bauerb@chromium.org 13502e0fd3 Use %B format instead of %s\n\n%b to get the raw commit message from a hash.
\n doesn't work on Windows, and %B is shorter anyway.

BUG=586344

Review URL: https://codereview.chromium.org/1705193003

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@298845 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
hinoka@google.com 6eb23e25bd Revert of Bot update cleanup (patchset #5 id:80001 of https://codereview.chromium.org/1686273002/ )
Reason for revert:
Separating change into smaller changes.

Original issue's description:
> Bot update cleanup
> 
> * Remove activation check
> * Remove messages
> * Remove deps2git
> * Remove build_internal pointer by:
> ** Moving chrome svn url into bot_update.py (This isn't secret anyways.)
> ** Move patch.exe into depot_tools (No reason this should've been internal...)
> ** Default everything to active, so no need for checks anyways.
> 
> BUG=
> 
> Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=298809

TBR=martiniss@chromium.org,eseidel@chromium.org,estaab@chromium.org,iannucci@chromium.org,hinoka@chromium.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=

Review URL: https://codereview.chromium.org/1706893003

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@298826 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
hinoka@chromium.org b0f36188b2 Bot update cleanup
* Remove activation check
* Remove messages
* Remove deps2git
* Remove build_internal pointer by:
** Moving chrome svn url into bot_update.py (This isn't secret anyways.)
** Move patch.exe into depot_tools (No reason this should've been internal...)
** Default everything to active, so no need for checks anyways.

BUG=

Review URL: https://codereview.chromium.org/1686273002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@298809 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
tandrii@chromium.org 1e67bb7be9 Gerrit git cl: run same post-upload hooks.
R=rmistry@chromium.org,andybons@chromium.org
BUG=

Review URL: https://codereview.chromium.org/1692513002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@298733 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
tandrii@chromium.org dc58a97f02 Finally get rid of depot_tools' breakpad.
Reland of http://crrev.com/1689633002#ps20001 without breaking other
repos by means of keeping breakpad.py importable, but otherwise a no-op.

R=maruel@chromium.org
BUG=585837

Review URL: https://codereview.chromium.org/1687923002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@298731 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
dsansome@chromium.org 1dda36db84 Raise exceptions properly on HTTP errors from OAuthRpcServer (which is only used on bots)
This will hopefully make Rietveld._send retry 500s like it promises to

BUG=585632

Review URL: https://codereview.chromium.org/1681333005

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@298726 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
thakis@chromium.org 5fea38772f Revert of Finally get rid of depot_tools' breakpad. (patchset #2 id:20001 of https://codereview.chromium.org/1689633002/ )
Reason for revert:
All chromium bots depend on this: 

________ running '/usr/bin/python src/build/android/play_services/update.py download' in '/b/build/slave/linux/build'
Traceback (most recent call last):
  File "src/build/android/play_services/update.py", line 29, in <module>
    import find_depot_tools  # pylint: disable=import-error,unused-import
  File "/b/build/slave/linux/build/src/build/find_depot_tools.py", line 49, in <module>
    import breakpad
ImportError: No module named breakpad

https://www.google.com/url?hl=en&q=http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/144739&source=gmail&ust=1455209366639000&usg=AFQjCNH42SEVcJg4J6dX0J9HF0Rcqv81eA

Original issue's description:
> Finally get rid of depot_tools' breakpad.
> 
> R=maruel@chromium.org
> BUG=
> 
> Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=298710

TBR=maruel@chromium.org,tandrii@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=

Review URL: https://codereview.chromium.org/1683173002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@298712 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
tandrii@chromium.org a05c501e6c Finally get rid of depot_tools' breakpad.
R=maruel@chromium.org
BUG=

Review URL: https://codereview.chromium.org/1689633002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@298710 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
dsansome@chromium.org c1eb692f03 Revert "Raise exceptions properly on HTTP errors from OAuthRpcServer (which is only used on bots)"
BUG=585632
TBR=agable

Review URL: https://codereview.chromium.org/1686753003

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@298693 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
dsansome@chromium.org 6fa3c67f7e Raise exceptions properly on HTTP errors from OAuthRpcServer (which is only used on bots)
This will hopefully make Rietveld._send retry 500s like it promises to

BUG=

Review URL: https://codereview.chromium.org/1683603002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@298688 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
mgiuca@chromium.org 01d2cde990 git hyper-blame: Added approx. line number translation.
Previously, when a commit was skipped, it would be blamed on the line
number the line had *after* the skipped commit. This could mean a
totally unrelated commit gets blamed. Now, a heuristic analyses the diff
of the skipped commit to discover approximately what line number the
line had *before* the skipped commit, so it can hopefully be blamed on
the right commit.

BUG=574290

Review URL: https://codereview.chromium.org/1629253002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@298609 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
andybons@chromium.org 962f946973 Abort if a patch set title is provided for a Gerrit server
Gerrit doesn’t support patch titles.

BUG=579178

Review URL: https://codereview.chromium.org/1659633003

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@298573 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
mgiuca@chromium.org 819375653b Added git hyper-blame, a tool that skips unwanted commits in git blame.
Currently, the script requires you to pass the unwanted commits on the
command line, but eventually, you could configure it with a file
(checked into the repo) that provides a fixed set of commits to always
skip (such as commits that do a huge amount of renaming and nothing
else).

BUG=574290

Review URL: https://codereview.chromium.org/1559943003

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@298544 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
andybons@chromium.org 11f46eb416 Remove reference to unused GERRIT_PORT from git_cl_test.py
BUG=579160

Review URL: https://codereview.chromium.org/1656373002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@298525 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
mgiuca@chromium.org d2ef7086bb git_test_utils: Automatic commit dates are now in UTC.
This fixes the test being dependent on the system time, and undefined
behaviour resulting from negative timestamps in positive-offset
timezones.

BUG=581895

Review URL: https://codereview.chromium.org/1640973002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@298438 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
bauerb@chromium.org 54b400c89f Add a setting to squash Gerrit uploads by default, and a --no-squash command line option to override it.
BUG=nope

Review URL: https://codereview.chromium.org/1584703005

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@298260 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
danakj@chromium.org 0ae7122b91 Remove build/c++11 from the set of linter rules ever used.
The checks are not reliable for Rvalue references, and only are
allowing default/deleted constructors. They are based on the google3
internal rules which do not exactly match our own c++11 rules, and
may diverge more over time.

Email thread that led to this change here: https://groups.google.com/a/chromium.org/forum/#!topic/cxx/9TZvt8vyeEM

R=agable@chromium.org

Review URL: https://codereview.chromium.org/1573663003

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@298202 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
luqui@chromium.org 77323d17ce Manual roll of engine, removing coverage threshold!
BUG=
TBR=recipe-roller@chromium.org

Review URL: https://codereview.chromium.org/1498343003

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@297856 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
luqui@chromium.org f7bb4cf047 Set up depot_tools as a recipe package, and add depot_tools recipe module.
This is a good prototypical example of how to do it :-).

TBR for OWNERS change for recipes.cfg.  

BUG=564920
R=iannucci@chromium.org,martiniss@chromium.org
TBR=phajdan.jr@chromium.org

Review URL: https://codereview.chromium.org/1494103004

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@297851 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
iannucci@chromium.org f3e37a0fbb Add better error messages to git_reparent_branch.
R=dhsharp@chromium.org, vadimsh@chromium.org
BUG=538454

Review URL: https://codereview.chromium.org/1498163002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@297848 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
sdefresne@chromium.org d421f6a477 Fix "git rebase-update" when multiple branch are stale.
Fix a bug that left branches tracking a dead branch if both their parent
and grand-parent were left with no changes after a "rebase-update" step.

Given the following initial state:
  $ git map-branches -v
  origin/master
    a
      b
        c *        [ ahead 1 ]

without this patch, a "git rebase-update" on this tree state would
leave the branch "c" as tracking a non-existing branch "a":

  $ git recursive-rebase
  a up-to-date
  b up-to-date
  c up-to-date
  Reparented c to track a (was tracking b)
  Deleted branch b (was 448d1da).
  Deleted branch a (was 448d1da).
  $ git map-branches -v
  {a:GONE}
    c *

with the patch, we record that the branch "c" is tracking must be
updated twice and we end up in a state were "c" is correctly tracking
"origin/master":

  $ git recursive-rebase
  a up-to-date
  b up-to-date
  c up-to-date
  Reparented c to track origin/master (was tracking b)
  Deleted branch b (was 448d1da).
  Deleted branch a (was 448d1da).
  $ git map-branches -v
  origin/master
    c *            [ ahead 1 ]

BUG=456806

Review URL: https://codereview.chromium.org/1482753002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@297792 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
cbentzel@chromium.org 473527c7ea rietveld.py: Change three_state_keys to emit "True" or "False" query params rather than 1/2.
Manually generating param strings shows that the 1/2 values do not work.

Review URL: https://codereview.chromium.org/1482153002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@297732 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
thestig@chromium.org 13ccc77201 Remove unused CheckSvnModifiedDirectories.
Review URL: https://codereview.chromium.org/1435333005

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@297676 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
phajdan.jr@chromium.org e27eb7e62d depot_tools: make CheckLicense warn instead of notify
BUG=553681

Review URL: https://codereview.chromium.org/1449853002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@297563 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
phajdan.jr@chromium.org d965db3047 depot_tools: move some checks from commit to upload
BUG=553681

Review URL: https://codereview.chromium.org/1447463002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@297559 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
iannucci@chromium.org 405b87e91b Revert of git_cl/gclient: use python2 (patchset #3 id:40001 of https://codereview.chromium.org/1437773002/ )
Reason for revert:
breaks git-bash on windows

Original issue's description:
> git_cl/gclient: use python2
> 
> Newer distros are defaulting /usr/bin/python to python3, so use python2
> explicitly so we continue working.
> 
> Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=297535

TBR=stip@chromium.org,sergeyberezin@chromium.org,vapier@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Review URL: https://codereview.chromium.org/1442583004

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@297544 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
vapier@chromium.org b0fe123965 git_cl/gclient: use python2
Newer distros are defaulting /usr/bin/python to python3, so use python2
explicitly so we continue working.

Review URL: https://codereview.chromium.org/1437773002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@297535 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
sammc@chromium.org 8990189aed Support merging with conflicts with git-drover.
Currently, git-drover gives up and cleans up if the cherry-pick fails.
This change allows the user to manually resolve conflicts when using
git-drover.

BUG=404755

Review URL: https://codereview.chromium.org/1397313002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@297429 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
dsansome@chromium.org f4ef3e70dd Retry socket.timeout as well as SSL timeouts (ssl.SSLError is a subclass of socket.error).
To fix this flake:
https://uberchromegw.corp.google.com/i/internal.infra.try/builders/infra-internal-presubmit/builds/1216/steps/bot_update/logs/stdio

BUG=

Review URL: https://codereview.chromium.org/1417963005

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@297234 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
dbeam@chromium.org 5a2af6d9d1 Add long line exception for GEN('#include') in JS browser tests.
It's basically like C++'s #include but in JS.

Why write 1 language when you can write 2?!

R=maruel@chromium.org
BUG=540977

Review URL: https://codereview.chromium.org/1394563003

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@297065 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
sammc@chromium.org 900a33fb4d Add a git-drover.
This uses the same trick as git-new-workdir to reuse an existing git
checkout without interfering with it. However, this makes it only usable
on platforms where os.symlink exists.

BUG=404755

Review URL: https://codereview.chromium.org/1342383002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@296920 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
szager@chromium.org 66c8b850e4 Allow 'git cache fetch' to re-bootstrap.
With this change, 'git cache fetch' will automatically re-bootstrap
a repo from google storage if the local cache has too many pack
files.  The behavior can be disabled with the --no-bootstrap flag.

BUG=

Review URL: https://codereview.chromium.org/1320383004

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@296829 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
dnj@chromium.org 605d81dfb3 gsutil: Parallel-safe, specify target, add clean.
- Update "gsutil.py" to be cooperatively safe when invoked
  multiple times simultaneously.
- Allow the cache directory to be overridden by the
  DEPOT_TOOLS_GSUTIL_BIN_DIR environment variable.
- Add a "--clean" flag to force "gsutil.py" to do a clean download.

BUG=chromium:452497
TEST=local
  - for i in `seq 1 50`; do ./gsutil.py --clean -- version&; done

Review URL: https://codereview.chromium.org/1346213003

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@296772 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
stip@chromium.org 74374f985f Add a --keep-going flag for people who run rebase-update infrequently.
Review URL: https://codereview.chromium.org/1331263002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@296639 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
ricow@chromium.org 92cd7b05d5 Reland 0c7d94eb9d9fa388bda0d74405c0928dceea22ff: Add support for tar.gz archive files to download from download_from_google_storage
I fixed the overlapping argument and fixed up the tests so that the actual sha1 hash is now passed (since the tool actually check now that the downloaded file hash matches)

BUG=
R=hinoka@google.com

Review URL: https://codereview.chromium.org/1285423002 .

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@296346 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
tandrii@chromium.org 41a9ce45ee Fail with user friendly error when no new parent branch is specified.
Before this change, running
$ git reparent-branch
produced stacktrace and
"TypeError: sequence item 4: expected string, NoneType found"

R=iannucci@chromium.org
TEST=manual + unittest + coverage.
BUG=

Review URL: https://codereview.chromium.org/1280633003

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@296235 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
dpranke@chromium.org ee87f587ea Make 'git cl status' report the current branch even if there's no active CL.
TBR=ianh@google.com

Review URL: https://codereview.chromium.org/1263253002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@296187 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
hinoka@chromium.org be46fddf5f Add verification to downloaded files
This does one last check to see if the file downloaded by
download_from_google_storage.py actually matches its sha1

BUG=

Review URL: https://codereview.chromium.org/1252313005

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@296155 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
sergiyb@chromium.org 4b39c5fe44 Add a space before period in review URL
This is needed to ensure that it resolves to a correct URL on Gitiles.

R=maruel@chromium.org, smut@google.com

Review URL: https://codereview.chromium.org/1225713002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@295932 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
iannucci@chromium.org d61a4950b2 Changes to improve multiprocessing PRESUBMIT support in Windows
* make RunTest's multiprocessing.Pool in the constructor of InputApi
    to avoid getting tripped up by chdir manipulation.
  * Don't do the split cyclic-import check when the invoker of the
    Pylint presubmit checks explicitly sends cyclic import check
    parameters via extra_args
  * fix pseudobug where ownership of the files variable was unclear,
    and pass all arguments on stdin (instead of mix of CLI + stdin).
  * fix bug in pylint which caused it to manipulate sys.path before
    spawning its subprocesses, which caused multiprocessing to fail
    on windows.
    * Note: This may carry a slight semantic change. Before, pylint would
      add all .py files' directories to sys.path while checking any of
      them. Now in parallel mode, pylint will only add the path of the
      single file to sys.path. This behavior actually mirrors Python's
      own behavior, so the check should be more-correct than before (and
      should cut down on pylint import scanning time with very large
      sys.path's).
    * If someone encounters an issue with this, please note that the
      GetPylint check also includes an extra_paths_list which is
      expressly for this purpose.

R=dpranke@chromium.org, kbr@chromium.org, maruel@chromium.org
BUG=501012

Review URL: https://codereview.chromium.org/1208743002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@295908 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
boliu@chromium.org 2aa134c40a Revert of Add support for tar.gz archive files to download from download_from_google_storage (patchset #8 id:140001 of https://codereview.chromium.org/807463005/)
Reason for revert:
This conflicts with (and duplicates?) the -z option below and has broken one of the chrome android downstream bots.

Safer to revert than trying to fix

Original issue's description:
> Add support for tar.gz archive files to download from download_from_google_storage
> 
> Also, add support for directly setting the public read flag on uploaded files.
> 
> The support for tar.gz allows the uploaded bundle to be a single tar.gz file instead of a lot of individual files using the directory support already in. The benefit here is that it is much easier to update the dependency. Simply clean out the existing files, copy in the new ones, create a tar.gz file, with the same name as the directory + 'tar.gz'. If the directory name and file name does not match up we will not clean up existing artifacts on download (i.e., there can be left over files after extracting).
> 
> I am doing this because I am moving a bunch of the dart dependencies to gcs, and a lot of our dependencies is much easier to manage with this in. If you don't like this, I can simply wrap the download script in another python script and do the logic there, but this may be handy for other people as well.
> 
> Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=295872

TBR=hinoka@google.com,hinoka@chromium.org,azarchs@chromium.org,ricow@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Review URL: https://codereview.chromium.org/1209033006

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@295883 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
ricow@google.com 0c7d94eb9d Add support for tar.gz archive files to download from download_from_google_storage
Also, add support for directly setting the public read flag on uploaded files.

The support for tar.gz allows the uploaded bundle to be a single tar.gz file instead of a lot of individual files using the directory support already in. The benefit here is that it is much easier to update the dependency. Simply clean out the existing files, copy in the new ones, create a tar.gz file, with the same name as the directory + 'tar.gz'. If the directory name and file name does not match up we will not clean up existing artifacts on download (i.e., there can be left over files after extracting).

I am doing this because I am moving a bunch of the dart dependencies to gcs, and a lot of our dependencies is much easier to manage with this in. If you don't like this, I can simply wrap the download script in another python script and do the logic there, but this may be handy for other people as well.

Review URL: https://codereview.chromium.org/807463005

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@295872 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
raphael.kubo.da.costa@intel.com 58d05b0892 Unskip testGetBranchesInfo().
It is not clear why it was skipped in r293502, but it was problematic
before that as it can be seen from CL 802403003.

The reason for the different results (and likely the reason why the test
was skipped) is that the handling of the %(upstream:track) and
%(upstream:trackhort) formatting tags was broken in git itself until
version 2.3.0. This was fixed in git commit b6160d95, and the fix shows
that the test expectations in testGetBranchesInfo() were actually wrong
in one of the cases.

Fix the expectations and make sure we only use %(upstream:track) in the
test when a suitable git version is present.

R=pgervais@chromium.org,iannucci@chromium.org

Review URL: https://codereview.chromium.org/1195933003

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@295814 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
iannucci@chromium.org 1b9a55600f Fix depot_tools presubmit tests by mocking multiprocessing.cpu_count.
R=thakis@chromium.org
BUG=503462

Review URL: https://codereview.chromium.org/1193333012

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@295795 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
rmistry@google.com 2dd9986270 [depot_tools] New "git cl upload" flag to traverse dependent branches and re-upload them.
Motivation:
The conversation in https://docs.google.com/document/d/1KZGFKZpOPvco81sYVRCzwlnjGctup71RAzY0MSb0ntc/edit?disco=AAAAAXU60E8

BUG=502257

Review URL: https://codereview.chromium.org/1191473002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@295779 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
ricow@google.com 2911a38229 Fix test expectations for download_from_google_storage_unittests.py
This does not seem to be run by the bots, otherwise they should be red

R=hinoka@google.com, iannucci@google.com
BUG=

Review URL: https://codereview.chromium.org/1188643008

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@295741 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
iannucci@chromium.org 0af3bb37eb Parallelize pylint PRESUBMIT checks.
R=maruel@chromium.org
BUG=479837,499650

Review URL: https://codereview.chromium.org/1181103002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@295664 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
pgervais@chromium.org 8ba38ff4dc Added message when upstream branch is gone.
BUG=496892

Review URL: https://codereview.chromium.org/1156223008

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@295634 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
tandrii@chromium.org 6c14310ef8 Make git auto-svn fail if git svn fetch fails.
R=agable@chromium.org
BUG=437397

Review URL: https://codereview.chromium.org/1150353003

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@295630 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
akuegel@chromium.org 58888e1171 Fix git branch parsing.
In git version 2.4 the git branch command prints "* (HEAD detached at"
or "* (HEAD detached from" instead of "* (detached from". Adjust the parsing to make our tests
still work with git 2.4.

BUG=487172

Review URL: https://codereview.chromium.org/1162763003

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@295578 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
smut@google.com 4c61dccd9d Add period below review URL when adding review URL footer to committed CLs
Because some interfaces aren't linkifying the URL when the commit message ends with it.

BUG=480922
TESTED=tests/git_cl_test.py; presubmit ok

Review URL: https://codereview.chromium.org/1165293002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@295566 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
akuegel@chromium.org 4c10d415d9 Fix push_basic.sh
This CL changes the check for base URL to a query to the json endpoint.
This makes the test pass on the trybot.

BUG=353718

Review URL: https://codereview.chromium.org/1160273005

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@295538 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
sbc@chromium.org 217330f2f0 Add quotes around command line in subproccess error message
Allows the command line itself to be distinguished
from the surrounding error message.

Review URL: https://codereview.chromium.org/1152443004

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@295481 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
wychen@chromium.org 5b3bebb18e In PatchIssue, add CL description to commit message
Before this change, the commit message only contains issue number and
patchset number. Adding CL description should be more informative.

Review URL: https://codereview.chromium.org/1128473003

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@295449 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
maruel@chromium.org dbd102dc2b Remove most svn related testing.
Subversion usage is going away, tests get the kick first.

R=iannucci@chromium.org
BUG=475320

Review URL: https://codereview.chromium.org/1158043003

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@295411 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
akuegel@chromium.org a1bf72dd1e Disable tests that break because of git 2.4
BUG=487172

Review URL: https://codereview.chromium.org/1150663002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@295375 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
luqui@chromium.org 609f395e7c Make git cl upload correctly track upstream refs when uploading to Gerrit
NOPRESUBMIT because it's broke on CQ, Cf. https://codereview.chromium.org/1124803002

BUG=478260
NOPRESUBMIT=true

Review URL: https://codereview.chromium.org/1110293002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@295124 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
wychen@chromium.org a872e757cb Don't clean up after conflict in "git cl patch"
After crrev.com/896453002, if "git cl diff" ends up having conflict, it
would be cleaned up. However, if "git cl patch" ends up with conflict,
the user should still be able to manually resolve them.

BUG=438362
TEST=tests/git_cl_test.py

Review URL: https://codereview.chromium.org/1091283004

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@295051 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
wychen@chromium.org 445c896d9f Fix mock restoration in git_cl_test
The assertion in TestGitCl.tearDown should be done after super.tearDown
is finished. Otherwise if the assertion fails, mocked objects won't be
restored properly, and the next TestCase would be affected.

Review URL: https://codereview.chromium.org/1093943002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@295049 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
sergiyb@google.com 7676cca756 Disabled flaky depot_tools tests
R=akuegel@chromium.org,pgervais@chromium.org
BUG=477454

Review URL: https://codereview.chromium.org/1099143002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@295007 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
vadimsh@chromium.org 19f3fe60b2 Enable OAuth2 by default.
ClientLogin will be supposedly turned off on Apr 20.

R=maruel@chromium.org
BUG=356813

Review URL: https://codereview.chromium.org/1095033002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@294899 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
vadimsh@chromium.org 24daf9e974 Add support for externally provided refresh tokens.
OAuth token cache file (as implemented by oauth2client library) stores refresh
token and can in theory be deployed via Puppet as the credential. But it is
mutated by the library (to store access tokens, rotated each hour), and so it is
not static and managing it via Puppet (or however else) is a big pain.

Instead, now depot_tools accepts --auth-refresh-token-json parameter with a path
to a static JSON file (with minimal body being {"refresh_token": "....."}). It
can be used to pass previously prepared refresh tokens of role accounts. It
will be used for blink DEPS roller account and similar @chromium.org accounts.

R=maruel@chromium.org
BUG=356813

Review URL: https://codereview.chromium.org/1060193005

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@294870 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
peter@chromium.org 2ce13130dd Implement support for file: includes in OWNERS files.
This CL implements support for file: include lines in OWNERS files,
both as top-level directives and as per-file directives. The
paths can be either relative or absolute.

Examples of lines in OWNERS files:

  file:test/OWNERS  (relative, top-level)
  file://content/OWNERS  (absolute, top-level)
  per-file mock_impl.h=file:test/OWNERS  (relative, per-file)
  per-file mock_impl.h=file://content/OWNERS  (absolute, per-file)

A whole series of tests to cover this feature have been added
to owners_unittest.py as well.

BUG=119396, 147633

Review URL: https://codereview.chromium.org/1085993004

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@294854 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
rmistry@google.com 5fc6c8c0e7 Skip OWNERS checks for CQ dry runs
The CQ dry run feature was announced in https://groups.google.com/a/chromium.org/forum/#!topic/chromium-dev/G5-X0_tfmok

The primary complain is that the presubmit builders fail because of OWNERS checks or because of "Missing LGTM from someone other than...".
This change skips those checks for dry runs.

BUG=chromium:477190

Review URL: https://codereview.chromium.org/1090943003

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@294853 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
akuegel@chromium.org 5df79ca431 Fix git_cl_tests.
BUG=356813

Review URL: https://codereview.chromium.org/1083693002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@294777 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
vadimsh@chromium.org eed4df3d91 Add OAuth2 support for end users (i.e. 3-legged flow with the browser).
This CL introduces new top level command for managing cached auth tokens:
  $ depot-tools-auth login codereview.chromium.org
  $ depot-tools-auth info codereview.chromium.org
  $ depot-tools-auth logout codereview.chromium.org

All scripts that use rietveld.Rietveld internally should be able to use cached
credentials created by 'depot-tools-auth' subcommand. Also 'depot-tools-auth'
is the only way to run login flow. If some scripts stumbles over expired or
revoked token, it dies with the error, asking user to run
'depot-tools-auth login <hostname>'.

Password login is still default. OAuth2 can be enabled by passing --oauth2 to
all scripts.

R=maruel@chromium.org
BUG=356813

Review URL: https://codereview.chromium.org/1074673002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@294764 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
vadimsh@chromium.org cf6a5d2026 Extract authentication options handling into a separate function.
It is done in preparation for switching to OAuth2 as default (and only)
authentication method. Having all auth options handled by the same code makes it
easier to gradually add OAuth2 support.

As part of this, some options that would no longer work with OAuth2 (and that
are not being used from anywhere now, as far as I can tell) are removed:
  * Passing account password for authentication via command line.
  * Overriding 'Host' header when making requests to Rietveld (won't work with
    SSL anyway).
  * --account_type option (seems to be ClientLogin specific).

R=maruel@chromium.org
BUG=356813

Review URL: https://codereview.chromium.org/1075723002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@294746 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
sbc@chromium.org 71437c0ba5 git-squash-branch: handle empty squashes
Error out of the current tree is dirty (previously the dirty
content would be incorporated silently into the newly
squashed branch!).

Review URL: https://codereview.chromium.org/1064933004

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@294744 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
pasko@chromium.org 364876e580 In upload_to_google_storage, pass -z argument through to gsutil.
Also fix some latent bugs in the unit tests.

(cherry-picked by pasko@ from https://codereview.chromium.org/1048103002/)

BUG=467005

Review URL: https://codereview.chromium.org/1059723003

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@294674 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
dtu@chromium.org 03f0c53648 Remove 150% hard line length limit for long URLs.
BUG=

Review URL: https://codereview.chromium.org/1033363002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@294600 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
rmistry@google.com c68112d9cb Stop defaulting unrecognized branches to master except for handful of special refs.
Context:
In https://codereview.chromium.org/781523002/ I added the ability for target_ref to be set to any branch name. Eg: For Skia a ref of 'refs/remotes/origin/chrome/m42' would be correctly set to 'refs/heads/chrome/m42'.

But in https://codereview.chromium.org/822503005/ this was changed to treat any branch that did not start with 'refs/remotes/branch-heads' or 'refs/remotes/origin/refs' to be 'refs/remotes/origin/master'.
This makes it very chromium specific, there are plenty of other projects that use depot_tools that does not work like this.
For Skia 'refs/remotes/origin/chrome/m42' would now change to 'refs/remotes/origin/master' which is wrong.

The default behavior should be to preserve the original ref not to override it to master.

I handled 'lkgr' and 'lkcr' as special cases in this CL because many developers track it and would like it to land in master by default.

BUG=chromium:463109
NOPRESUBMIT=true

Review URL: https://codereview.chromium.org/967453004

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@294303 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
sbc@chromium.org 013731e832 Handle KeyboardInterrupt consistently in python scripts
Handle KeyboardInterrupt gracefully rather the printing a
backtrace. Most users of these tools don't expect a
backtrace when then hit Ctrl-C.

Also, fix a few other inconsistencies found in the python
startup code of these different scripts:
- always call main function 'main' (rather than 'Main')
- always return 0 from main function
- if main takes args never include argv[0]

Review URL: https://codereview.chromium.org/955993006

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@294250 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
rmistry@google.com 5626a92eec Add ability to specify and run post upload hooks.
Motivation: There are a few things we want to do in Skia infrastructure that is not possible to do without this functionality.
Eg1: If there is a change made to Skia's markdown then automatically include a 'DOCS_PREVIEW_URL=https://skia.org?cl=1234' in the CL's description.
Eg2: Automatically add 'NOTRY=true' for changes impacting things that do not need trybot runs.
Eg3: Include CL specific links to skia's perf (https://perf.skia.org/) and correctness (https://gold.skia.org/) servers.

BUG=chromium:462208

Review URL: https://codereview.chromium.org/949273002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@294242 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
dnj@chromium.org 5b23e871ba gclient: Add '--auto_rebase' sync option.
This adds the '--auto_rebase' sync option, enabling parallel updates to
automatically rebase local Git branches during sync.

BUG=None
TEST=local

Review URL: https://codereview.chromium.org/930693002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@294151 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
glider@chromium.org c3617f3fdd Remove the Singleton<T> presubmit check from presubmit_canned_checks.py
This check is specific to Chromium codebase, there's no point in having it in depot_tools.

BUG=None
R=maruel@chromium.org

Review URL: https://codereview.chromium.org/924863002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@294124 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
primiano@chromium.org 1c1273893e Reland "Make gclient ready for the Blink (DEPS to main project)"
Reland crrev.com/743083002, which was reverted in crrev.com/796053002
due to some test flakiness, probably related with an old version of Git on
the bots. Relanding now that the infra has been updated to Trusty (plus
adding some de-flake precautions).

Original CL Description:
Make gclient ready for the Blink (DEPS to main project) transition

This CL makes gclient understand correctly whether a git project is
being moved from DEPS to an upper project and vice-versa.
The driving use case for this is the upcoming Blink merge, where
third_party/Webkit will be removed from DEPS (and .gitignore) and will
become part of the main project.

At present state, gclient leaves the .git folder around when a project
is removed from DEPS, and that causes many problems.

Furthermore this CL solves the performance problem of bisecting across
the merge point. The subproject's (Blink) .git/ folder is moved to a
backup location (in the main checkout root) and is restored when moving
backwards, avoiding a re-fetch when bisecting across the merge point.

BUG=431469

Review URL: https://codereview.chromium.org/910913003

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@294082 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
bauerb@chromium.org 27386ddd72 Add a --squash option to Gerrit uploads.
This makes uploading to Gerrit with `git cl` more similar to uploading to Rietveld, by uploading a squashed commit containing the diff to the newest common ancestor.

Uploaded commits are stored in refs/heads/git_cl_uploads/<branch> (and their commit message is used for the squash commit), which allows amending the commit message to change it on the uploaded CL, and looking through the reflog to find old uploaded versions.

BUG=none

Review URL: https://codereview.chromium.org/200023004

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@294077 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
wychen@chromium.org b244351f18 The original assertions trigger pylint unreachable warnings, and they are replaced by fail() calls.
Review URL: https://codereview.chromium.org/899503003

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@293930 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
cmp@chromium.org bb37f94966 Remove redundant checks.
R=maruel@chromium.org

Review URL: https://codereview.chromium.org/884243006

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@293911 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
wittman@chromium.org 455dc92f58 Support --target-branch option to git-cl upload for Rietveld
This is similar to the Gerrit behavior in that we default to master,
unless the remote upstream is a branch head.

BUG=435702

Review URL: https://codereview.chromium.org/822503005

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@293807 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
hinoka@chromium.org 5e879a426d Hook sys.stdio directly to the gsutil subprocess for the gsutil call
So that gsutil.py config works.

I would've preferred the execv solution, but apparently that didn't work on Windows :(

BUG=451551

Review URL: https://codereview.chromium.org/870093003

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@293790 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
dpranke@chromium.org bce925dfdd Remove the 'author_counts_as_owner' option from CheckOwners().
Way back in r185294 I added the ability to request that, when
checking owners, the patch author *should not* count (normally it does
count). We did this in order to be able to mimic the review processes
of WebKit in the Blink repo.

However, we ended up never using this feature, so I'm finally getting
around to deleting it.

R=maruel@chromium.org
BUG=none

Review URL: https://codereview.chromium.org/851103004

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@293685 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
loislo@chromium.org 67b59e98dc Speculative fix for build on windows build bots.
The root of problem is a _cache_temp file.
git_cache expected that it is a folder.
So rmtree failed to remove it.

BUG=
TBR= dpranke@chromium.org, enne@chromium.org
NOTRY=true

Review URL: https://codereview.chromium.org/825133002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@293502 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
raphael.kubo.da.costa@intel.com e589f98b8e presubmit_unittest: Fix pylint errors.
The recent pylint 1.3.1 and 1.4.0 upgrades have caused some new errors
to be reported for presubmit_unittest:

* presubmit_support.InputApi.AffectedFiles() expectes a parameter called
  |include_deletes|, not |include_deleted|.

* The mock AffectedFiles() implementation in
  CannedChecksUnittest.testCannedCheckChangeHasNoTabs() had its
  signature updated to match the one in presubmit_support.InputApi,
  otherwise pylint would (erroneously) consider that this mock
  implementation was used in all other AffectedFiles() invocations in
  CannedChecksUnittest and complain that some parameters were missing.
  It makes more sense to do this than disable the check and miss real
  problems in the future.

R=maruel@chromium.org, iannucci@chromium.org, pgervais@chromium.org
BUG=443232

Review URL: https://codereview.chromium.org/802403003

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@293468 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
primiano@chromium.org df351768f2 gsutil: Use urllib2 instead of urllib.
This is similar to r247914 and r149742: urllib does not work with SSL
connections behind proxies, we need to use urllib2 instead. Doing this
should allow people behind proxies to download gsutils 4.7 after
r293413.

(Setting NOTRY here to be able to land the issue, otherwise the CQ fails when running some presubmit checks, see crbug.com/443232)

R=maruel@chromium.org, hinoka@chromium.org, pgervais@chromium.org, primiano@chromium.org
NOTRY=true

Review URL: https://codereview.chromium.org/809053002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@293439 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
tfarina@chromium.org b6795643ec Add lint_filters parameter to CheckChangeLintsClean function.
The idea here is that when one of the filters are cleaned up in Chromium,
they should not be filtered out, otherwise we won't catch them in
the presubmit step.

See for example -> https://codereview.chromium.org/788493002/

BUG=None
R=agable@chromium.org, dpranke@chromium.org

Review URL: https://codereview.chromium.org/779033003

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@293357 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
primiano@chromium.org a64c0b083b Revert of Make gclient ready for the Blink (DEPS to main project) transition (patchset #6 id:180001 of https://codereview.chromium.org/743083002/)
Reason for revert:
The test intoruced is flake (see crrev.com/753543006/).
Need to look into that with more patience as it reproduces only on precise.


Original issue's description:
> Make gclient ready for the Blink (DEPS to main project) transition
> 
> This CL makes gclient understand correctly whether a git project is
> being moved from DEPS to an upper project and vice-versa.
> The driving use case for this is the upcoming Blink merge, where
> third_party/Webkit will be removed from DEPS (and .gitignore) and will 
> become part of the main project.
> 
> At present state, gclient leaves the .git folder around when a project
> is removed from DEPS, and that causes many problems. 
> 
> Furthermore this CL solves the performance problem of bisecting across
> the merge point. The subproject's (Blink) .git/ folder is moved to a
> backup location (in the main checkout root) and is restored when moving
> backwards, avoiding a re-fetch when bisecting across the merge point. 
> 
> BUG=431469
> 
> Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=293329

TBR=iannucci@chromium.org,maruel@chromium.org,jochen@chromium.org
NOTREECHECKS=true
NOTRY=true
BUG=431469

Review URL: https://codereview.chromium.org/796053002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@293352 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
sbc@chromium.org 7e977755af Fix test failures on Ubuntu/Trusty.
I ran into several failures running the presubmit checks
on my Ubuntu/Trusty laptop and it looks like a some of
the tests were broken by recent versions of svn and git.

Review URL: https://codereview.chromium.org/795723003

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@293341 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
primiano@chromium.org fcf03763e0 Make gclient ready for the Blink (DEPS to main project) transition
This CL makes gclient understand correctly whether a git project is
being moved from DEPS to an upper project and vice-versa.
The driving use case for this is the upcoming Blink merge, where
third_party/Webkit will be removed from DEPS (and .gitignore) and will 
become part of the main project.

At present state, gclient leaves the .git folder around when a project
is removed from DEPS, and that causes many problems. 

Furthermore this CL solves the performance problem of bisecting across
the merge point. The subproject's (Blink) .git/ folder is moved to a
backup location (in the main checkout root) and is restored when moving
backwards, avoiding a re-fetch when bisecting across the merge point. 

BUG=431469

Review URL: https://codereview.chromium.org/743083002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@293329 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
hinoka@chromium.org 7a79054e2f GSUtil.py wrapper script
This is for transitioning us out of the horribly outdated gsutil 3.4 thats
currently residing in depot_tools.  This script:
1. Downloads GSUtil, pinned to a version (4.6 by default).
2. Executes GSUtil with the given parameters
3. (TODO) Runs the fallback GSUtil if #2 fails.


The transition plan is:
1. Set the fallback as default, making this script a no-op
2. Modify recipes (main consumer of gsutil) to pass in --force_version 4.6
3. Switch 4.6 as the default for gsutil.py
4. Make fallback failure a loud red failure
5. Remove depot_tools/third_party/gsutil

BUG=434422

Review URL: https://codereview.chromium.org/742173002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@293320 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
scottmg@chromium.org d05ab35296 Add canned presubmit check for GN formatting
Requires https://codereview.chromium.org/779883002/ to be landed/rolled before it's useful.

R=dpranke@chromium.org
BUG=348474

Review URL: https://codereview.chromium.org/779513005

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@293269 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
kjellander@chromium.org 6abc652428 Rewrite Google Code http URLs with https on git svn dcommit.
This fix is created to avoid having to rebuild all the WebRTC
Git mirrors since they're configured to sync with the http URL
instead of https (resulting in git-svn-id Git footers with the
http URL in the commit messages). Without rewriting this, it is
not possible to commit to SVN since Google code disallows committing
to a http URL.

BUG=412012
TEST=Created a CL using a Git repo like this (both before and after landing https://webrtc-codereview.appspot.com/32569004):
git clone https://chromium.googlesource.com/external/webrtc.git
cd webrtc
git auto-svn
git checkout master
git checkout -b test
(edit whitespace change)
git commit -am "Whitespace edit
git cl upload --bypass-hooks"
git cl dcommit

R=agable@chromium.org, machenbach@chromium.org, mmoss@chromium.org

Review URL: https://codereview.chromium.org/760903004

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@293171 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
thakis@chromium.org c6ef53a877 Revert of Added orphaned compiled Python file checks. (patchset #2 id:20001 of https://codereview.chromium.org/621533002/)
Reason for revert:
Makes `git cl upload` very slow in chrome checkouts.

Original issue's description:
> Added orphaned compiled Python file checks.
> 
> There have been a handful of cases where orphaned compiled Python files (.pyc
> files without an accompanying .py file) have been loaded preferentially by
> the presubmit scripts, causing weird problems. This adds a check and a mode for
> such files, either warning the user or deleting them.
> 
> BUG=None
> TEST=local
>   - Tested against local repository.
> 
> R=iannucci@chromium.org, szager@chromium.org
> 
> Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=292703

TBR=iannucci@chromium.org,szager@chromium.org,dnj@chromium.org
NOTREECHECKS=true
NOTRY=true
BUG=None

Review URL: https://codereview.chromium.org/701683002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@292818 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
dnj@chromium.org e917ddc33d Added orphaned compiled Python file checks.
There have been a handful of cases where orphaned compiled Python files (.pyc
files without an accompanying .py file) have been loaded preferentially by
the presubmit scripts, causing weird problems. This adds a check and a mode for
such files, either warning the user or deleting them.

BUG=None
TEST=local
  - Tested against local repository.

R=iannucci@chromium.org, szager@chromium.org

Review URL: https://codereview.chromium.org/621533002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@292703 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
pgervais@chromium.org bd0cace8c1 Added os to input_api
BUG=
R=maruel@chromium.org

Review URL: https://codereview.chromium.org/614413003

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@292291 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
tandrii@chromium.org c137c1a5a6 Rough verification code to ensure deps hosts \in allowed_hosts.
BUG=371012

Review URL: https://codereview.chromium.org/562953002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@292088 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
primiano@chromium.org 49dfcde0f1 Use three-way merge when applying Git patches.
After switching to a pure git workflow, most of the patchset we upload
to rietveld have git metadata. Apparently, however, the scripts here in
depot tools, which are used by the CQ and trybots, are ignoring that
and applying patches without taking advantage of git metadata.
In practice this causes people to rebase and reupload patches more than
necessary, even in the cases when it could be handled automatically by
means of a three way merge.
This change updates the GitCheckout class of depot_tools to use that.

BUG=416003

Review URL: https://codereview.chromium.org/577203002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@292087 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
sbc@chromium.org 2cd0b8ed46 Use CheckCallAndFilterAndHeader for git commands.
Then this was changed to CheckCallAndFilter it broke
the expectations of code in the buildbot tree:
 scripts/slave/chromium_commands.py:extract_revisions

Alternatively we could update the expectations
of chromium_commands.py.

BUG= https://code.google.com/p/chromium/issues/detail?id=412818

Review URL: https://codereview.chromium.org/587253005

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@292072 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago