Merge lp:~therve/gf.recipe.bzr/destionation-option into lp:~ree/gf.recipe.bzr/trunk

Proposed by Sidnei da Silva
Status: Merged
Merged at revision: not available
Proposed branch: lp:~therve/gf.recipe.bzr/destionation-option
Merge into: lp:~ree/gf.recipe.bzr/trunk
Diff against target: None lines
To merge this branch: bzr merge lp:~therve/gf.recipe.bzr/destionation-option
Reviewer Review Type Date Requested Status
Balazs Ree Approve
Review via email: mp+7802@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Sidnei da Silva (sidnei) wrote :

Add support for a custom destination directory, so that you can keep your bzr branches in a central location outside buildout if you so wish.

Revision history for this message
Balazs Ree (ree) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'gf/recipe/bzr/bzr.py'
2--- gf/recipe/bzr/bzr.py 2009-06-22 17:24:00 +0000
3+++ gf/recipe/bzr/bzr.py 2009-06-23 15:27:33 +0000
4@@ -62,6 +62,7 @@
5 in_parts = False
6 http_authentication = username:password
7 develop = True
8+ destination = /src/code
9
10 For more information, consult the file docs/README.txt in the egg.
11 """
12@@ -96,7 +97,17 @@
13 root_dir = buildout['buildout']['directory']
14 if in_parts.capitalize() == 'True':
15 root_dir = os.path.join(root_dir, 'parts')
16- options['root_dir'] = root_dir = os.path.join(root_dir, name)
17+
18+ options["destination"] = destination = options.get("destination", "")
19+ if destination:
20+ if in_parts.capitalize() == 'True':
21+ self.logger.error(
22+ "Can't specify both in_parts and destination")
23+ raise zc.buildout.UserError("Destination and in_parts specified.")
24+ options["root_dir"] = root_dir = destination
25+ else:
26+ options['root_dir'] = root_dir = os.path.join(root_dir, name)
27+
28 # Process the branches.
29 branches = []
30 for line in options['urls'].splitlines():

Subscribers

People subscribed via source and target branches