aboutsummaryrefslogtreecommitdiffstats
path: root/libbe/storage/vcs/base.py
diff options
context:
space:
mode:
authorW. Trevor King <wking@drexel.edu>2009-12-13 23:14:06 -0500
committerW. Trevor King <wking@drexel.edu>2009-12-13 23:14:06 -0500
commitb1ddf38a32c49f7e90168014c9ec1efce86cf1fb (patch)
treea14f91b7bd1a5b827acde6c691be3bdd4819fb99 /libbe/storage/vcs/base.py
parente3a48b356ace6bd88f064fb65f16c53dfdc5f8eb (diff)
downloadbugseverywhere-b1ddf38a32c49f7e90168014c9ec1efce86cf1fb.tar.gz
Moved Arch over to Storage format
Diffstat (limited to 'libbe/storage/vcs/base.py')
-rw-r--r--libbe/storage/vcs/base.py19
1 files changed, 18 insertions, 1 deletions
diff --git a/libbe/storage/vcs/base.py b/libbe/storage/vcs/base.py
index 662fc30..69e412e 100644
--- a/libbe/storage/vcs/base.py
+++ b/libbe/storage/vcs/base.py
@@ -446,6 +446,7 @@ os.listdir(self.get_path("bugs")):
kwargs['encoding'] = libbe.util.encoding.get_filesystem_encoding()
libbe.storage.base.VersionedStorage.__init__(self, *args, **kwargs)
self.versioned = False
+ self.interspersed_vcs_files = False
self.verbose_invoke = False
self._cached_path_id = CachedPathID()
self._rooted = False
@@ -514,6 +515,18 @@ os.listdir(self.get_path("bugs")):
"""
pass
+ def _vcs_is_versioned(self, path):
+ """
+ Return true if a path is under version control, False
+ otherwise. You only need to set this if the VCS goes about
+ dumping VCS-specific files into the .be directory.
+
+ If you do need to implement this method (e.g. Arch), set
+ self.interspersed_vcs_files = True
+ """
+ assert self.interspersed_vcs_files == False
+ raise NotImplementedError
+
def _vcs_get_file_contents(self, path, revision=None):
"""
Get the file contents as they were in a given revision.
@@ -704,7 +717,11 @@ os.listdir(self.get_path("bugs")):
for i,c in enumerate(children):
if c == None: continue
cpath = os.path.join(path, c)
- children[i] = self._cached_path_id.id(cpath)
+ if self.interspersed_vcs_files == True \
+ and self._vcs_is_versioned(cpath) == False:
+ children[i] = None
+ else:
+ children[i] = self._cached_path_id.id(cpath)
return [c for c in children if c != None]
def _get(self, id, default=libbe.util.InvalidObject, revision=None):