Feature #2799
Support for Bazaar's shared reposetories (created with init-repo)
| Status: | New | Start: | 2009-02-21 | |
|---|---|---|---|---|
| Priority: | Normal | Due date: | ||
| Assigned to: | - | % Done: | 0% |
|
| Category: | SCM | |||
| Target version: | - | |||
| Resolution: |
Description
Hi,
I don't know if this is a bug or a feature request, but I'm having a shared repository created with bzr init-repo --no-trees project_container. This repo has a branch called trunk, and directories called branches and tags. The branches and tags directories contains new bzr branches.
What I want to do is to have my repository in Redmine point to the project_container directory so that I browse all branches from Redmine. If I do that and run ruby script/runner "Repository.fetch_changesets" -e production I get these messages back:bzr: ERROR: Not a branch: "[...]/project_container/.bzr/branch/".bzr: ERROR: Not a branch: "[...]/project_container/.bzr/branch/".
Is it possible to support this?
To point the repository path in Redmine to project_container/trunk do indeed work, but then of course I can't browse branches which is in tags/branches.
History
Updated by Nick Trew about 1 year ago
+1 for this.
Could Redmine be modified to list all directories within the "root directory"?
If one of these directories doesn't contain the .bzr directory, Redmine will display the "The entry or revision was not found in the repository." error message (which currently shows when attempting to add a shared repository).
Updated by Andrew Burcin about 1 year ago
This would be very useful, especially for development with Bazaar using feature branching workflow.
I am willing to contribute to a bounty to make redmine browsing of Bazaar shared repositories work.
Updated by Nikolai Bochev about 1 year ago
+1 for this also. Bazaar is gaining speed, just look at launchpad, and as of now there isn't an open source issue tracker supporting it's full feature set of workflows . I am also willing to contribute to a bounty not only for making shared repository browsing work within redmine, but a tighter integration with Bazaar in general.
Updated by David Muir 9 months ago
bzrtools has the branches command that lets you list branches in a location (`bzr branches`).
It will list branches regardless of there being a shared repository or not. The difficulty is more that depending on the number of folders, it could take quite a bit of time to search.
It probably wouldn't be a good idea to require the bzrtools plugin though, even though most who use bazaar probably have it installed. Will have a look at the source code for the command to see what it actually does. My guess is that it looks for .bzr folders, then runs bzr info to check and see if it's a branch or shared repository.
Updated by Antti Kaijanmäki 9 months ago
I just found out about Redmine and it seems very interesting. I'm deploying it for testing for our little project and we need support for shared Bazaar repositories. I could work on this myself but as always I'm short on time and I've never even looked at ruby before.
Anyway, if someone begins developing this feature you can count me in for testing :)
+1
Updated by sebastián scarano 8 months ago
oops, I've just stumbled upon this...
http://www.redmine.org/wiki/redmine/RedmineRepositories#Bazaar-repository
silly me...
Updated by Joe Julian 6 months ago
I don't see how the last 2 comments apply to this.
I too would like to be able to have the proper development tree structure available.
Updated by Joe Julian 6 months ago
- bzr info will list 'shared repository: .'
- .bzr/repository exists.
If the path points to a shared repo, some file tree should be built.
Branches can be identified by a similar combination of techniques:- bzr info will list the root repository as 'shared repository'
- .bzr/branch exists.
- bzr info will list the root repository as 'shared repository' and the parent branch as 'parent branch'
As an example, let's examine the following repo:
$ mkdir /var/spool/bzr $ bzr init-repo /var/spool/bzr $ cd /var/spool/bzr $ bzr info Shared repository with trees (format: 2a) Location: shared repository: . $ ls -d .bzr/repository .bzr/repository $ bzr init fubar $ cd fubar $ bzr info Repository tree (format: 2a) Location: shared repository: /var/spool/bzr repository branch: . $ ls -d .bzr/branch .bzr/branch $ bzr branch . foo $ cd foo $ bzr info Repository tree (format: 2a) Location: shared repository: /var/spool/bzr repository branch: . Related branches: parent branch: /var/spool/bzr/fubar $ ls -d .bzr/branch .bzr/branch $ cd /var/spool/bzr $ bzr branch fubar bar $ cd bar $ bzr info Repository tree (format: 2a) Location: shared repository: /var/spool/bzr repository branch: . Related branches: parent branch: /var/spool/bzr/fubar $ ls -d .bzr/branch .bzr/branch
In summary, if the path is a repo, scan the directory tree for directories containing .bzr/branch and run bzr info on those directories. Use that output to find out which branch is the parent and use that information to build the element tree.
I don't know how to do this in ruby, but hopefully someone can take this analysis and put something together.