Commit Graph

351 Commits (chrome/3865)

Author SHA1 Message Date
tandrii d9e5ce518a Fix git cl set-commit --clear.
aka sergiyb@ was right.

R=sergiyb@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/2141283002
9 years ago
tandrii f9aefb774c Implement git cl upload -b BUG --bug=BUG.
CC=friedman@chromium.org
R=sergiyb@chromium.org
BUG=500658

Review-Url: https://codereview.chromium.org/2117483002
9 years ago
martiniss 6eda05f9e6 Allow git_cl to be called when no default server is given
Review-Url: https://codereview.chromium.org/2109253002
9 years ago
tandrii d0b10a0b31 Remove old compatibility for git_cl_upload branches.
R=machenbach@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/2116493002
9 years ago
tandrii 9d20675998 git cl test framework: improve debuggability of expected calls.
R=phajdan.jr@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/2074233002
9 years ago
tandrii a60502f2d3 Gerrit git cl upload: --squash is now default.
You can override it for all devs of repo by adding line to codereview.settings:
  GERRIT_SQUASH_UPLOADS: (True|False)

And even with that, individual devs can overide it for themselves with:
  git config [--global] --bool gerrit.override-squash-uploads (true|false)

BUG=611892

Review-Url: https://codereview.chromium.org/2072363002
9 years ago
tandrii edbf9a3e85 Gerrit git cl upload: Remove --no-squash warning message.
First, it's wrong because of instruction in it is ineffective.
Second, it was also shown during --squash upload, which is completely wrong.

TBR=sergiyb@chromium.org
BUG=611892

Review-Url: https://codereview.chromium.org/2072923002
9 years ago
tandrii 26f3e4eecb Update message for Gerrit git cl --no-squash users.
R=andybons@chromium.org
BUG=611892

Review-Url: https://codereview.chromium.org/2055233002
9 years ago
tandrii 1c67da672d Mock stdout to avoid pollutting test runner stdout.
TBR=kmarshall@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/2055003003
9 years ago
tandrii 16e0b4e206 Gerrit git cl upload: warn and offer to remove Gerrit commit-msg hook.
R=andybons@chromium.org,sergiyb@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/2045973002
9 years ago
kmarshall 3bff56bb49 Add "archive" command to git_cl.py.
This command archives branches whose Rietveldt status is closed by
creating new Git tags for each of the branches' heads, and then
deleting the branch. It automatically cleans up the clutter that
accumulates over time in a long-lived Git checkout.

For example, the branch "foo-bar" associated with the
closed issue 1568403002 will be archived to the tag
"git-cl-archived-1568403002-foo-bar".

BUG=616404
R=martiniss@chromium.org,tandrii@chromium.org

