Feature #4741

Improve Bazaar repositories error message in case to use shared repository

Added by Joe Julian over 7 years ago. Updated almost 6 years ago.

Status:NewStart date:2009-02-21
Priority:NormalDue date:
Assignee:Toshi MARUYAMA% Done:

0%

Category:SCM
Target version:Candidate for next major release
Resolution:

Description

This was originally miscategorized as Feature #2799.
This is a common use case as it prevents the standard trunk/branch/tag development structure.

A shared repository created with bzr init-repo errors when running 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/".

If we point at a sub-tree, there's still no support for branches.

There are 2 ways to identify the shared repository:
  • 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.
Sub branches:
  • 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:
[...]

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.


Related issues

Related to Redmine - Feature #2799: Support for Bazaar's shared reposetories (created with in... New 2009-02-21
Related to Redmine - Defect #7984: Confusing revisions links on repository root New 2011-03-24
Related to Redmine - Patch #9129: Improve wording of Git repository note at project setting Closed 2011-08-26

Associated revisions

Revision 5890
Added by Toshi MARUYAMA over 6 years ago

scm: bazaar: add adapter method to get .bzr/branch/branch.conf path from specified path (#2799, #4741, #8030).

Revision 5891
Added by Toshi MARUYAMA over 6 years ago

scm: bazaar: add unit adapter test to get .bzr/branch/branch.conf path from specified path (#2799, #4741, #8030).

Revision 5892
Added by Toshi MARUYAMA over 6 years ago

scm: bazaar: add adapter method to get "append_revisions_only" value from .bzr/branch/branch.conf (#2799, #4741, #8030).

Revision 5893
Added by Toshi MARUYAMA over 6 years ago

scm: bazaar: add unit adapter test to get "append_revisions_only" value from test repository .bzr/branch/branch.conf (#2799, #4741, #8030).

Revision 5894
Added by Toshi MARUYAMA over 6 years ago

scm: bazaar: use explicit return value in adapter branch_conf_path() (#2799, #4741, #8030).

Revision 5895
Added by Toshi MARUYAMA over 6 years ago

scm: bazaar: check not nil in adapter append_revisions_only() (#2799, #4741, #8030).

Revision 5899
Added by Toshi MARUYAMA over 6 years ago

scm: add exception of fetching revisions error in repository model (#5357, #2799, #4741, #8030).

Revision 5932
Added by Toshi MARUYAMA over 6 years ago

scm: bazaar: update test repository (#2799, #4741, #8030).

  • Shared repository with trees (format: 2a)
  • clone original branch to trunk
  • set append_revisions_only = true at trunk/.bzr/branch/branch.conf

Revision 5935
Added by Toshi MARUYAMA over 6 years ago

scm: bazaar: add unit adapter test that shared repository "append_revisions_only" is false (#2799, #4741, #8030).

adapter append_revisions_only() checks whether .bzr/branch/branch.conf exists.

Revision 5936
Added by Toshi MARUYAMA over 6 years ago

scm: bazaar: rename unit adapter test "test_append_revisions_only" to "test_append_revisions_only_true" (#2799, #4741, #8030).

Revision 5937
Added by Toshi MARUYAMA over 6 years ago

scm: bazaar: add unit adapter test that append_revisions_only is false in test shared repository branch (#2799, #4741, #8030).

History

#1 Updated by Toshi MARUYAMA over 6 years ago

  • Priority changed from High to Normal

#2 Updated by Toshi MARUYAMA over 6 years ago

  • Estimated time deleted (2.00)

#3 Updated by Toshi MARUYAMA over 6 years ago

  • Assignee set to Toshi MARUYAMA
  • Target version set to 1.3.0

#4 Updated by André Bachmann over 6 years ago

Is there a way how I can get your changes into my Redmine 1.2.0? Or can I simply copy bazaar_adapter.rb and abstract_adapter.rb from redmine/trunk to my Redmine 1.2.0?

#5 Updated by Toshi MARUYAMA about 6 years ago

  • Subject changed from Bazaar repositories error to Improve Bazaar repositories error in case to use shared repository

#6 Updated by Toshi MARUYAMA about 6 years ago

  • Subject changed from Improve Bazaar repositories error in case to use shared repository to Improve Bazaar repositories error message in case to use shared repository

#7 Updated by Toshi MARUYAMA about 6 years ago

  • Tracker changed from Defect to Feature

#8 Updated by Toshi MARUYAMA almost 6 years ago

  • Target version changed from 1.3.0 to Candidate for next major release

Also available in: Atom PDF