Merge lp://qastaging/~gagern/bzr/bug869912-log-root-dir into lp://qastaging/bzr

Proposed by Martin von Gagern
Status: Work in progress
Proposed branch: lp://qastaging/~gagern/bzr/bug869912-log-root-dir
Merge into: lp://qastaging/bzr
Prerequisite: lp://qastaging/~gagern/bzr/bug869915-mkdir-quiet
Diff against target: 168 lines (+89/-8) (has conflicts)
4 files modified
bzrlib/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)
Text conflict in doc/en/release-notes/bzr-2.5.txt
To merge this branch: bzr merge lp://qastaging/~gagern/bzr/bug869912-log-root-dir
Reviewer Review Type Date Requested Status
bzr-core Pending
Review via email: mp+78612@code.qastaging.launchpad.net

Commit message

Allow "bzr log dir" to filter on path even if dir names a branch root.

Description of the change

Make "bzr log dir" filter for the given directory even if it is the root directory of its branch. Important for split branches. Use "bzr log -d dir" for old behaviour of listing the complete history of a given branch.

To post a comment you must log in.
Revision history for this message
Jelmer Vernooij (jelmer) wrote :

This has a performance impact for e.g. "bzr log ~/src/bzr/bzr.dev". It would be interesting to know how big that impact is.

Presumably "bzr log" inside of a branch would still show the entire history and "bzr log ." would only show that for the current root. Can you add tests for those as well?

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

Performance impact is highly significant, you don't want to run "bzr log bzr.dev" using the current r6202 state of this branch. So there are basically three solutions, I believe:

1. Don't suggest that command. Get users to type "bzr log -d bzr.dev" instead. I fear users might respond to this in a rather negative way, though.

2. Add some kind of optimization. While walking the history, as long as the specified directory is the root directory, don't do any filtering. Correctly mixing this optimized unfiltered logging with slow filtered logging in the presence of split/join might be tricky, though.

An even better solution would be some general performance improvement for filtered logging. After all, there could theoretically be projects the size of bzr.dev contained in some directories of even larger projects, so filtering by subdir on that scale might be desirable. Have you ever discussed possibilities for this? How do other dvcs handle such requests?

6203. By Martin von Gagern

Add blackbox test for full and root-dir log in current working directory.

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

To talk figures: log of bzr.dev took 1.5s with -d, but 300s without it, which amounts to a factor 200 slow down. :-(

Revision history for this message
Martin Packman (gz) wrote :

> To talk figures: log of bzr.dev took 1.5s with -d, but 300s without it, which
> amounts to a factor 200 slow down. :-(

Ow. I actually do this quite a bit when I don't want to cd between two locations. I imagine people who grew up in a shell have more cunning methods.

Revision history for this message
Martin Pool (mbp) wrote :

We can't really merge this as it is given the performance impact, but I would like there to be a way to do this.

One cheap way would be to just add an option that says to follow the previous history of the root.

Perhaps there is a better way to detect it. Making log filtered by ids faster would be well worth while too, but it's unlikely to ever have zero cost.

I'm going to bump this out of the review queue for now but please do ask if you want to talk more about how to solve it.

Unmerged revisions

6203. By Martin von Gagern

Add blackbox test for full and root-dir log in current working directory.

6202. By Martin von Gagern

Fix typo and improve language.

6201. By Martin von Gagern

Document fix for #869912.

6200. By Martin von Gagern

Make use of quiet subdir creation.

6199. By Martin von Gagern

Merge from bug869915-mkdir-quiet

6198. By Martin von Gagern

Merge from bzr.dev

6197. By Martin von Gagern

Removed one more special case handling of root directory.

6196. By Martin von Gagern

Always pass listed directories in file_ids, even for root directory.
Add support for the --directory option to bzr log.
Currently the filtering by root directory still does not work as intended.

6195. By Martin von Gagern

Forgot to commit after split

6194. By Martin von Gagern

Add blackbox test case for bug #869912.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.