Merge lp:~maxb/bzr-svn/wildcard-layout-no-project-path into lp:bzr-svn/1.0

Proposed by Max Bowsher
Status: Work in progress
Proposed branch: lp:~maxb/bzr-svn/wildcard-layout-no-project-path
Merge into: lp:bzr-svn/1.0
Diff against target: 14 lines (+2/-2)
1 file modified
layout/standard.py (+2/-2)
To merge this branch: bzr merge lp:~maxb/bzr-svn/wildcard-layout-no-project-path
Reviewer Review Type Date Requested Status
Jelmer Vernooij (community) Needs Fixing
Review via email: mp+45942@code.launchpad.net

Description of the change

To the best of my understanding, "project" in bzr-svn layout terminology is a sub-path of a Subversion repository which contains all the branches and tags for the conceptual project that the branch currently being operated on is part of.

If I've got that right, it's clearly wrong for WildcardLayout to set the project path to be the same as the branch path. Setting it to "" is a nice safe default, if potentially causing unnecessary work to be done.

I came across this because if the current WildcardLayout is used on a svn repository containing a branch that has been removed in the HEAD revision, a crash can occur because RevisionMetadataProvider.iter_all_changes passes an empty list of prefixes to RevisionMetadataBrowser.

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

On Wed, 2011-01-12 at 00:25 +0000, Max Bowsher wrote:
> Max Bowsher has proposed merging lp:~maxb/bzr-svn/wildcard-layout-no-project-path into lp:bzr-svn.
>
> Requested reviews:
> bzr-svn developers (bzr-svn)
>
> For more details, see:
> https://code.launchpad.net/~maxb/bzr-svn/wildcard-layout-no-project-path/+merge/45942
>
> To the best of my understanding, "project" in bzr-svn layout
> terminology is a sub-path of a Subversion repository which contains all
> the branches and tags for the conceptual project that the branch
> currently being operated on is part of.
Project is a unique identifier for a particular project that can be
found in the repository.

Sharing the project identifier between multiple branches/tags means that
they will share each others tags.

Using the same project identifier is probably not a good idea for
wildcardlayout, because it means the tags will get polluted with
unrelated branches.

  review needsfixing

review: Needs Fixing

Unmerged revisions

3496. By Max Bowsher

WildcardLayout should not set project path.

3495. By Jelmer Vernooij

Support `old_tip` argument to WorkingTree.update().

3494. By Jelmer Vernooij

Add support for old_tip in WorkingTree.update().

3493. By Jelmer Vernooij

Support revision argument to update.

3492. By Jelmer Vernooij

Support layouts that don't provide certain functions.

3491. By Jelmer Vernooij

Fix version check.

3490. By Jelmer Vernooij

Mention API version in error rather than run time version, if possible.

3489. By Jelmer Vernooij

mention subversion API version in mutter.

3488. By Jelmer Vernooij

use a timeout of 20 seconds when waiting for sqlite locks.

3487. By Jelmer Vernooij

'support' diffing binary files.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'layout/standard.py'
2--- layout/standard.py 2010-08-09 21:14:32 +0000
3+++ layout/standard.py 2011-01-12 00:24:57 +0000
4@@ -399,9 +399,9 @@
5 for i in range(len(parts)+1):
6 bp = "/".join(parts[:i])
7 if self.is_branch(bp):
8- return ("branch", bp, bp, path[len(bp):].strip("/"))
9+ return ("branch", "", bp, path[len(bp):].strip("/"))
10 if self.is_tag(bp):
11- return ("tag", bp, bp, path[len(bp):].strip("/"))
12+ return ("tag", "", bp, path[len(bp):].strip("/"))
13
14 raise svn_errors.NotSvnBranchPath(path)
15

Subscribers

People subscribed via source and target branches