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>
At the moment, this doesn't work too well for something that was just merged to
45.
[(b912ace...)]scottmg@scottmg:/work/cr/src$ git find-releases 55b4c95889d6a72e52bc72702580a62f04f35777
commit 55b4c95889d6a72e52bc72702580a62f04f35777 was:
initially in 47.0.2501.0
merged to undefined (as de54b58d404a0cdf01639ae7260ef10bbb843ed9)
merged to 46.0.2490.19 (as b4ba1071baaabc92cb5a2ca89e238c478eca0075)
("undefined" being the problem). This is because:
[(b912ace...)]scottmg@scottmg:/work/cr/src$ git name-rev --tags de54b58d404a0cdf01639ae7260ef10bbb843ed9
de54b58d404a0cdf01639ae7260ef10bbb843ed9 undefined
But,
[(b912ace...)]scottmg@scottmg:/work/cr/src$ cat .git/refs/remotes/branch-heads/2454
de54b58d404a0cdf01639ae7260ef10bbb843ed9
So, if name-rev --tags says it's not yet tagged, rather than just printing
'undefined', at least say which branch it was merged to. As in:
[(b912ace...)]scottmg@scottmg:/work/cr/src$ git find-releases 55b4c95889d6a72e52bc72702580a62f04f35777
commit 55b4c95889d6a72e52bc72702580a62f04f35777 was:
initially in 47.0.2501.0
merged to branch-heads/2454 [untagged] (as de54b58d404a0cdf01639ae7260ef10bbb843ed9)
merged to 46.0.2490.19 (as b4ba1071baaabc92cb5a2ca89e238c478eca0075)
R=dpranke@chromium.org,primiano@chromium.org
Review URL: https://codereview.chromium.org/1325233005
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@296621 0039d316-1c4b-4281-b951-d872f2087c98
Finds the release(s) for a given change.
Relies on using "git cherry-pick -x" per
http://commondatastorage.googleapis.com/chrome-infra-docs/flat/depot_tools/docs/html/git-drover.html
so that the merge commit message contains the original commit.
Example:
d:\src\cr3\src>git show -s 53cc88da9a258bc4a34c4bff50025ee044c2e64d
commit 53cc88da9a258bc4a34c4bff50025ee044c2e64d
Author: grt <grt@chromium.org>
Date: Tue Jun 2 10:33:09 2015 -0700
Beacons for tracking default browser status.
BUG=488247
R=gab@chromium.org,wfh@chromium.org
Review URL: https://codereview.chromium.org/1146843003
Cr-Commit-Position: refs/heads/master@{#332423}
"Now, where did that ship?"
d:\src\cr3\src>git find-releases 53cc88da9a258bc4a34c4bff50025ee044c2e64d
commit 53cc88da9a258bc4a34c4bff50025ee044c2e64d was:
initially in 45.0.2421.0
merged to 43.0.2357.126 (as 8a5ccc0e0ad6b2237b2fcfffcb0ab24fe97bc77b)
merged to 44.0.2403.39 (as d5d165943a88e51a64fd9e2fbcc781e4aaee270f)
Review URL: https://codereview.chromium.org/1332473003
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@296604 0039d316-1c4b-4281-b951-d872f2087c98