aboutsummaryrefslogtreecommitdiffstats
path: root/becommands/set_root.py
diff options
context:
space:
mode:
Diffstat (limited to 'becommands/set_root.py')
-rw-r--r--becommands/set_root.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/becommands/set_root.py b/becommands/set_root.py
index 0775da3..ff7662a 100644
--- a/becommands/set_root.py
+++ b/becommands/set_root.py
@@ -1,7 +1,13 @@
"""Assign the root directory for bug tracking"""
-from libbe import bugdir, cmdutil
+from libbe import bugdir, cmdutil, rcs
def execute(args):
if len(args) != 1:
raise cmdutil.UserError("Please supply a directory path")
- bugdir.create_bug_dir(args[0])
+ dir_rcs = rcs.detect(args[0])
+ if dir_rcs.name is not "None":
+ print "Using %s for revision control." % dir_rcs.name
+ else:
+ print "No revision control detected."
+ bugdir.create_bug_dir(args[0], dir_rcs)
+ print "Directory initialized."