Merge lp:~brad-fie/bzr-scmproj/bzr-scmproj-subprojectnames-01 into lp:bzr-scmproj

Proposed by Bradley Friedman
Status: Merged
Merged at revision: 387
Proposed branch: lp:~brad-fie/bzr-scmproj/bzr-scmproj-subprojectnames-01
Merge into: lp:bzr-scmproj
Diff against target: 27 lines (+6/-1)
1 file modified
project.py (+6/-1)
To merge this branch: bzr merge lp:~brad-fie/bzr-scmproj/bzr-scmproj-subprojectnames-01
Reviewer Review Type Date Requested Status
Alexander Belchenko Approve
Review via email: mp+81305@code.launchpad.net

Description of the change

made sub projects aware of their names when running project commands. Now, only root branches have a name of "root branch". sub projects will use their own name as specified in the project configuration in which they are referenced.

To post a comment you must log in.
382. By Bradley Friedman

merging in changes

Revision history for this message
Alexander Belchenko (bialix) wrote :

Why do you need this line:

+ isinstance(proj, Project)

It does nothing as I can see.

383. By Bradley Friedman

merging in upstream changes

384. By Bradley Friedman

explicitly added dry-run as option to pcmd, as its not longer and automatic global

385. By Bradley Friedman

merged in upstream. removed local fix for dry-run in favor of upstream fix.

Revision history for this message
Alexander Belchenko (bialix) wrote :

Thank you for your patch. I've merged it.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'project.py'
2--- project.py 2011-06-09 11:13:30 +0000
3+++ project.py 2012-07-14 23:40:24 +0000
4@@ -1139,10 +1139,14 @@
5 is_root = True
6
7 def __init__(self, proj, component_name, url=None, revision=None):
8+ isinstance(proj, Project)
9 self._project = proj
10 self.component_name = component_name
11 if self._project.format == 'v2':
12- self.name = 'root branch'
13+ if not proj.i_am_subproject:
14+ self.name = 'root branch'
15+ else:
16+ self.name = proj.name
17 else:
18 self.name = 'control branch'
19 self.vcs = 'bzr'
20@@ -1201,6 +1205,7 @@
21 try:
22 subp = Project(self.sub_root).open()
23 subp.i_am_subproject = True
24+ subp.name = self.name
25 return subp
26 except ProjectNotFound:
27 # there is no subproject control branch,

Subscribers

People subscribed via source and target branches