It looks like this regressed when we switched from specifying CCs
via the refspec arguments to using the API.
BUG=680605
Change-Id: Iabd397b639989f050932188b1a1aa488639ffbbe
Reviewed-on: https://chromium-review.googlesource.com/427344
Reviewed-by: Andrew Bonventre <andybons@chromium.org>
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Commit-Queue: Aaron Gable <agable@chromium.org>
If either the edit creation or edit publishing fail, we're left with
an unpublished edit hanging around. This can result in a follow-up
invocation of 'git cl desc' (e.g. if the user changes their mind, or
retries) will also fail. So, clean up after ourselves.
BUG=671091
Change-Id: Icfe53996acf2555b82be0695a3c86ebb8c50b936
Reviewed-on: https://chromium-review.googlesource.com/418449
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Commit-Queue: Aaron Gable <agable@chromium.org>
This is to make it easy to specify a different .gitcookies for bots.
BUG=skia:5979
Change-Id: Iaeb148d25f1c2c3d06ab5e1b155999566ef5f294
Reviewed-on: https://chromium-review.googlesource.com/413075
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Commit-Queue: Ravi Mistry <rmistry@google.com>
Strip the netrc hack; apparently it only works on some versions of
Python, and the bots have many different versions.
Instead, we will actually emit the modified netrc as a new file without
comments or newlines, then read that directly from the vanilla netrc
module.
BUG=chromium:664664
TEST=None
Change-Id: I245759e2eae4e6ddcdffa0aaef59866a62bd0240
Reviewed-on: https://chromium-review.googlesource.com/411416
Commit-Queue: Daniel Jacques <dnj@chromium.org>
Reviewed-by: Ryan Tseng <hinoka@chromium.org>
Reviewed-by: Michael Moss <mmoss@chromium.org>
Processing comments seems to trigger a bug on (some?) Windows systems
due to a negative seek. This CL runs a comment-free version of the
"netrc" file through the parser.
BUG=chromium:664664
TEST=local
- Uploaded this CL with the change.
Change-Id: I65f5d2f8c1162b3b3a13c66d8becb1cfccf27991
Reviewed-on: https://chromium-review.googlesource.com/411455
Reviewed-by: Nodir Turakulov <nodir@chromium.org>
Reviewed-by: Michael Moss <mmoss@chromium.org>
Commit-Queue: Daniel Jacques <dnj@chromium.org>
The path always starts with a / so we need to check if it starts with /a/ to see if it's already authorized, not a/.
BUG=664664
Change-Id: I2bf6abe36dd88bc7d096e67d5e7a56fe9f143f47
Reviewed-on: https://chromium-review.googlesource.com/410721
Reviewed-by: Aaron Gable <agable@chromium.org>
Commit-Queue: First Last <smut@chromium.org>
Before, presubmit_support would fail with not very useful stacktrace if
Gerrit returns 404, which is usually due to missing/invalid credentials.
This CL fixes that and improves the exception message, and also improves
logic in git_cl.
R=agable@chromium.org
BUG=
Change-Id: Iae8f0c24422c46af70929c7d5d71993164887511
Reviewed-on: https://chromium-review.googlesource.com/409650
Commit-Queue: Aaron Gable <agable@chromium.org>
Reviewed-by: Aaron Gable <agable@chromium.org>
This is still important, but at least now it won't result
in a stacktrace.
Change-Id: If6e7e15a98b0a03df7e978201762fea670312ede
Reviewed-on: https://chromium-review.googlesource.com/408660
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Commit-Queue: Aaron Gable <agable@chromium.org>
Reason for revert:
Actually, it doesn't break uploads, add cc-ed emails post-upload fails with exception and confuses users, and I couldn't find workaround.
Original issue's description:
> Add CC_LIST and --cc to Gerrit issues via API to be similar to CCs in Rietveld
>
> BUG=chromium:649660
>
> Committed: 3574740929TBR=rmistry@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=chromium:649660
Review-Url: https://codereview.chromium.org/2375393002
Reason for revert:
Broke presubmit
Original issue's description:
> Make `git cl description` work for Gerrit
>
> This works in that it actually changes the description, but after
> multiple changes, there's multiple footers added. I'm not sure if they
> should be stripped in setting the description? Or is the problem in
> FetchDescription() where it shouldn't be returning
> 'commit_with_footers', but rather something else?
>
> Example change at https://chromium-review.googlesource.com/c/340430/.
>
> R=tandrii@chromium.org
> BUG=603207
>
> Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=300169
TBR=tandrii@chromium.org,scottmg@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=603207
Review URL: https://codereview.chromium.org/1922733002
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@300175 0039d316-1c4b-4281-b951-d872f2087c98
This works in that it actually changes the description, but after
multiple changes, there's multiple footers added. I'm not sure if they
should be stripped in setting the description? Or is the problem in
FetchDescription() where it shouldn't be returning
'commit_with_footers', but rather something else?
Example change at https://chromium-review.googlesource.com/c/340430/.
R=tandrii@chromium.org
BUG=603207
Review URL: https://codereview.chromium.org/1917473002 .
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@300169 0039d316-1c4b-4281-b951-d872f2087c98
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
This patch adds a new function QueryAllChanges to gerrit_util.py
allowing the caller to iterate the list of changes regardless the
maximum limit of changes per request that the server supports (by
default 500 according to gerrit's documentation).
my_activity.py is ported to use this function instead of urllib2 to
manually make the request. This also adds support for authentication
since gerrit_util.py already supports it, and the internal gerrit
instance is now re-enabled.
Finally, two minor bugs are fixed on the hanlding of returned
results: The DETAILED_ACCOUNTS option is passed to gerrit to request
the email addresses of the referenced users and users without an
email address, such as the "Gerrit Code Review" user on the internal
gerrit, are now supported.
BUG=chromium:311649,chromium:281695
TEST=Manual run "my_activity.py -u USER" for some users.
Review URL: https://codereview.chromium.org/50283002
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@233166 0039d316-1c4b-4281-b951-d872f2087c98
gob_util.py is a general-purpose library for communicating with the
gerrit-on-borg service.
testing_support/gerrit_test_case.py is a unittest framework for
testing code that interacts with gerrit.
R=vadimsh@chromium.org, cmp@chromium.org
BUG=
Review URL: https://codereview.chromium.org/26399002
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@228965 0039d316-1c4b-4281-b951-d872f2087c98