Commit Graph

441 Commits (4d843595aafd23e68d989efa47d9fa4819f8ad93)

Author SHA1 Message Date
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
bsep@chromium.org 627d9002a6 Subprocess uses shell=True on Windows when launching GN.
BUG=600051

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@300311 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
tandrii@chromium.org c68f7b51f5 Reland of git cl try: don't skip presubmit builders, but set dry_run property.
With a fix: actually set dry_run for presubmit, and don't set it for other builders.

R=machenbach@chromium.org,sergiyb@chromium.org
BUG=601128,594127,591030

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@300295 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
tandrii@chromium.org 3ea2614b3e Revert of git cl try: don't skip presubmit builders, but set dry_run property. (patchset #1 id:1 of https://codereview.chromium.org/1926663002/ )
Reason for revert:
Schedules fine, but property not set: https://build.chromium.org/p/tryserver.v8/builders/v8_presubmit/builds/14295/

reverting first, then investigating.

Original issue's description:
> git cl try: don't skip presubmit builders, but set dry_run property.
> 
> R=machenbach@chromium.org,sergiyb@chromium.org
> BUG=601128,594127,591030
> 
> Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=300265

TBR=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=601128,594127,591030

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@300274 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
tandrii@chromium.org c39431ae2c git cl try: don't skip presubmit builders, but set dry_run property.
R=machenbach@chromium.org,sergiyb@chromium.org
BUG=601128,594127,591030

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@300265 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
tandrii@chromium.org 8c3b442a99 Pedantic follow up nitfix.
Follow up on https://codereview.chromium.org/1901733003.

R=martiniss@chromium.org
BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@300236 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
scottmg@chromium.org 6d1266eef6 Make `git cl description` work for Gerrit
Example change at https://chromium-review.googlesource.com/c/340430/.

R=tandrii@chromium.org
BUG=603207

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@300188 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
tandrii@chromium.org 600b49250f Add missing method stub for _GerritCodereviewImpl.
This should make presubmit happy for oncoming git cl desc for Gerrit:
https://codereview.chromium.org/1917473002/

