No way to filter log for root of split branch

Bug #869912 reported by Martin von Gagern
6
This bug affects 1 person
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

Revision history for this message
Martin von Gagern (gagern) wrote :

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.

Jelmer Vernooij (jelmer)
Changed in bzr:
status: New → Confirmed
importance: Undecided → Medium
tags: added: log
Jelmer Vernooij (jelmer)
tags: added: check-for-breezy
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.