No way to filter log for root of split branch
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Bazaar |
Confirmed
|
Medium
|
Unassigned |
Bug Description
If you split a branch from some larger code base, there appears to be no way to log only those revisions touching that branch. In particular, the "log somedir" does not filter for the given directory in case of somedir being the root of a branch.
Fixing this might mean adding a -d option to "bzr log", so that users can distinguish between "all revisions for a named branch" and "all revisions touching a named dir".
I'd expect the following behaviour, in test script syntax:
$ bzr init -q .
$ bzr mkdir sub
added sub
$ echo foo_content > sub/foo
$ bzr add -q sub/foo
$ bzr commit -q -m "created sub"
$ echo bar_content > bar
$ bzr add -q bar
$ bzr commit -q -m "not modifying sub"
$ bzr log --log-format=line sub
1: <email address hidden> ... created sub
$ bzr split sub
$ bzr log --log-format=line sub
1: <email address hidden> ... created sub
What actually happens is that the last log prints revision 2 as well. Makes sense in some cases, but there apparently is no way to get the behaviour I expect, and there should be, for there are also cases where that is what is required.
Related branches
- bzr-core: Pending requested
-
Diff: 168 lines (+89/-8) (has conflicts)4 files modifiedbzrlib/builtins.py (+5/-6)
bzrlib/log.py (+0/-2)
bzrlib/tests/blackbox/test_log.py (+76/-0)
doc/en/release-notes/bzr-2.5.txt (+8/-0)
Changed in bzr: | |
status: | New → Confirmed |
importance: | Undecided → Medium |
tags: | added: log |
tags: | added: check-for-breezy |
The example script above doesn't commit after the split, so it is bound to fail. Fixed that in the test case in the attached branch, and also included a proposed fix in there. Please review and consider for merging.