aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorW. Trevor King <wking@drexel.edu>2011-02-24 17:34:40 -0500
committerChris Ball <cjb@laptop.org>2011-02-25 11:23:23 -0500
commit78de5e4a8024c039efa621d8cac77b59b6887936 (patch)
tree5e94eac0bfb3a134bf5289620547f6effef31e88
parent15ca7f1ae0e8452edc0ad174b87ab8ba3904a594 (diff)
downloadbugseverywhere-78de5e4a8024c039efa621d8cac77b59b6887936.tar.gz
Work around bzr filelocking issue on Windows.
-rw-r--r--libbe/storage/vcs/base.py2
-rw-r--r--libbe/storage/vcs/bzr.py7
2 files changed, 7 insertions, 2 deletions
diff --git a/libbe/storage/vcs/base.py b/libbe/storage/vcs/base.py
index 570af17..aba6159 100644
--- a/libbe/storage/vcs/base.py
+++ b/libbe/storage/vcs/base.py
@@ -575,7 +575,7 @@ class VCS (libbe.storage.base.VersionedStorage):
if self._detect(self.repo) == False:
raise VCSUnableToRoot(self)
root = self._vcs_root(self.repo)
- self.repo = os.path.abspath(root)
+ self.repo = os.path.realpath(root)
if os.path.isdir(self.repo) == False:
self.repo = os.path.dirname(self.repo)
self.be_dir = os.path.join(
diff --git a/libbe/storage/vcs/bzr.py b/libbe/storage/vcs/bzr.py
index a00e3ac..9464d1d 100644
--- a/libbe/storage/vcs/bzr.py
+++ b/libbe/storage/vcs/bzr.py
@@ -156,7 +156,12 @@ class Bzr(base.VCS):
path = os.path.join(self.repo, path)
cmd = bzrlib.builtins.cmd_add()
cmd.outf = StringIO.StringIO()
- cmd.run(file_list=[path], file_ids_from=self.repo)
+ kwargs = {'file_ids_from': self.repo}
+ if self.repo == os.path.realpath(os.getcwd()):
+ # Work around bzr file locking on Windows.
+ # See: https://lists.ubuntu.com/archives/bazaar/2011q1/071705.html
+ kwargs.pop('file_ids_from')
+ cmd.run(file_list=[path], **kwargs)
if self.version_cmp(2,2,0) < 0:
cmd.cleanup_now()