From: Aaron Bentley Date: Thu, 26 May 2005 14:46:51 +0000 (+0000) Subject: Fixed bzr 'revlib' handling X-Git-Tag: 1.0.0~278 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=52da11569b268908278aec65de2c0b2c4037502c;p=be.git Fixed bzr 'revlib' handling --- diff --git a/libbe/bzr.py b/libbe/bzr.py index c653b2a..fd6d4a6 100644 --- a/libbe/bzr.py +++ b/libbe/bzr.py @@ -55,12 +55,15 @@ def lookup_revision(revno): return invoke_client("lookup-revision", str(revno)).rstrip('\n') def export(revno, revision_dir): - invoke_client("export", str(revno), revision_dir) + invoke_client("export", "-r", str(revno), revision_dir) def find_or_make_export(revno): revision_id = lookup_revision(revno) home = os.path.expanduser("~") - revision_dir = os.path.join(home, ".bzrrevs", revision_id) + 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) return revision_dir