aboutsummaryrefslogtreecommitdiffstats
path: root/becommands
diff options
context:
space:
mode:
authorAaron Bentley <aaron.bentley@utoronto.ca>2005-03-19 06:04:41 +0000
committerAaron Bentley <aaron.bentley@utoronto.ca>2005-03-19 06:04:41 +0000
commit92826d47239312d7ed3cbc6638be44c6e84ca8a3 (patch)
tree43f27171822472f5445b7bd1b9bf14b131750c1c /becommands
parent148f6d366053422257b1c021cf86fb884c13dff8 (diff)
downloadbugseverywhere-92826d47239312d7ed3cbc6638be44c6e84ca8a3.tar.gz
Added RCS configuration.
Diffstat (limited to 'becommands')
-rw-r--r--becommands/set.py11
-rw-r--r--becommands/set_root.py10
2 files changed, 19 insertions, 2 deletions
diff --git a/becommands/set.py b/becommands/set.py
new file mode 100644
index 0000000..956a95e
--- /dev/null
+++ b/becommands/set.py
@@ -0,0 +1,11 @@
+"""Change tree settings"""
+from libbe import cmdutil
+def execute(args):
+ assert len(args) in (1, 2)
+ tree = cmdutil.bug_tree()
+ if len(args) == 1:
+ print tree.settings.get(args[0])
+ else:
+ tree.settings[args[0]] = args[1]
+ tree.save_settings()
+
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."