Commit Graph

11 Commits (57ed3aedaef3e9eabf9d8ea19f99ebbe8925b7be)

Author SHA1 Message Date
Edward Lemur 60b9b6fb91 git_hyper_blame_test: Fix pylint issue.
TBR=agable@chromium.org
Bug: 863669
Change-Id: Id641269f023acc1a89e83e9e5951e933eae93d40
Reviewed-on: https://chromium-review.googlesource.com/1145720
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
7 years ago
Aaron Gable ccd62f4e56 Update git_hyper_blame_test for git 2.16
Change-Id: I9e45c55d1a57a7c275d0524af60c8f644717eb25
Reviewed-on: https://chromium-review.googlesource.com/952076
Commit-Queue: Aaron Gable <agable@chromium.org>
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
7 years ago
Matt Giuca a148b5ee55 git hyper-blame: Fix tabulation of Unicode characters in author name.
Previously, it counted the number of UTF-8 bytes when spacing out the
table, not the number of code points.

Bug: 808905
Change-Id: Ice5504089e0f7097e108c6dfbbb810620b9dfc94
Reviewed-on: https://chromium-review.googlesource.com/901142
Commit-Queue: Matt Giuca <mgiuca@chromium.org>
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
7 years ago
Matt Giuca 6bac8a8499 GitHyperBlameMainTest.testBadFilename: Work around git-blame bug.
A regression in git-blame prints an incorrect error message which causes
this test case to fail. Alter the test to only check the start of the
string, until the bug is fixed upstream.

Bug: 737688
Change-Id: I4045cb8792d8abe984215c7198e213b23e9f6f5d
Reviewed-on: https://chromium-review.googlesource.com/567778
Commit-Queue: Nico Weber <thakis@chromium.org>
Reviewed-by: Nico Weber <thakis@chromium.org>
Reviewed-by: Jochen Eisinger <jochen@chromium.org>
8 years ago
Matt Giuca 17a530722b git hyper-blame: Fixed --no-default-ignores option to not take argument.
BUG=709835

Change-Id: Ia203cf24adf752ef3acdf660b4fe0990503782b9
Reviewed-on: https://chromium-review.googlesource.com/472587
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Commit-Queue: Matt Giuca <mgiuca@chromium.org>
8 years ago
Matt Giuca 2cd3c14ef7 git_hyper_blame: Fix wrong line number on lines changed many times.
This could, in extreme cases, result in a crash due to the wrong line
number being out of bounds of the file line count.

BUG=709831

Change-Id: I08ec75362d49c4a72e7ee9fd489d5f9baa6d31bd
Reviewed-on: https://chromium-review.googlesource.com/472648
Reviewed-by: Nico Weber <thakis@chromium.org>
Reviewed-by: Jochen Eisinger <jochen@chromium.org>
Commit-Queue: Nico Weber <thakis@chromium.org>
8 years ago
mgiuca 1dfe43ca1a Simplify octal constants in Python code (e.g. 0o0700 -> 0o700).
Review-Url: https://codereview.chromium.org/2075923003
9 years ago
vapier 8057ac8802 use py3 compatible octal constants
Review-Url: https://codereview.chromium.org/2076613002
9 years ago
mgiuca@chromium.org cd0a1cf362 git hyper-blame: Added automatically ignoring revs from a file.
Added --ignore-file argument, so you can specify ignored commits in a
file rather than as raw command-line arguments. Also, automatically
searches for a file called .git-blame-ignore-revs, which is
automatically used as an ignore list by default.

Also, specifying an unknown revision (either on the command line or in a
file) now generates a warning, not an error.

Notes on some decisions:
- The file is called .git-blame-ignore-revs (not mentioning hyper-blame)
  because we may use the same list in tools other than hyper-blame in
  the future.
- We look at the *currently checked out* version of
  .git-blame-ignore-revs (not the version at the specified revision) for
  consistency with .git-ignore. Because we only expect revisions to be
  added (not deleted), it should be fine to use an ignore list from a
  newer version than the revision being blamed.
- We considered using git notes for the ignore list so that you could
  add a revision to the ignore list without needing a follow-up CL.
  However, there are some problems with this approach. git notes is not
  automatically synced with git clone/pull. Also the Chromium infra
  tools (Reitveld, CQ) are not set up to allow modification of git
  notes, nor are changes to git notes subject to OWNERS checks. Using a
  regular file ensures all users synced to a particular revision are
  using the same ignore list.

BUG=574290

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@298897 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
mgiuca@chromium.org 01d2cde990 git hyper-blame: Added approx. line number translation.
Previously, when a commit was skipped, it would be blamed on the line
number the line had *after* the skipped commit. This could mean a
totally unrelated commit gets blamed. Now, a heuristic analyses the diff
of the skipped commit to discover approximately what line number the
line had *before* the skipped commit, so it can hopefully be blamed on
the right commit.

BUG=574290

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@298609 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
mgiuca@chromium.org 819375653b Added git hyper-blame, a tool that skips unwanted commits in git blame.
Currently, the script requires you to pass the unwanted commits on the
command line, but eventually, you could configure it with a file
(checked into the repo) that provides a fixed set of commits to always
skip (such as commits that do a huge amount of renaming and nothing
else).

BUG=574290

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

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