aboutsummaryrefslogtreecommitdiffstats
path: root/libbe/rcs.py
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 /libbe/rcs.py
parent148f6d366053422257b1c021cf86fb884c13dff8 (diff)
downloadbugseverywhere-92826d47239312d7ed3cbc6638be44c6e84ca8a3.tar.gz
Added RCS configuration.
Diffstat (limited to 'libbe/rcs.py')
-rw-r--r--libbe/rcs.py32
1 files changed, 15 insertions, 17 deletions
diff --git a/libbe/rcs.py b/libbe/rcs.py
index dd0c008..6dba51a 100644
--- a/libbe/rcs.py
+++ b/libbe/rcs.py
@@ -1,18 +1,16 @@
-from arch import *
-def mkdir(path):
- os.mkdir(path)
- add_id(path)
+def rcs_by_name(rcs_name):
+ """Return the module for the RCS with the given name"""
+ if rcs_name == "Arch":
+ import arch
+ return arch
+ elif rcs_name == "None":
+ import no_rcs
+ return no_rcs
-def set_file_contents(path, contents):
- add = not os.path.exists(path)
- file(path, "wb").write(contents)
- if add:
- add_id(path)
-
-def unlink(path):
- try:
- os.unlink(path)
- delete_id(path)
- except OSError, e:
- if e.errno != 2:
- raise
+def detect(dir):
+ """Return the module for the rcs being used in this directory"""
+ import arch
+ if arch.detect(dir):
+ return arch
+ import no_rcs
+ return no_rcs