The reason to truncate was simple: make sure we won't run of screen
space. But the truncation algorithm is not optimal, the better option
would be show the beginnig of the path and then end part of the path, in
my opinion. There was also wishlist to show the full path as hint when
you hover on the label, but I'm not sure whether it's implemented or not.
--
All the dude wanted was his rug back
I've grepped for BranchInfo and found in log.py:
lines 267-268:
label = self.branch_label(None, self.branch)
bi = BranchInfo(label, self.tree, self.branch)
And self.branch_label is at line 380 in the same file.
I think that's what you're looking for.
For Windows possible use case is:
bzr qlog C:\path\to\repo\trunk D:\another\path\to\some\repo\trunk
For Linux (imaginable example)
bzr qlog /home/me/project/repo/trunk /tmp/some/trunk
Where is "trunk" and where is "trunk"?
I think the right way to fix that (honestly: annoying) behavior is to
have all branch paths upfront available to collect some statistics about
the set, and choose the best strategy for different use cases.
1) For simple use case: all paths has the same prefix (under the same
repo or inside main working directory in subfolders): strip the common
prefix and show only unique part of the path. That way we will have
either basename for all branches, or basename plus unique prefix related
to subdirectory, e.g. "trunk", "work", "bugfix", and maybe "original/trunk".
2) If some of the branches are from remote location, bzr+ssh, lp, or
something different, we may need to save the URL as much as we can.
3) If we have branches without common prefix (from different drives, or
from different directories from /) then the best we can do is elide the
full path in the middle, effectively showing the beginning of unique
prefix and the trailing part.
That could be quite involved to fix it in log.py, along the lines
303-304 in log.py. I think we'll need to change API of BranchInfo and
found the way to put the label after we have processed all branches and
collected information about their common prefixes. Maybe we just have to
convert label attribute to property of BranchInfo and make sure we can
compute it later.