Commit Graph

21 Commits (690ba8f98dece747ebe9b8263a5ac482df87b74d)

Author SHA1 Message Date
Edward Lesmes 1ea233380f git_drover: Replace with instructions on how to cherry-pick.
Change-Id: I4cf7591df2b89bceb5618abb8fad92fd29e066bf
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2653952
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
Reviewed-by: Andy Perelson <ajp@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@google.com>
4 years ago
Edward Lesmes d7d0b90f7d git-drover: Fix error printing.
Exceptions have no '.message' field.

Bug: 1135320
Change-Id: I30aba548895f1863c9cf65bf3e81a370405c32fa
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2451375
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
4 years ago
Edward Lesmes b806e17eb2 git-drover: Don't attempt to decode output of check_call.
When interactive is true, check_call is used instead of check_output,
and check_call doesn't return the command output.

Bug: 1074357
Change-Id: Ib9e761d41d754df58c9ee1f897dde173ce4d9eff
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2170805
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
5 years ago
Johnny(Jianning) Ding 08f4d59e0b Decode the returned encoded bytes of subprocess.check_all/check_output.
Bug: 1068779
Change-Id: Ie399e134577732b441c37ca2083d72a66bb631c3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2142745
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
Commit-Queue: Johnny (Jianning) Ding <jnd@chromium.org>
5 years ago
Edward Lesmes ae3586b538 depot_tools: Use gclient_utils.AskForData instead of raw_input.
gclient_utils.AskForData will use raw_input on Python 2 and input on Python 3.

Bug: 1063976
Change-Id: I93c059c4e4454d01787716b5a0a2641ad5253f53
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2116370
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
Reviewed-by: Anthony Polito <apolito@google.com>
Auto-Submit: Edward Lesmes <ehmaldonado@chromium.org>
5 years ago
Aaron Gable 6865d13248 Update git-drover to use branch CQ
Now that the CQ has been enabled for both the Beta and Stable
branches, git-drover should use the commit queue instead of
directly submitting the CL. To that end, this CL replaces the
usage of `git cl land` with `git cl set-commit`.

Change-Id: I0d0c10115acc98eafe0c069825de5499b8ade3e0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1960697
Auto-Submit: Aaron Gable <agable@chromium.org>
Commit-Queue: Garrett Beaty <gbeaty@chromium.org>
Reviewed-by: Garrett Beaty <gbeaty@chromium.org>
5 years ago
Edward Lemur 6f6611617c git-drover: Fix tests to run on Python 3.
Bug: 1009809
Change-Id: I5f453c7e019376e502716ab2e9891a97663d1f28
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1838254
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
Reviewed-by: Anthony Polito <apolito@google.com>
5 years ago
Edward Lesmes 98eda3f3e4 Revert "depot_tools: Run Python scripts using vpython (Part 1)"
This reverts commit d6186f9936.

Reason for revert: <INSERT REASONING HERE>

Original change's description:
> depot_tools: Run Python scripts using vpython (Part 1)
> 
> Tbr: iannucci@chromium.org
> Bug: 984182
> Change-Id: If36722e190d305f89d63dce91d0a600ddc34ebe3
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1748589
> Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
> Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>

TBR=iannucci@chromium.org,ehmaldonado@chromium.org

Change-Id: I7686985852608d0703bcbbab137df1ce82b29723
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 984182
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1749853
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
6 years ago
Edward Lemur d6186f9936 depot_tools: Run Python scripts using vpython (Part 1)
Tbr: iannucci@chromium.org
Bug: 984182
Change-Id: If36722e190d305f89d63dce91d0a600ddc34ebe3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1748589
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
6 years ago
Raul Tambre 80ee78e7fa Convert print statements to Python 3 style
Ran "2to3 -w -n -f print ./" and manually added imports.
Ran "^\s*print " and "\s+print " to find batch/shell scripts, comments and the like with embedded code, and updated them manually.
Also manually added imports to files, which used print as a function, but were missing the import.

The scripts still work with Python 2.
There are no intended behaviour changes.

Bug: 942522
Change-Id: Id777e4d4df4adcdfdab1b18bde89f235ef491b9f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1595684
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Commit-Queue: Dirk Pranke <dpranke@chromium.org>
Auto-Submit: Raul Tambre <raul@tambre.ee>
6 years ago
Aaron Gable 7817f02543 Reland "Use core.quotePath=false when git is listing files"
This is a reland of 9219d35688

The original was reverted due to a typo (core,quotePath instead
of core.quotePath). This version is fixed.

Original change's description:
> Use core.quotePath=false when git is listing files
>
> This prevents git from putting quotes around some file names
> (those that have astral-plane characters) and not around others.
>
> R=maruel
>
> Bug: 792302
>
> Change-Id: I3b6a6b36c4720116de811b40177b59aa25c263db
> Reviewed-on: https://chromium-review.googlesource.com/815454
> Commit-Queue: Aaron Gable <agable@chromium.org>
> Reviewed-by: Marc-Antoine Ruel <maruel@chromium.org>

