Rev 15: Work around bug 124859 in http://people.ubuntu.com/~robertc/baz2.0/plugins/avahi/trunk
Robert Collins
robertc at robertcollins.net
Mon Jul 9 08:17:07 BST 2007
At http://people.ubuntu.com/~robertc/baz2.0/plugins/avahi/trunk
------------------------------------------------------------
revno: 15
revision-id: robertc at robertcollins.net-20070709071707-tgrc4a7989zap6rd
parent: robertc at robertcollins.net-20070709061409-vq3w8qo2lh4tahl5
committer: Robert Collins <robertc at robertcollins.net>
branch nick: trunk
timestamp: Mon 2007-07-09 17:17:07 +1000
message:
Work around bug 124859
modified:
share.py share.py-20070323082617-ua0xkev3o590n4rm-1
=== modified file 'share.py'
--- a/share.py 2007-07-09 06:14:09 +0000
+++ b/share.py 2007-07-09 07:17:07 +0000
@@ -153,7 +153,8 @@
filename = dirs_to_check.pop(0)
if stat.S_ISDIR(trans.stat(filename).st_mode):
try:
- bdir = bzrdir.BzrDir.open(trans.abspath(filename))
+ bpath = trans.abspath(filename)
+ bdir = bzrdir.BzrDir.open(bpath)
branch = bdir.open_branch()
except errors.NotBranchError:
branch = None
@@ -161,7 +162,10 @@
print "Error opening branch %r" % trans.abspath(filename)
raise
- if branch is not None:
+ if branch is not None and branch.base == bpath + "/":
+ # if the branch was found somewhere else it won't share
+ # properly: if it was a reference the repo won't be served,
+ # if it was a symlink a similar problem exists.
trace.mutter("Found branch '%s' (nick %s)"
% (filename, branch.nick))
try:
More information about the bazaar-commits
mailing list