aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAaron Bentley <abentley@panoramicfeedback.com>2006-02-06 13:04:17 -0500
committerAaron Bentley <abentley@panoramicfeedback.com>2006-02-06 13:04:17 -0500
commite5a2a45ca3cd29f0d92f26d9f4e06f1e2fc7baf2 (patch)
treed0e52e89092b4fe0d5c2b308be0e93b6b8babee9
parent4e4c730300a594bc3731c28be7f8da4194ad563d (diff)
parent4b8bcd3818ee319d3ec5086b89083beb0501c784 (diff)
downloadbugseverywhere-e5a2a45ca3cd29f0d92f26d9f4e06f1e2fc7baf2.tar.gz
Merge from upstream
-rw-r--r--libbe/arch.py9
-rw-r--r--libbe/bzr.py25
-rw-r--r--libbe/no_rcs.py9
3 files changed, 31 insertions, 12 deletions
diff --git a/libbe/arch.py b/libbe/arch.py
index 7edba37..b7c8a0b 100644
--- a/libbe/arch.py
+++ b/libbe/arch.py
@@ -172,5 +172,14 @@ def detect(path):
old_path = path
path = os.path.join('..', path)
+def precommit(directory):
+ pass
+
+def commit(directory, summary, body=None):
+ pass
+
+def postcommit(directory):
+ pass
+
name = "Arch"
diff --git a/libbe/bzr.py b/libbe/bzr.py
index d68776d..eb3d17f 100644
--- a/libbe/bzr.py
+++ b/libbe/bzr.py
@@ -36,10 +36,10 @@ def invoke_client(*args, **kwargs):
return status, output
def add_id(filename, paranoid=False):
- invoke_client("add", filename)
+ invoke_client("add", filename, directory='.')
def delete_id(filename):
- invoke_client("remove", filename)
+ invoke_client("remove", filename, directory='.')
def mkdir(path, paranoid=False):
os.mkdir(path)
@@ -51,31 +51,32 @@ def set_file_contents(path, contents):
if add:
add_id(path)
-def lookup_revision(revno):
- return invoke_client("lookup-revision", str(revno)).rstrip('\n')[1]
+def lookup_revision(revno, directory):
+ return invoke_client("lookup-revision", str(revno),
+ directory=directory).rstrip('\n')[1]
-def export(revno, revision_dir):
- invoke_client("export", "-r", str(revno), revision_dir)
+def export(revno, directory, revision_dir):
+ invoke_client("export", "-r", str(revno), revision_dir, directory=directory)
-def find_or_make_export(revno):
- revision_id = lookup_revision(revno)
+def find_or_make_export(revno, directory):
+ revision_id = lookup_revision(revno, directory)
home = os.path.expanduser("~")
revision_root = os.path.join(home, ".bzrrevs")
if not os.path.exists(revision_root):
os.mkdir(revision_root)
revision_dir = os.path.join(revision_root, revision_id)
if not os.path.exists(revision_dir):
- export(revno, revision_dir)
+ export(revno, directory, revision_dir)
return revision_dir
def bzr_root(path):
- return invoke_client("root", path).rstrip('\r')[1]
+ return invoke_client("root", path, dirctory=None).rstrip('\r')[1]
def path_in_reference(bug_dir, spec):
if spec is None:
- spec = int(invoke_client("revno")[1])
+ spec = int(invoke_client("revno", directory=bug_dir)[1])
rel_bug_dir = bug_dir[len(bzr_root(bug_dir)):]
- export_root = find_or_make_export(spec)
+ export_root = find_or_make_export(spec, directory=bug_dir)
return os.path.join(export_root, rel_bug_dir)
diff --git a/libbe/no_rcs.py b/libbe/no_rcs.py
index 7e070b3..1b3b005 100644
--- a/libbe/no_rcs.py
+++ b/libbe/no_rcs.py
@@ -39,4 +39,13 @@ def detect(path):
"""Compatibility function"""
return True
+def precommit(directory):
+ pass
+
+def commit(directory, summary, body=None):
+ pass
+
+def postcommit(directory):
+ pass
+
name = "None"