shared repository with multiple branches doesn't work
| Affects | Status | Importance | Assigned to | Milestone | |
|---|---|---|---|---|---|
| Trac-Bzr |
Fix Released
|
Undecided
|
Unassigned | ||
Bug Description
Steps to reproduce:
1) Create a shared repository with multiple branches:
$ bzr init-repo --no-trees /path/to/repo
$ bzr branch <something1> /path/to/
$ bzr branch <something2> /path/to/
2) Point trac-bzr at the repository (repository = /path/to/repo)
3) Navigate to the browser and look at both branches
Expected result:
Both "something1" and "something2" branches should be navigable and show the correct files and revision numbers while browsing the branch.
Actual result:
For the sake of this explanation, let's assume that "something1" was the most recently active (committed to) branch.
No matter which branch you navigate to, the contents of the branch with the *most recent revision* (for the sake of this example, "something1") is always the one whose contents are shown.
Another symptom of this problem is when viewing the contents of the something2 branch, all revision ids listed in the "Rev" column of the browser are incorrectly resolved, resulting in revisions like: "pawalls%
My memory is kinda hazy, but I looked into the problem a bit earlier. Take this with a grain of salt, but based on what I can recall:
- Trac calls get_youngest_
- Trac then calls get_node() with the original request branch ("something2") and the youngest revision ("something1,1234")
- trac-bzr turns the result into a string using string_rev() which fails to find such a revision in "something2", so it returns the bzr hashed revision.
- this string is used by Trac later to derive the string to show in the Rev column
- get_node() calls get_containing_
Workaround:
You can view the branch correctly if you append "?rev=current:" to the Trac URL produced by the browser.
Related branches
| description: | updated |
| Changed in trac-bzr: | |
| status: | New → Fix Released |
I have pushed a branch that might be able to fix this problem. I don't know if it is the most correct way to fix the problem, but it seems to fix the problem on my installation.