values given to make_log_request_dict are overridden
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Bazaar |
Confirmed
|
Medium
|
Unassigned |
Bug Description
I believe that there's a bug in bzrlib/log.py, where the 'levels' value I pass to `make_log_
The documentation suggests that when making my log request dictionary I should be able to specify 'levels=1' to limit the revisions printed by the Logger to mainline ones only.
However, what actually happens is that the value I specify gets overrwritten in bzrlib/log.py:357 with whatever the log formatter supports. The comment says:
# Tweak the LogRequest based on what the LogFormatter can handle.
# (There's no point generating stuff if the formatter can't display it.)
But the code will overwrite the levels value if the logger supports more levels than I wanted as well as fewer levels than I wanted!
Attached is a simple script that demonstrated the problem. It should print out only mainline revisions from a branch (that is specified as a first argument), but instead it prints out all levels.
Related branches
- Thomi Richards (community): Needs Resubmitting
- bzr-core: Pending requested
-
Diff: 178 lines (+58/-16)2 files modifiedbzrlib/log.py (+19/-15)
bzrlib/tests/test_log.py (+39/-1)
Changed in bzr: | |
importance: | Undecided → Medium |
tags: | added: check-for-breezy |
Attached is a patch which fixes the issue for me.