Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(751)

Issue 4130009: Update cros_changelog to support sort-by-date option. (Closed)

Created:
10 years, 1 month ago by David James
Modified:
9 years, 7 months ago
Reviewers:
diandersAtChromium
CC:
chromium-os-reviews_chromium.org, Mandeep Singh Baines, anush, sosa
Visibility:
Public.

Description

Update cros_changelog to support sort-by-date option. Other changes: 1. Clean up revision handling to be more forgiving if people want to use things that don't start with "cros/". Instead, we only enforce that people use tags if they want to use the one-argument version of cros_changelog. 2. Tags are quoted in the command-line so that people can, for instance, diff 'cros/master{2 days ago}' vs 'cros/master{1 day ago}'. Change-Id: I28c7d77ae83256d4c28411ef589f3e726cc81d80 BUG=chromium-os:8205 TEST=Ran ( ./cros_changelog 0.9.104.0 cros/master > /tmp/test1.html && ./cros_changelog --sort-by-date 0.9.104.0 cros/master > /tmp/test2.html ) Both commands print changes between 0.9.104.0 and master, but the second command prints results sorted by date. Committed: http://chrome-svn/viewvc/chromeos?view=rev&revision=6ceddf0

Patch Set 1 #

Total comments: 1

Patch Set 2 : operator.attrgetter is cool #

Unified diffs Side-by-side diffs Delta from patch set Stats (+25 lines, -15 lines) Patch
M chromite/bin/cros_changelog View 1 4 chunks +25 lines, -15 lines 0 comments Download

Messages

Total messages: 2 (0 generated)
David James
10 years, 1 month ago (2010-10-28 20:30:18 UTC) #1
diandersAtChromium
10 years, 1 month ago (2010-10-28 20:44:07 UTC) #2
LGTM

http://codereview.chromium.org/4130009/diff/1/2
File chromite/bin/cros_changelog (right):

http://codereview.chromium.org/4130009/diff/1/2#newcode194
chromite/bin/cros_changelog:194: changes.sort(key=lambda x: x.commit_date)
...or key=operator.attrgetter("commit_date")

Powered by Google App Engine
This is Rietveld 408576698