New issue
Advanced search Search tips

Issue 917159 link

Starred by 2 users

Issue metadata

Status: Started
Owner:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

Add --merge-base-branch to lastchange.py

Project Member Reported by eliribble@chromium.org, Dec 20

Issue description

Chromecast internal project has a location modification to lastchange.py that causes it to only consider changes from the last merge point. This exclused any local changes when calculating the last change.

Rather than maintain this as a patch to lastchange.py it seems reasonable to create a generic switch that we can just use. --merge-base-branch will take a branch name and calculate the merge base between HEAD and the provided branch and filter the lastchange calculation to only include changes to that merge point.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Jan 7

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/fb941d6f96a1815eb737c5a91cbd6d119b59e387

commit fb941d6f96a1815eb737c5a91cbd6d119b59e387
Author: Eli Ribble <eliribble@chromium.org>
Date: Mon Jan 07 20:21:52 2019

Add --merge-base-ref option to lastchange.py

This option allows the chromecast platform team to remove some custom
logic in favor of a general flag that anyone can use. The
--merge-base-ref flag takes a ref, such as
"origin/chromium/src" and limits lastchange's calculations to the merge
base between HEAD and that ref

As part of this commit I simplified the VersionInfo class because it
didn't need the aditional complexity of not being named-tuple. After a
review of the various uses of RunGitCommand it seemed prudent to fold
in the returncode and error checking into the RunGitCommand function
to simplify the rest of the code.

This commit also moves towards a model of failing early and providing
messaging to the user about why the command failed. This led to
factoring out the FetchVersionInfo function which no longer does useful
work and to calculating the git top directory early in the process and
using it throughout.

Bug: 917159
Test: None
Change-Id: If58a956f51ccc019c7be860227a0039cdc0709b8
Reviewed-on: https://chromium-review.googlesource.com/c/1387690
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Commit-Queue: Eli Ribble <eliribble@chromium.org>
Cr-Commit-Position: refs/heads/master@{#620447}
[modify] https://crrev.com/fb941d6f96a1815eb737c5a91cbd6d119b59e387/build/util/lastchange.py

Status: Fixed (was: Started)
Project Member

Comment 3 by bugdroid1@chromium.org, Jan 8

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/bff8ece152ca22576538a6d1e117a27eb689ccb0

commit bff8ece152ca22576538a6d1e117a27eb689ccb0
Author: Alexander Alekseev <alemate@chromium.org>
Date: Tue Jan 08 21:22:39 2019

Revert "Add --merge-base-ref option to lastchange.py"

This reverts commit fb941d6f96a1815eb737c5a91cbd6d119b59e387.

Reason for revert: Compile failure on internal builders.

Bug: 919777

Original change's description:
> Add --merge-base-ref option to lastchange.py
> 
> This option allows the chromecast platform team to remove some custom
> logic in favor of a general flag that anyone can use. The
> --merge-base-ref flag takes a ref, such as
> "origin/chromium/src" and limits lastchange's calculations to the merge
> base between HEAD and that ref
> 
> As part of this commit I simplified the VersionInfo class because it
> didn't need the aditional complexity of not being named-tuple. After a
> review of the various uses of RunGitCommand it seemed prudent to fold
> in the returncode and error checking into the RunGitCommand function
> to simplify the rest of the code.
> 
> This commit also moves towards a model of failing early and providing
> messaging to the user about why the command failed. This led to
> factoring out the FetchVersionInfo function which no longer does useful
> work and to calculating the git top directory early in the process and
> using it throughout.
> 
> Bug: 917159
> Test: None
> Change-Id: If58a956f51ccc019c7be860227a0039cdc0709b8
> Reviewed-on: https://chromium-review.googlesource.com/c/1387690
> Reviewed-by: Dirk Pranke <dpranke@chromium.org>
> Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
> Commit-Queue: Eli Ribble <eliribble@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#620447}

TBR=dpranke@chromium.org,tandrii@chromium.org,eliribble@chromium.org

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: 917159
Change-Id: Id6134dad46603cb056f8351279b5522c3c6f151d
Reviewed-on: https://chromium-review.googlesource.com/c/1400836
Reviewed-by: Alexander Alekseev <alemate@chromium.org>
Commit-Queue: Alexander Alekseev <alemate@chromium.org>
Cr-Commit-Position: refs/heads/master@{#620881}
[modify] https://crrev.com/bff8ece152ca22576538a6d1e117a27eb689ccb0/build/util/lastchange.py

Project Member

Comment 4 by bugdroid1@chromium.org, Jan 8

Labels: merge-merged-3665
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/0f2c3ba8910425b4cd6cdec2d2f3527c6ef4d66b

commit 0f2c3ba8910425b4cd6cdec2d2f3527c6ef4d66b
Author: Alexander Alekseev <alemate@chromium.org>
Date: Tue Jan 08 21:30:35 2019

Revert "Add --merge-base-ref option to lastchange.py"

This reverts commit fb941d6f96a1815eb737c5a91cbd6d119b59e387.

Reason for revert: Compile failure on internal builders.

Bug: 919777

Original change's description:
> Add --merge-base-ref option to lastchange.py
>
> This option allows the chromecast platform team to remove some custom
> logic in favor of a general flag that anyone can use. The
> --merge-base-ref flag takes a ref, such as
> "origin/chromium/src" and limits lastchange's calculations to the merge
> base between HEAD and that ref
>
> As part of this commit I simplified the VersionInfo class because it
> didn't need the aditional complexity of not being named-tuple. After a
> review of the various uses of RunGitCommand it seemed prudent to fold
> in the returncode and error checking into the RunGitCommand function
> to simplify the rest of the code.
>
> This commit also moves towards a model of failing early and providing
> messaging to the user about why the command failed. This led to
> factoring out the FetchVersionInfo function which no longer does useful
> work and to calculating the git top directory early in the process and
> using it throughout.
>
> Bug: 917159
> Test: None
> Change-Id: If58a956f51ccc019c7be860227a0039cdc0709b8
> Reviewed-on: https://chromium-review.googlesource.com/c/1387690
> Reviewed-by: Dirk Pranke <dpranke@chromium.org>
> Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
> Commit-Queue: Eli Ribble <eliribble@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#620447}

TBR=alemate@chromium.org, dpranke@chromium.org, eliribble@chromium.org, tandrii@chromium.org


(cherry picked from commit bff8ece152ca22576538a6d1e117a27eb689ccb0)

Bug: 917159
Change-Id: Id6134dad46603cb056f8351279b5522c3c6f151d
Reviewed-on: https://chromium-review.googlesource.com/c/1400836
Reviewed-by: Alexander Alekseev <alemate@chromium.org>
Commit-Queue: Alexander Alekseev <alemate@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#620881}
Reviewed-on: https://chromium-review.googlesource.com/c/1401522
Cr-Commit-Position: refs/branch-heads/3665@{#5}
Cr-Branched-From: 03c190c7f46227b627a6d9bceea854ff0b079383-refs/heads/master@{#620590}
[modify] https://crrev.com/0f2c3ba8910425b4cd6cdec2d2f3527c6ef4d66b/build/util/lastchange.py

Status: Started (was: Fixed)

Sign in to add a comment