BUG=603207
TBR=hinoka@chromium.org,scottmg@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@300186 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
hinoka@chromium.org 56d0de79a7 Revert of Make `git cl description` work for Gerrit (patchset #2 id:20001 of https://codereview.chromium.org/1917473002/ )
Reason for revert:
Broke presubmit

Original issue's description:
> Make `git cl description` work for Gerrit
> 
> This works in that it actually changes the description, but after
> multiple changes, there's multiple footers added. I'm not sure if they
> should be stripped in setting the description? Or is the problem in
> FetchDescription() where it shouldn't be returning
> 'commit_with_footers', but rather something else?
> 
> Example change at https://chromium-review.googlesource.com/c/340430/.
> 
> R=tandrii@chromium.org
> BUG=603207
> 
> Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=300169

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

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@300175 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
scottmg@chromium.org 4d038b4334 Make `git cl description` work for Gerrit
This works in that it actually changes the description, but after
multiple changes, there's multiple footers added. I'm not sure if they
should be stripped in setting the description? Or is the problem in
FetchDescription() where it shouldn't be returning
'commit_with_footers', but rather something else?

Example change at https://chromium-review.googlesource.com/c/340430/.

R=tandrii@chromium.org
BUG=603207

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@300169 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
tandrii@chromium.org 04ea846ba0 Revert of Use CLs more consistently instead of branch names (patchset #3 id:40001 of https://codereview.chromium.org/1893563002/ )
Reason for revert:
speculative revert.

Original issue's description:
> Use CLs more consistently instead of branch names
> 
> Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=300132

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

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@300167 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
tandrii@chromium.org 2d3da63e29 Fetch Gerrit cl description from gitiles.
R=andybons@chromium.org,scottmg@chromium.org
BUG=603207,605563

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@300161 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
clemensh@chromium.org 81156e6cc3 Use CLs more consistently instead of branch names
Review URL: https://codereview.chromium.org/1893563002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@300132 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 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 8930b3d693 git cl: update Gerrit todos and small nits.
R=andybons@chromium.org
BUG=579160

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@299894 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 11a899e057 Fix regression in git cl for Gerrit.
TBR=andybons@chromium.org
BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@299885 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
techtonik@gmail.com 5573df146f Check for clang-format only if its files are present
R=agable@chromium.org
BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@299867 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
tandrii@chromium.org d03bc634dc Small refactor git cl py.
R=sergiyb@chromium.org
BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@299857 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
tandrii@chromium.org 9e6c3a5559 Refactor CMDUpload further to avoid checks IsGerrit().
R=sergiyb@chromium.org,andybons@chromium.org,machenbach@chromium.org
BUG=579160,597638

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@299855 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
tandrii@chromium.org aa6235b1f6 Refactor git cl RietveldUpload and GerritUpload.
No functionality changes.

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

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@299844 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
tandrii@chromium.org abd27e5bbd git cl checkout: reall fix it.
TBR=machenbach@chromium.org,andybons@chromium.org
BUG=579182

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@299829 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
tandrii@chromium.org de6c9a1d23 Fix git cl checkout.
TBR=machenbach@chromium.org,andybons@chromium.org
BUG=579182

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@299827 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
tandrii@chromium.org 534f67a148 Slight refactor git cl diff.
R=machenbach@chromium.org
BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@299769 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
tandrii@chromium.org ef7c68c57f git cl diff: fix regression.
Reported in https://codereview.chromium.org/1852803002/#msg5.
Also some cleanup in nearby code AND fix of the git cl diff's previous behavior that actually updated local branch config with latest *uploaded* CL values. 

BUG=579182
R=machenbach@chromium.org,andybons@chromium.org
CC=servolk@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@299759 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
bpastene@chromium.org 917f0ffd0a Add DownloadHooks as a no-op function to git_cl to unblock android bisectors.
BUG=600473

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@299688 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
iannucci@chromium.org 596cd5c95d Fix coloring madness in depot_tools.
'setup_color' now contains logic to correctly detect:
  * cmd
  * cmd pipe
  * msys bash
  * msys pipe
  * cmd running inside msys bash (git-command)
  * cmd pipe running inside msys bash (git-command > outfile)

R=brucedawson@chromium.org, dnj@chromium.org
BUG=600049

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@299682 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 bf8f75119b Fix typo in git cl aptch with patch url.
TBR=dpranke@chromium.org,andybons@chromium.org
BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@299625 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
iannucci@chromium.org 0703ea2cc6 Multiple improvements to windows bash integration.
* `git bash` helper now will either:
    * launch an interactive bash prompt in the MinGW Terminal Emulator
    * launch a non-interactive bash shell if arguments are provided
  * `git bash` now includes python, python/Scripts and svn binaries in
    the PATH.
  * depot_tools' colorization now works in MinGW Terminal Emulator
  * batch scripts are now regenerated if any of them is missing.

R=agable@chromium.org, dnj@chromium.org, mmoss@chromium.org
BUG=598956

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@299616 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
iannucci@chromium.org c0f8642119 Revert "Better tooling"
This reverts commit eed06d620f.

Accidental dcommit

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@299615 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
iannucci@chromium.org eed06d620f Better tooling
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@299614 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 d68b62bca0 Gerrit git cl: implement "git cl land".
R=sergiyb@chromium.org,andybons@chromium.org
BUG=579180

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@299589 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 013a2803e8 git cl status for Gerrit.
R=ukai@chromium.org
BUG=579172

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@299532 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 95ffb615a5 Revert of Use tracking remote name for gerrit upload. (patchset #1 id:1 of https://codereview.chromium.org/1830313002/ )
Reason for revert:
Argh, this has broken uploading track-ed branches.
Repro:

git new-branch base-feature
touch x1 && git add x1 && git commit -m "x1"
git cl upload
git new-branch --upstream_current dep-feature
touch y1 && git add y1 && git commit -m "y1"
git cl upload -v -v # fails.


the verbose output produces this:
---cut---
DEBUG:root:git push . 7079b1682431184375b62e7e81ce10a02171aa0d:refs/for/refs/heads/master
To .
 ! [rejected]        7079b1682431184375b62e7e81ce10a02171aa0d -> refs/for/refs/heads/master (non-fast-forward)
error: failed to push some refs to '.'
---cut---

Original issue's description:
> Use tracking remote name for gerrit upload.
> 
> This patch replaces the hard-coded remote name 'origin' with the
> one obtained by git-remote.
> 
> Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=299491

TBR=iannucci@chromium.org,ukai@chromium.org,alokp@chromium.org
# Not skipping CQ checks because original CL landed more than 1 days ago.

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@299509 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
alokp@chromium.org 52eb5933a8 Use tracking remote name for gerrit upload.
This patch replaces the hard-coded remote name 'origin' with the
one obtained by git-remote.

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@299491 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 eba7b7e80d Revert of Gerrit: make git cl close working. (patchset #2 id:20001 of https://codereview.chromium.org/1827523003/ )
Reason for revert:
broke presubmit

Original issue's description:
> Gerrit: make git cl close working.
> 
> BUG=579160
> 
> Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=299465

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

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@299474 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
tandrii@chromium.org 6a3e00222f Revert of git cl: follow up indentation fix. (patchset #1 id:1 of https://codereview.chromium.org/1830703004/ )
Reason for revert:
http://crbug.com/597638

Original issue's description:
> git cl: follow up indentation fix.
> 
> TBR=machenbach@chromium.org
> BUG=579160
> 
> Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=299466

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

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@299473 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
tandrii@chromium.org 075561160f git cl: follow up indentation fix.
TBR=machenbach@chromium.org
BUG=579160

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@299466 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
tandrii@chromium.org 4ab3d0f715 Gerrit: make git cl close working.
BUG=579160

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@299465 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 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 5e8bb9a26b Remove legacy DownloadHooks as no longer used.
R=andybons@chromium.org,jbudorick@chromium.org
BUG=579176

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@299295 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 6cf98c8bd5 git cl try-results: make color force-able.
Inspiration:
  $ watch -n 10 "git cl try-results"
  $ watch --color "ls -al --color"

R=nodir@chromium.org,sergiyb@chromium.org
BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@299291 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
szager@chromium.org 8159374e44 Don't use 'git remote get-url', which is a new-ish feature.
Apparently most Mac's have git 2.6.2, which doesn't have this
feature.

This only affects end developers, so there's no urgency to push
this out to the bots.

TBR=agable@chromium.org,wkorman@chromium.org
BUG=
NOTRY=true

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@299185 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
szager@chromium.org 151ebcff42 Enable git-cl-land for git-cache checkouts.
The key piece here is that when running 'git cl land' from a cache checkout, refs/pending/* must be fetched from / pushed to the cache mirror's remote.

BUG=589140
R=wkorman,agable,iannucci,martiniss

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@299166 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
nodir@chromium.org baff4e1c8c git-cl-try: print proper access denied error msg
git-cl-try does not properly print error message when the response
status code is 403, because response parsing is broken.
Fix response parsing.

R=sheyang@chromium.org, tandrii@chromium.org
BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@299137 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 675bec320d Update TODO for cleaning up DownloadGerritHooks.
TBR=phajdan.jr@chromium.org,andybons@chromium.org
BUG=579176

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@299110 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 c55295c327 temporary fix for repos that directly used DownloadHooks from git_cl.py.
TBR=phajdan.jr@chromium.org,andybons@chromium.org
BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@299106 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 18630d61d2 Gerrit: announce deprecation of auto-download of commit-msg hook.
BUG=579176

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@299095 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
ppi@chromium.org 6593d9331d Fix `git cl format` for dart code.
The part that runs dartfmt was relying on the part that runs (or not)
Clang to set the |env| local variable, which no longer happens after
https://codereview.chromium.org/1734863002, making `git cl format` fail
with:

Traceback (most recent call last):
  File "/usr/local/google/home/ppi/projects/depot_tools/git_cl.py", line 3957, in <module>
    sys.exit(main(sys.argv[1:]))
  File "/usr/local/google/home/ppi/projects/depot_tools/git_cl.py", line 3939, in main
    return dispatcher.execute(OptionParser(), argv)
  File "/usr/local/work/depot_tools/subcommand.py", line 252, in execute
    return command(parser, args[1:])
  File "/usr/local/google/home/ppi/projects/depot_tools/git_cl.py", line 3837, in CMDformat
    stdout = RunCommand(command, cwd=top_dir, env=env)
UnboundLocalError: local variable 'env' referenced before assignment

It seems that we don't need to override env for dartfm anyway - the
clang part is doing this to put clang_format_tool in PATH.

This patch just drops env= from RunCommand for dartfmt.

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@299072 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
tandrii@chromium.org b4f6a22935 git cl status: do not show CQ Dry run as 'commit'.
R=jsbell@chromium.org,phajdan.jr@chromium.org
BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@299068 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
tandrii@chromium.org 35c61458c5 git cl try: advertise git cl try-results.
R=andybons@chromium.org
BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@298990 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
tandrii@chromium.org b015fac677 git cl try-results: show buildbucket tryjobs.
R=nodir@chromium.org,rmistry@chromium.org
BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@298989 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
sammc@chromium.org 0b35f5d745 Fix git cl format when it finds no clang-formattable files.
Currently, if git cl format does not find any clang-formattable files,
either in the path provided on the command line or in the CL as a whole,
then it applies clang-format to all changes in the CL. This CL fixes
this by changing git cl format to not clang-format when it does not find
any changed files that are clang-formattable.

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@298971 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
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
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
kylechar@chromium.org 8b61f11e22 Make "git cl format" format GN files.
Always formats full GN files that are modified since the format should
be canonical.

I tried to make it consistent in style with the existing formatters. I've
tested running it locally. For "git cl format" it formats GN files. For
"git cl format --diff" it outputs the full formatted files like clang but
doesn't modify. For "git cl format --dry-run" it doesn't modify or output.

TEST=Works running locally.
BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@298617 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
mtrofin@chromium.org 1d88dd3d3f Use current issue number for git cl patch
This change adds the option to use the current issue number, if any,
when doing a git cl patch. Instead of doing git cl issue (copy the
number) git cl patch <number>, one can simply do git cl patch -i

BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@298582 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
jkarlin@chromium.org ad21b92f4c Skip deleted files in git cl format
BUG=577647

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@298449 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
jkarlin@chromium.org 6f7fa5e756 5X speed up of 'git cl format', which also speeds up 'git cl upload'
'git cl format' became very slow (7
seconds) after the Blink merge. 'git cl upload' is also slow when
the presubmit requires formatting checks.

This CL speeds up 'git cl format' by reducing the number of calls to
'git diff' and by removing the glob parameter. The glob
parameter adds a couple of seconds as it scans the entire
repository.

Before: 'git cl format' takes 7 seconds
After: 'git cl format' takes 1.25 seconds

BUG=577647

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@298323 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
tandrii@chromium.org a83663a08c Fix git cl upload --squash (for Gerrit).
R=bauerb@chromium.org,andybons@chromium.org
BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@298270 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
machenbach@chromium.org 59994802e8 git cl try: omit triggered bots from cq.cfg default list
BUG=522909,565952

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@298261 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
tandrii@chromium.org 71184c0099 git cl try: load trybot list from cq.cfg by default.
This allows "git cl try" to just work for projects without any PRESUBMIT
but with cq.cfg in default location (infra/config/cq.cfg). This also
ships all presubmit bots, since these usually fail LGTM checks anyway.

BUG=522909

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@298251 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
erikcorry@chromium.org 3e44502a9a Update dartfmt message to be less confusing
R=tandrii@chromium.org
BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@298047 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
tandrii@chromium.org d50452a204 Add shorter option -d for git cl upload --cq-dry-run.
R=rmistry@chromium.org,phajdan.jr@chromium.org
CC=machenbach@chromium.org
BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@297669 0039d316-1c4b-4281-b951-d872f2087c98
10 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
10 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
10 years ago