Review-Url: https://codereview.chromium.org/1991563005
9 years ago
tandrii@chromium.org 074c2afe94 Revert of Gerrit git cl: temporary disable cc option on upload. (patchset #1 id:1 of https://codereview.chromium.org/1895863002/ )
Reason for revert:
We've whitelisted cc-ed emails in Gerrit, and so let's try setting cc= again.

Original issue's description:
> 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
> 
> Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=299988

TBR=andybons@chromium.org,sergiyb@chromium.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=604377

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@300694 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
tandrii@chromium.org 601e1d17ef git cl description: avoid appending BUG= after Change-Id.
R=yyanagisawa@chromium.org,sergiyb@chromium.org
BUG=614587

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@300692 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
tandrii@chromium.org d605a51ccb git cl desc: add test that shows BUG= breaking Change-Id footer.
BUG=614587
R=yyanagisawa@chromium.org,andybons@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@300690 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
tandrii@chromium.org 9b7fd71c48 git cl issue 0 should really clear issue.
It used to clear just issue number and patchset, but that's not
all state that associates a given branch with codereview site.

R=andybons@chromium.org
BUG=609295

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@300683 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
tandrii@chromium.org c2786d933b Fix & refactor git cl patch.
* Fixes a bug when issue was incorrectly over-written
  in another branch. Add a test case.
* Refactor for better flow.
* Update outdated errors on wrong arguments.

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

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@300681 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
tandrii@chromium.org 8da4540381 Gerrit git cl upload: obey -s --send-mail option.
Previously, git cl upload would send email every time.
This CL changes that to send email only if -s or --send-mail is given.

R=andybons@chromium.org
BUG=612728

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@300662 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
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
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 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
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 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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
jam@chromium.org 82114c0092 Stop git cl using CQ_TRYBOTS.
This is broken for a few reasons (see bug for details). Also, this works automatically now with the analyze step.

This is a revert of r280039.

BUG=406238
R=iannucci@chromium.org, sky@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@291526 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
vadimsh@chromium.org 566a02afb9 Teach 'git cl land' to land to pending ref.
R=iannucci@chromium.org
BUG=404214

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@291302 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
maruel@chromium.org bda81551fe Remove confirmation from git cl land.
It serves no purpose, and it's annoying when the presubmit checks take more than
2-3 seconds because I always switch off to another window, so I come back
minutes later seeing this prompt waiting for me.

R=stip@chromium.org
BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@285071 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
bratell@opera.com 05fb911fc1 Revert of Allow git cl also in repos with read-only git-svn. (https://codereview.chromium.org/344013005/)
Reason for revert:
Breaks WebRTC (and possibly other projects actually using https:// for svn access).

Original issue's description:
> Allow git cl also in repos with read-only git-svn.
> 
> If you have read-only git-svn git cl would still try
> to use svn commands, which would then fail. This
> changes git cl to only use git-svn if the remote
> svn repository use the svn:// protocol. It matches
> how chromium works and it allowed me to upload a patch.
> 
> BUG=391430
> 
> R=iannucci
> 
> Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=281500

TBR=iannucci@chromium.org
NOTREECHECKS=true
NOTRY=true
BUG=391430

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@281513 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
bratell@opera.com 8e05af1084 Allow git cl also in repos with read-only git-svn.
If you have read-only git-svn git cl would still try
to use svn commands, which would then fail. This
changes git cl to only use git-svn if the remote
svn repository use the svn:// protocol. It matches
how chromium works and it allowed me to upload a patch.

BUG=391430

R=iannucci

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@281500 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
martiniss@chromium.org 905312ccbc Moved around pylint disable warning comments
BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@280051 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
martiniss@chromium.org 090df6ab1b Added support for git cl upload automatic trybot determination.
This is part of my intern project, which is detailed here:
  "https://docs.google.com/a/google.com/document/d/10bkzag1UUbtESPkEWHYaZtGMEEbCN5Zad72PuoRpwZE/edit#"

The idea is to have "git cl upload" annotate the CL description with a
flag like "CQ_TRYBOTS=...", which CQ will then look at to determine which
trybots to run the the given CL.

The CL for the change for CQ is at "https://chromereviews.googleplex.com/51757013/".

R=dpranke@google.com, iannucci@google.com
BUG=378097

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@280039 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
sheyang@chromium.org 152cf83378 Upload project option in 'gcl' and 'git cl' uploading commands.
BUG=374398

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@276491 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
bauerb@chromium.org 279c21881c Use `git rev-list A..B` to get the list of commits to be uploaded to Gerrit by git cl.
BUG=374121

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@270972 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
sheyang@chromium.org a656e70574 Revert of use canonical base URL for projects (https://codereview.chromium.org/271703010/)
Reason for revert:
CQ rejects all chromium projects because of this change.

Original issue's description:
> use canonical base URL for projects
> 
> BUG=372645
> R=iannucci@chromium.org, sergeyberezin@chromium.org
> 
> Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=270460

TBR=iannucci@chromium.org,sergeyberezin@chromium.org
NOTREECHECKS=true
NOTRY=true
BUG=372645

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@270803 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
sheyang@google.com 6a9ead263f use canonical base URL for projects
BUG=372645
R=iannucci@chromium.org, sergeyberezin@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@270460 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
bauerb@chromium.org f75c230c9c Warn before uploading more than one commit to Gerrit.
BUG=none

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@267480 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
iannucci@chromium.org 5724c961f6 Abort `git cl push` if pushing into a local branch.
R=agable@chromium.org, szager@chromium.org
BUG=338102

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@263202 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
iannucci@chromium.org 9e849276a0 Use get_or_create_merge_base in git-cl-upload to correctly deal with rebased
upstreams.

In the event that users are NOT using the enhanced tooling, this is equivalent
to `git merge-base "@{u}" HEAD`. In the event that they are, this will catch
the case where their parent branch got rebased, but this branch hasn't been
rebased on the parent yet.

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

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@261601 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
thestig@chromium.org 44202a28e9 Implement git cl lint.
Review URL: https://codereview.chromium.org/134223010

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@256289 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
thestig@chromium.org 7a54e8183a git_cl: Do not cache the relative root in Settings.
Relative root no longer makes sense after an os.chdir().
This is effectively a partial revert of r250248.

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@250478 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
thestig@chromium.org 8b0553c1f9 Cleanup: Merge a bunch of redundent env['GIT_PAGER'] = 'cat' statements.
Additionally:
- replace some RunCommand(['git', ...]) calls with RunGit().
- replace Settings._GetConfig('rietveld.foo') _GetRietveldConfig('foo').
- merge and cache calls to git rev-parse --show-cdup.
- merge some calls to git merge-base.

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@250248 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
rmistry@google.com 907525863f Add support for BUG_PREFIX in codereview.settings.
This change will allow projects other than chromium to specify 'BUG_PREFIX: project_name:' in their codereview.settings file.
Currently, the change is created with 'BUG=', entering a project's bug number there will point it to chromium's issue tracker. Adding a project specific prefix will make the links point to the project's issue tracker without the developer having to know about the magic prefix.

BUG=skia:1983

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@244801 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
jochen@chromium.org 3ec0d54fd7 Indiciate the tree status in the rietveld message when bypassing hooks
BUG=none
R=iannucci@chromium.org,maruel@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@244793 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
pgervais@chromium.org 87884cc015 Added --(de)activate-update options
These options have been added to the 'git cl config' subcommand.
--deactivate-update tells git cl not to update the values inside
.git/config from the codereview.settings file. --activate-update does
the opposite.

This is designed for testing/development purposes only, for example, to
be able to change the rietveld URL.

BUG=327901

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@242943 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
ukai@chromium.org 7044efcc7b GERRIT_PORT is no longer used in git_cl.py
BUG=maruel@chromium.org,szager@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@237657 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
ukai@chromium.org 712d6105b3 Download commit-msg from gerrit-review.googlesource.com
Tell download tools/hooks/commit-msg mannually if it looks broken.

chrome-internal-reviews.googlesource.com requires
authentication to access tools/hooks/commit-msg, and
we'll get Google Sign-in page rather than expected shell script.

R=szager@chromium.org,maruel@chromium.org,ilevy@chromium.org
BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@237454 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
tyoshino@chromium.org 99918abbe7 Ignore CC_LIST when private flag is specified.
This prevents private CLs to be automatically CC-ed to public mailing lists
unintentionally.

Review URL: https://chromiumcodereview.appspot.com/24257014

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@225925 0039d316-1c4b-4281-b951-d872f2087c98
12 years ago
agable@chromium.org 42c2079a1e Fix R= line rewriter to handle TBRs well.
R=maruel@chromium.org, thakis@chromium.org
BUG=253589

Review URL: https://chromiumcodereview.appspot.com/23072039

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@222801 0039d316-1c4b-4281-b951-d872f2087c98
12 years ago
bratell@opera.com 82b91cd1a8 Replace --no-pager with GIT_PAGER=cat
--no-pager looks ugly in logs and output and makes commands harder to
read. Setting an environment variable is better.

This is a followup to https://chromiumcodereview.appspot.com/14104005/
which added --no-pager.

Review URL: https://chromiumcodereview.appspot.com/18173003

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@210503 0039d316-1c4b-4281-b951-d872f2087c98
12 years ago
mcgrathr@chromium.org 9249f64cf4 Pass --no-renames to git diff
If ~/.gitconfig contains:
	[diff]
		renames = "true"
then git diff --name-status will produce output that confuses the parsing
in svm.GIT.CaptureStatus and git diff will produce output that confuses the
patch command on trybots.  Passing --no-renames explicitly counteracts this.

Review URL: https://chromiumcodereview.appspot.com/16057018

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@203778 0039d316-1c4b-4281-b951-d872f2087c98
12 years ago
alancutter@chromium.org bd1073ebe6 Change to 72 column reference in git cl upload message
76 columns is fine for most patches but reverts will eat another
4 spaces in indentation. For the sake of revert clarity this reference
line is reduced to 72 columns.

Review URL: https://chromiumcodereview.appspot.com/16152005

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@203530 0039d316-1c4b-4281-b951-d872f2087c98
12 years ago
alancutter@chromium.org 63a4d7fce1 Add 76 column reference in git cl upload message
Adds an extra line to the default text description to help judge whether the
76 character recommended limit is being passed.

Review URL: https://chromiumcodereview.appspot.com/15670012

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@203314 0039d316-1c4b-4281-b951-d872f2087c98
12 years ago
tyoshino@chromium.org c1737d0609 Add --private option to git_cl.py
TEST=tests/git_cl_test.py

Review URL: https://chromiumcodereview.appspot.com/15650014

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@202865 0039d316-1c4b-4281-b951-d872f2087c98
12 years ago
maruel@chromium.org 2e23ce3ecb Add colors to git cl comments.
Helps scanning faster. colorma is already slightly used by gclient but wasn't
by git-cl yet.

Update a unit test to be stricter, it was caught in the cross fire as colorma
hooks sys.stdout and stderr.

R=iannucci@chromium.org
BUG=

Review URL: https://chromiumcodereview.appspot.com/15025003

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@198689 0039d316-1c4b-4281-b951-d872f2087c98
12 years ago
jbroman@chromium.org 615a262dcb Make git-cl more accurately imitate git's editor selection process, and respect $VISUAL.
It is somewhat surprising when git-cl, which acts as a git subcommand, launches
a different editor. In particular, git has a config option (core.editor) which
specifies the editor that should be used. Since we already respect $GIT_EDITOR,
it makes sense for git-cl to respect core.editor and $VISUAL as well.

R=maruel@chromium.org
BUG=237504

Review URL: https://chromiumcodereview.appspot.com/14854003

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@198101 0039d316-1c4b-4281-b951-d872f2087c98
12 years ago
bratell@opera.com f267b0e55c Fix 236148: Avoid triggering a pager in internal git commands.
BUG=236148

Review URL: https://chromiumcodereview.appspot.com/14104005

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@197872 0039d316-1c4b-4281-b951-d872f2087c98
12 years ago
maruel@chromium.org e52678e0ed Update the R= line with the actual list of reviewers that approved the CL.
This makes the commit logs much more useful for a build sheriff. Not only he
sees who committed the CL but see who approved it directly at the log. This
should help build sheriffs when they fail to contact the author and want to
fallback on the reviewer for quick questions.

R=dpranke@chromium.org
BUG=76730

Review URL: https://chromiumcodereview.appspot.com/13800021

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@196786 0039d316-1c4b-4281-b951-d872f2087c98
12 years ago
maruel@chromium.org c6f60e8906 Fix R= line handling when there is no value and improve presubmit TAG line regex
Make it more consistent across the tool. Using \s also includes \n, which
confuses the tool.

Add more tests.

R=iannucci@chromium.org
BUG=

Review URL: https://chromiumcodereview.appspot.com/14265007

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@195214 0039d316-1c4b-4281-b951-d872f2087c98
12 years ago
janx@chromium.org 104b2db2a0 Add missing word "be" in CL description comments
s/This will displayed/This will be displayed/g

BUG=

Review URL: https://chromiumcodereview.appspot.com/13811053

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@194907 0039d316-1c4b-4281-b951-d872f2087c98
12 years ago
zimmerle@gmail.com 3cdcf56c58 Ensures that local git config is used while checking if it is a Git-svn repo.
If no `--local` option is passed to git config command line tool, it will relies
on the local repository and then to the user configuration ($HOME/.gitconfig).
In case the user has - for some reason - a svn repository configured in this
user configuration, the checking: `git config --get-regexp ^svn-remote\.` will
accuse that there is svn repo and so the `git cl tool`. This patch just add
the option `--local` to the git config command line tool, avoiding this
situation.

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

Review URL: https://chromiumcodereview.appspot.com/13884014

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@193987 0039d316-1c4b-4281-b951-d872f2087c98
12 years ago
maruel@chromium.org 78936cbc80 Switch ChangeDescription usage to be stricter.
Include all the preparatory work to eventually update the R= line to match the
actual reviewers.

The goal here is that ChangeDescription becomes the official implementation for
handling and modifying commit messages accross git-cl, gcl and the commit queue.

This change does slightly tweak the spacing between the hot lines.
It is done on purpose to make them consistent.

R=dpranke@chromium.org
BUG=

Review URL: https://chromiumcodereview.appspot.com/13741015

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@193514 0039d316-1c4b-4281-b951-d872f2087c98
12 years ago
rogerta@chromium.org caa1655dd6 Save the GIT hash of HEAD when uploading to rietveld.
Review URL: https://chromiumcodereview.appspot.com/12811006

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@188807 0039d316-1c4b-4281-b951-d872f2087c98
12 years ago
sbc@chromium.org 5e07e0608c git cl upload now diffs HEAD rather than working tree
BUG=179131
TEST=./tests/git_cl_test.py


Review URL: https://chromiumcodereview.appspot.com/12388027

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@185366 0039d316-1c4b-4281-b951-d872f2087c98
12 years ago
ukai@chromium.org 8ef7ab251c Don't call settings.GetIsGerrit() before parser.parse_args()
settings.GetIsGerrit() would invoke logging.basicConfig() and
preemtps the basicConfig for verbose option in parser.parse_args.

R=maruel@chromium.org,ilevy@chromium.org
BUG=162600

Review URL: https://chromiumcodereview.appspot.com/11418171

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@169843 0039d316-1c4b-4281-b951-d872f2087c98
12 years ago
maruel@chromium.org 4bac4b5517 Create CachingRietveld to automatically cache results for presubmit checks.
Multiple presubmit checks may call the same function multiple times, so it's
worth caching the results to speed up the presubmit check run.

Convert presubmit_support, git-cl and gcl to use it.

R=dpranke@chromium.org
BUG=


Review URL: https://chromiumcodereview.appspot.com/11280143

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@169726 0039d316-1c4b-4281-b951-d872f2087c98
12 years ago
ilevy@chromium.org 0f58fa88ef git_cl sanity checks
Added checks:
- Block upload of a diff from sha not in current branch
  (this includes tracking against an unrebased local master)
- Block upload of a diff containing shas from origin/master
  (should never happen)

- Use explicit calls to git merge-base instead of calling git diff
   with "<branch>..." which implicitly uses merge-base.

BUG=157503

Review URL: https://chromiumcodereview.appspot.com/11262057

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@165887 0039d316-1c4b-4281-b951-d872f2087c98
12 years ago
ukai@chromium.org 259e46891c git-cl: show dirty files if any
R=chase@chromium.org,szager@chromium.org,maruel@chromium.org
BUG=157398
Review URL: https://codereview.chromium.org/11262004

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@164026 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
sivachandra@chromium.org aebe87f424 Add gerrit Change-Id to commit messages if they do not have one.
BUG=156729


Review URL: https://chromiumcodereview.appspot.com/11236013

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@163366 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
iannucci@chromium.org 7954005862 Allow users of git cl to disable git copy detection entirely.
Depends on rietveld cl: https://codereview.appspot.com/6726050/
BUG=155511

Review URL: https://chromiumcodereview.appspot.com/11195012

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@163092 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
iannucci@chromium.org 53937ba767 Add option to specify similarity level for git diff operations on commandline
BUG=125983

Review URL: https://chromiumcodereview.appspot.com/10945002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@159732 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
iannucci@chromium.org 1512ab681a Fix git_cl diffstat to use -l100000 to match upload.py
Enables git to correctly detect copies and renames simultaneously.

BUG=144408


Review URL: https://chromiumcodereview.appspot.com/10915190

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@155899 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
joshua.lock@intel.com 426f69b485 Remove the use of urllib for SSL connections
Using urllib for SSL connections when behind a proxy is known to be
broken.

Upstream has fixed this in urllib2 in Python 2.6.3 and newer so
replace uses of urllib for SSL connections with urllib2 methods.

R=maruel@chromium.org
BUG=134165
TEST=gclient sync behind corporate proxy. Submitting this CL with git_cl.


Review URL: https://chromiumcodereview.appspot.com/10825107

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@149742 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
jamesr@chromium.org 35d1a84d76 Remove autogeneration of TEST= and automated check
Review URL: https://chromiumcodereview.appspot.com/10827059

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@148672 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
maruel@chromium.org 49e3d807fd Fix stats output to be always the same and coherent with what is committed.
git cl dcommit statistics were not using --find-copies-harder, scaring the user
off.

R=cmp@chromium.org
BUG=
TEST=


Review URL: https://chromiumcodereview.appspot.com/10795003

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@147343 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
szager@chromium.org e84b7541ce Add test for git-svn with submodule/merge layout.
Review URL: https://chromiumcodereview.appspot.com/10543151

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@142479 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
szager@chromium.org 9bb85e2d87 Add support for new repo topology, with submodule-specific merge commits
on origin/master.

Review URL: https://chromiumcodereview.appspot.com/10537117

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@141958 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
cmp@chromium.org 5cf7022b80 Turn on git diff copy detection for git-cl upload.
Enable copy detection for git-cl upload.  This makes
it possible to copy a directory containing many files,
add+commit the new path, and then upload a patch to
Rietveld that shows the files were copied.

In my tests, -C -C was needed to pick up a basic
file copy.  -C was not enough.  I'm not sure why
exactly.  The output generated in the diff looks
like:

  sh$ git diff -C -C HEAD~1..HEAD
  diff --git a/slave/Makefile b/slave2/Makefile
  similarity index 100%
  copy from slave/Makefile
  copy to slave2/Makefile
  ...

(This change requires r141676 /
https://chromiumcodereview.appspot.com/10543116/ which
updates upload.py to use --find-copies-harder.)

R=maruel@chromium.org

Review URL: https://chromiumcodereview.appspot.com/10545107

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@141689 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
cmp@chromium.org db9b0e3a04 Revert "Turn on git diff copy detection for git-cl upload."
This reverts commit db5a0def78.

TBR=maruel@chromium.org


Review URL: https://chromiumcodereview.appspot.com/10532034

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@140808 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
cmp@chromium.org db5a0def78 Turn on git diff copy detection for git-cl upload.
Enable copy detection for git-cl upload.  This makes
it possible to copy a directory containing many files,
add+commit the new path, and then upload a patch to
Rietveld that shows the files were copied.

In my tests, -C -C was needed to pick up a basic
file copy.  -C was not enough.  I'm not sure why
exactly.  The output generated in the diff looks
like:

  sh$ git diff -C -C HEAD~1..HEAD
  diff --git a/slave/Makefile b/slave2/Makefile
  similarity index 100%
  copy from slave/Makefile
  copy to slave2/Makefile
  ...

Review URL: https://chromiumcodereview.appspot.com/10412027

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@140314 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
maruel@chromium.org 373af80c9e Revert r138874 "Automatically adds quotes on Windows when necessary"
This breaks _some_ msysgit uses cases. I'll investigate later.

TBR=cmp@chromium.org
BUG=
TEST=


Review URL: https://chromiumcodereview.appspot.com/10445042

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@139114 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
ukai@chromium.org 9165550283 Fix git_cl_test.py on Windows
R=maruel@chromium.org
BUG=none
TEST=python.exe git_cl_test.py

Review URL: https://chromiumcodereview.appspot.com/10442028

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@138964 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
maruel@chromium.org ca2b8e764e Automatically adds quotes on Windows when necessary
So that a command like
 "git config rietveld.viewvc-url http://src.chromium.org/viewvc/chrome?view=rev&revision="
works fine.

Fix the description automatically generated for the hooks to be using the same
code than for the one presented to the user.

R=cmp@chromium.org
BUG=
TEST=Tested manually on cygwin, win32, linux


Review URL: https://chromiumcodereview.appspot.com/10447021

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@138874 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
kalmard@homejinni.com 6b0051e7c6 Allow overriding base-url in git-cl.
This is useful if git-cl has no way to find out the original svn repo's url
and the user does not wish to configure git-svn and fetch the repository.

Review URL: http://codereview.chromium.org/9969099

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@130372 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
maruel@chromium.org 71e12a9e41 Update upload.py @ fae51921ad9d
This version of upload.py is slightly less annoying, it won't cancel out if no
patchset title is provided and disable colors all the time.

R=cmp@chromium.org
BUG=
TEST=

Review URL: http://codereview.chromium.org/9233057

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@121826 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
ukai@chromium.org 78c4b98fc3 Download hooks only in "git cl config"
also, use http download instead of scp,
because scp won't work well on Windows.

BUG=chromium:113153
Review URL: https://chromiumcodereview.appspot.com/9369023

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@121820 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
evan@chromium.org 0af9b70a02 git-cl: split GetRietveldServer from GetIssue
Should be no functional change.
Necessary for a follow-up change I'm making.

Review URL: http://codereview.chromium.org/9385017

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@121590 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
evan@chromium.org 5b5d043a5a git_cl: drop migration code
Everyone at this point should have been migrated to the new format.

Review URL: http://codereview.chromium.org/9385010

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@121509 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
ukai@chromium.org 19bbfa2db2 Fix receive-pack
If we quote as --receive-pack="git receive-pack --reviewer=foo@example.com",
git will try to run "git receive-pack --reviewer=foo@example.com" command
and failed like this

Gerrit Code Review: git receive-pack --reviewer=foo@example.com: not found
fatal: The remote end hung up unexpectedly
Command "git push --receive-pack="git receive-pack --reviewer=foo@example.com" origin HEAD:refs/for/master" failed.

Review URL: http://codereview.chromium.org/9325018

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@120337 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
ukai@chromium.org e807781320 Add minimal Gerrit support to 'git cl config' and 'git cl upload'
This is the bare beginnings of Gerrit support for (non-repo) depot_tools,
based on Roland's work.
Differnt from http://codereview.chromium.org/8826015/
 it read codereview.settings and if it has GERRTI_HOST and GERRIT_PORT,
 then "git cl config" configured it for gerrit.
   installs hooks/commit-msg
   git config gerrit.host $GERRIT_HOST
   git config gerrit.port $GERRIT_PORT

 if it has gerrit.host config, "git cl upload" will upload a change
 to gerrit as
   "git push --receive-pack=... origin master"
 it scans description and extract reviewers from R= line.

Review URL: http://codereview.chromium.org/9264065

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@120276 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
jam@chromium.org 3108364f7c Revert 119066 until we have consensus.
TBR=ben
Review URL: https://chromiumcodereview.appspot.com/9298002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@119353 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
maruel@chromium.org 2b40b89ae1 Update upload.py @827fa087f74d, which includes support for svn 1.7
It also removes the need of manually creating a subject argument.

Other related changes in this CL:
- Reenable the prompt for patchset title in gcl. I'm not sure why it was disabled.
- Remove git cl upload --desc_from_logs flag. --force is already meaningful.

R=cmp@chromium.org
BUG=
TEST=

Review URL: http://codereview.chromium.org/9193023

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@119066 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
maruel@chromium.org 2e72bb1c2d Overhaul breakpad to optionally disable output. Add git-cl dcommit unit test.
This required fixing the adhoc mock to be more versatile.

TBR=cmp@chromium.org
BUG=
TEST=


Review URL: http://codereview.chromium.org/9178019

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@117896 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
maruel@chromium.org eb5edbcfde Add UpgradeToHttps() to reliably and forcibly upgrade all urls to https.
Enable it for git-cl and gcl.

R=nsylvain@chromium.org
BUG=107838
TEST=New connections go through https://


Review URL: http://codereview.chromium.org/9214004

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@117857 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
maruel@chromium.org a335365daa Make --send-mail more useful by not requiring -r
Previously, --send-mail required -r to pass. Now it uses the R=|TBR= lines from
the description, which is much more useful.

R=dpranke@chromium.org
BUG=
TEST=


Review URL: http://codereview.chromium.org/8735018

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@112221 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
maruel@chromium.org ddd59417c0 Fix case where TBR=foo would remove the -r flag in git-cl
Add unit test!

R=dpranke@chromium.org
BUG=
TEST=


Review URL: http://codereview.chromium.org/8715007

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