From e9c0a069dc1819fc3225501f362c3e9c130cb72b Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Fri, 22 Jan 2010 14:14:03 -0500 Subject: Add Bzr._vcs_exists() anyway :p --- libbe/storage/vcs/bzr.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'libbe/storage/vcs') diff --git a/libbe/storage/vcs/bzr.py b/libbe/storage/vcs/bzr.py index e1cd2e5..1db50f8 100644 --- a/libbe/storage/vcs/bzr.py +++ b/libbe/storage/vcs/bzr.py @@ -98,6 +98,13 @@ class Bzr(base.VCS): cmd.outf = StringIO.StringIO() cmd.run(file_list=[path], file_ids_from=self.repo) + def _vcs_exists(self, path, revision=None): + manifest = self._vcs_listdir( + self.repo, revision=revision, recursive=True) + if path in manifest: + return True + return False + def _vcs_remove(self, path): # --force to also remove unversioned files. path = os.path.join(self.repo, path) @@ -131,7 +138,7 @@ class Bzr(base.VCS): if 'not present in revision' in str(e): raise base.InvalidPath(path, root=self.repo, revision=revision) raise - return cmd.outf.getvalue() + return cmd.outf.getvalue() def _vcs_path(self, id, revision): manifest = self._vcs_listdir( -- cgit