This CL adds a couple flags to "git cl archive".
dry-run: Lists the cleanup tasks, but exits before any changes are
made to Git.
notags: Deletes branches only; does not create archival tags.
R=tandrii@chromium.org,groby@chromium.org
BUG=
Review-Url: https://codereview.chromium.org/2276663002
Previously there was a soup with add-hoc formatting with
current branch name, which wasn't always set (see bug 611020).
This CL makes sure all such operations now:
* properly use types --int and --bool
* go through the *only* appropriate get/set/unset function.
Furthermore, tests were a mess wrt to raising exceptions when
git processes terminated with an exception. This CL cleaned up,
though I didn't go through all expectations, so some returns of
empty stdout instead of raising CalledProcess error are likely
remaining.
Disclaimer: this CL is not necessarily fixing the referenced bug
below, but it should at least provide better stacktrace when
the bug manifestst itself.
BUG=611020
R=agable@chromium.org
Review-Url: https://codereview.chromium.org/2259043002
If bots are specified manually on command line OR in PRESUBMIT.py,
then old behavior remains, namely triggering just those bots.
Otherwise, git cl try will now trigger CQ Dry Run. This is a good
default and also resolves several bugs:
* https://crbug.com/581150 where git cl try used to load cq.cfg
from infra/config, but that's not always correct for all projects.
* https://crbug.com/625697 where even if cq.cfg is in default location.
it might be outdated.
* https://crbug.com/585237 where git cl try would ignore special
in CL description CQ_INCLUDE_TRYBOTS, which is processed by CQ,
but not git cl try.
BUG=625697,585237,581150
R=sergiyb@chromium.org,emso@chromium.org
Review-Url: https://codereview.chromium.org/2147563003
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