summaryrefslogtreecommitdiff
path: root/morphlib/workspace.py
diff options
context:
space:
mode:
authorLars Wirzenius <lars.wirzenius@codethink.co.uk>2013-08-01 11:41:16 +0000
committerLars Wirzenius <lars.wirzenius@codethink.co.uk>2013-08-06 12:12:25 +0000
commit2dcda95c15ca788f47bd49f85618364635088b0d (patch)
tree0e8b6f7a03362c3c551b15c74819b92327bc2a2a /morphlib/workspace.py
parent9dd0065a97e49e6e129cc6a5e656eb0d0e657d86 (diff)
downloadmorph-2dcda95c15ca788f47bd49f85618364635088b0d.tar.gz
Add Workspace.get_default_system_branch_directory_name method
This will be useful later, when we start creating system branch directories.
Diffstat (limited to 'morphlib/workspace.py')
-rw-r--r--morphlib/workspace.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/morphlib/workspace.py b/morphlib/workspace.py
index 3a2269c8..e21581c6 100644
--- a/morphlib/workspace.py
+++ b/morphlib/workspace.py
@@ -53,6 +53,21 @@ class Workspace(object):
def __init__(self, root_directory):
self.root = root_directory
+ def get_default_system_branch_directory_name(self, system_branch_name):
+ '''Determine directory where a system branch would be checked out.
+
+ Return the fully qualified pathname to the directory where
+ a system branch would be checked out. The directory may or may
+ not exist already.
+
+ If the system branch is checked out, but into a directory of
+ a different name (which is allowed), that is ignored: this method
+ only computed the default name.
+
+ '''
+
+ return os.path.join(self.root, system_branch_name)
+
def open(dirname):
'''Open an existing workspace.