aboutsummaryrefslogtreecommitdiffstats
path: root/libbe/storage/vcs/base.py
diff options
context:
space:
mode:
authorW. Trevor King <wking@drexel.edu>2010-01-21 13:14:08 -0500
committerW. Trevor King <wking@drexel.edu>2010-01-21 13:14:08 -0500
commit36b970de8e5a4b2e1b91372742ce86819c4254b5 (patch)
tree4ef1870c35dd3b6daaaf3f7453a4bd60ec33c149 /libbe/storage/vcs/base.py
parent4ad9a6d7b17db9abe7d4c11477df1df7c6eac5e5 (diff)
parent508c0c0ec73bdcb802d18b30a6e5f40a04dfed52 (diff)
downloadbugseverywhere-36b970de8e5a4b2e1b91372742ce86819c4254b5.tar.gz
Merge assorted bugfixes and optimizations.
Highlights: * `be new` adds creator field like its supposed to (oops :p). * `be list --xml` uses <be-xml> format (was <bugs>). * `be import-xml` handles root comments appropriately. * `be` raises an appropriate help message. * `be help` works. * `be html` prints Comment.id.user() information. * better SavedSettingsObject._get_saved_settings() avoids data loss. * be-mbox-to-xml -> be-mail-to-xml and adds assorted format support. * be-xml-to-mbox and be-handle-mail work with new libbe layout. * BugDir.uuids() now caches on-disk uuids for speed. * Mercurial detection works for mercurial <= 1.1.2 _and_ >= 1.2 * Fix bugs in VCS._children() relative/absolute path handling.
Diffstat (limited to 'libbe/storage/vcs/base.py')
-rw-r--r--libbe/storage/vcs/base.py15
1 files changed, 10 insertions, 5 deletions
diff --git a/libbe/storage/vcs/base.py b/libbe/storage/vcs/base.py
index 15460b0..9fc43c1 100644
--- a/libbe/storage/vcs/base.py
+++ b/libbe/storage/vcs/base.py
@@ -749,7 +749,8 @@ os.listdir(self.get_path("bugs")):
if revision == None:
id_to_path = self._cached_path_id.path
else:
- id_to_path = lambda id : self._vcs_path(id, revision)
+ id_to_path = lambda id : os.path.join(
+ self.repo, self._vcs_path(id, revision))
if id==None:
path = self.be_dir
else:
@@ -772,9 +773,12 @@ os.listdir(self.get_path("bugs")):
isdir = os.path.isdir
listdir = os.listdir
else:
- id_to_path = lambda id : self._vcs_path(id, revision)
- isdir = lambda path : self._vcs_isdir(path, revision)
- listdir = lambda path : self._vcs_listdir(path, revision)
+ id_to_path = lambda id : os.path.join(
+ self.repo, self._vcs_path(id, revision))
+ isdir = lambda path : self._vcs_isdir(
+ self._u_rel_path(path), revision)
+ listdir = lambda path : self._vcs_listdir(
+ self._u_rel_path(path), revision)
if id==None:
path = self.be_dir
else:
@@ -1046,7 +1050,8 @@ os.listdir(self.get_path("bugs")):
if revision == None: # don't require connection
return libbe.util.encoding.get_file_contents(
path, decode=True).rstrip('\n')
- contents = self._vcs_get_file_contents(path, revision=revision)
+ relpath = self._u_rel_path(path)
+ contents = self._vcs_get_file_contents(relpath, revision=revision)
if type(contents) != types.UnicodeType:
contents = unicode(contents, self.encoding)
return contents.strip()