summaryrefslogtreecommitdiff
path: root/xnt/vcs/__init__.py
diff options
context:
space:
mode:
Diffstat (limited to 'xnt/vcs/__init__.py')
-rw-r--r--xnt/vcs/__init__.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/xnt/vcs/__init__.py b/xnt/vcs/__init__.py
index 64e5706..2e1aa99 100644
--- a/xnt/vcs/__init__.py
+++ b/xnt/vcs/__init__.py
@@ -1,4 +1,5 @@
#!/usr/bin/env python
+"""Version Controll Module"""
# Xnt -- A Wrapper Build Tool
# Copyright (C) 2012 Kenny Ballou
@@ -15,3 +16,14 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+def clone_options(cmd, url, branch=None, dest=None):
+ """Build up common options for clone commands"""
+ new_cmd = list(cmd)
+ if branch:
+ new_cmd.append("--branch")
+ new_cmd.append(branch)
+ cmd.append(url)
+ if dest:
+ new_cmd.append(dest)
+ return new_cmd