Bug: 792302
Recipe-Nontrivial-Roll: build
Recipe-Nontrivial-Roll: build_limited_scripts_slave
Change-Id: I28d2260948aaf63bd865888c2f60e4cdee9aea48
Reviewed-on: https://chromium-review.googlesource.com/822990
Commit-Queue: Aaron Gable <agable@chromium.org>
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
7 years ago
Robbie Iannucci 6aaee3065c Revert "Use core.quotePath=false when git is listing files"
This reverts commit 9219d35688.

Reason for revert: unfortunately this says "core,quotePath" and since it includes recipe changes, we need something that the roller can munch on :(

Original change's description:
> Use core.quotePath=false when git is listing files
> 
> This prevents git from putting quotes around some file names
> (those that have astral-plane characters) and not around others.
> 
> R=​maruel
> 
> Bug: 792302
> Recipe-Nontrivial-Roll: build
> Recipe-Nontrivial-Roll: build_limited_scripts_slave
> Change-Id: I3b6a6b36c4720116de811b40177b59aa25c263db
> Reviewed-on: https://chromium-review.googlesource.com/815454
> Commit-Queue: Aaron Gable <agable@chromium.org>
> Reviewed-by: Marc-Antoine Ruel <maruel@chromium.org>

TBR=maruel@chromium.org,agable@chromium.org

Change-Id: I226388f19024403240a1443eb2b878b9293220e1
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 792302
Reviewed-on: https://chromium-review.googlesource.com/821671
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Commit-Queue: Robbie Iannucci <iannucci@chromium.org>
7 years ago
Aaron Gable 9219d35688 Use core.quotePath=false when git is listing files
This prevents git from putting quotes around some file names
(those that have astral-plane characters) and not around others.

R=maruel

Bug: 792302
Recipe-Nontrivial-Roll: build
Recipe-Nontrivial-Roll: build_limited_scripts_slave
Change-Id: I3b6a6b36c4720116de811b40177b59aa25c263db
Reviewed-on: https://chromium-review.googlesource.com/815454
Commit-Queue: Aaron Gable <agable@chromium.org>
Reviewed-by: Marc-Antoine Ruel <maruel@chromium.org>
7 years ago
Aaron Gable 897bf0b083 git-drover: send mail and don't use WIP mode
R=avayvod

Bug: 738116
Change-Id: Idd1ea46dfd876b800868bba9cc981a4093e1c809
Reviewed-on: https://chromium-review.googlesource.com/556302
Reviewed-by: Andrew Bonventre <andybons@chromium.org>
Commit-Queue: Andrew Bonventre <andybons@chromium.org>
8 years ago
Aaron Gable c7e84d0413 git-drover: TBR appropriate reviewers
When uploading to either Rietveld or Gerrit, this will
cause git-cl to add the appropriate reviewers to the
cherry-pick review, so they're aware the change is being
copied to the release branch.

When uploading to Gerrit, this will also cause git-cl to
set the Code-Review+1 bit, allowing the CL to be landed

R=tandrii@chromium.org

Bug: 714720
Change-Id: Ie04e2657a91e4345796ac2200c0115fb18e460a1
Reviewed-on: https://chromium-review.googlesource.com/486961
Commit-Queue: Aaron Gable <agable@chromium.org>
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
8 years ago
agable 814b1cab2f Remove svn support from smaller git extensions
R=iannucci@chromium.org
BUG=475320

Review-Url: https://codereview.chromium.org/2354313003
8 years ago
scottmg 0205656321 drover win: Use --stdin so update-index doesn't fail on long cmdline
git update-index would fail on long command lines when setting up
a resolve. Instead of passing all the files names on the command line,
pass them through --stdin and a file handle.

BUG=598808

Review-Url: https://codereview.chromium.org/2067653002
9 years ago
rob@robwu.nl 93aa073918 git-drover: Correctly resolve --parent_checkout
git rev-parse --git-dir returns a relative path, e.g. ".git". This
should be resolved relative to the cwd of the git command instead of the
current working dir. The cwd of the git command is set to _parent_repo
(=the absolute path after resolving --parent_checkout), so use that.

TEST=The following completes without errors.
$ cd /tmp
$ git init somegitrepo
$ cd somegitrepo
$ git drover --branch [branch] --cherry-pick [hash] -v --dry-run --parent_checkout /path/to/src
$ cd /path/to/src
$ git drover --branch [branch] --cherry-pick [hash] -v --dry-run

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@298416 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
sammc@chromium.org 8990189aed Support merging with conflicts with git-drover.
Currently, git-drover gives up and cleans up if the cherry-pick fails.
This change allows the user to manually resolve conflicts when using
git-drover.

BUG=404755

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@297429 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
scottmg@chromium.org d4218d4d56 Attempt at making git-drover work on Windows
BUG=404755
R=sammc@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@297055 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
sammc@chromium.org 900a33fb4d Add a git-drover.
This uses the same trick as git-new-workdir to reuse an existing git
checkout without interfering with it. However, this makes it only usable
on platforms where os.symlink exists.

BUG=404755

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

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