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
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
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
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
* 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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
\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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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=281500TBR=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
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
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
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
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
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
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
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
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
--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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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