Commit Graph

2 Commits (29d5e56cd50def56bd97309becdf02c71eba04d5)

Author SHA1 Message Date
scottmg@chromium.org b62f675439 find-releases: handle untagged merges
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
10 years ago
scottmg@chromium.org f4ddadcf25 Add new tool, git find-releases
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
10 years ago