Docs give incorrect advice for setting up bzr+http w/ Apache

Bug #311518 reported by Jean-Baptiste Rouault
18
Affects Status Importance Assigned to Milestone
Bazaar
Fix Released
Low
Neil Martinsen-Burrell
Gentoo Overlay for Bazaar
Fix Released
High
Mark Lee

Bug Description

When running bzr branchhttp://bzr.malept.com/bazaar-overlay/ , i get the following error :
bzr: ERROR: Lock not held: LockableFiles(lock, http://bzr.malept.com/.bzr/repository/)

Tags: doc easy

Related branches

Revision history for this message
Mark Lee (malept) wrote :

Confirmed.

Changed in bzr-gentoo-overlay:
assignee: nobody → malept
importance: Undecided → High
status: New → Confirmed
Revision history for this message
Mark Lee (malept) wrote :

After tracing the error, I think it may be a bug in bzr, mostly because I saw a similar traceback in bug 283479.
Server details:
Bazaar (bzr) 1.9
  Python interpreter: /usr/local/bin/python 2.4.4
  Python standard library: /usr/local/lib/python2.4
  bzrlib: /home/malept/dist/lib/python2.4/site-packages/bzrlib
  Bazaar configuration: /home/malept/.bazaar
  Bazaar log file: /home/malept/.bzr.log

(My) client details:
Bazaar (bzr) 1.10
  Python interpreter: /usr/bin/python 2.5.2
  Python standard library: /usr/lib/python2.5
  bzrlib: /usr/lib/python2.5/site-packages/bzrlib
  Bazaar configuration: /home/malept/.bazaar
  Bazaar log file: /home/malept/.bzr.log

Attaching the bzr.log generated when I ran the following:
BZR_LOG=`pwd`/bzr-lockfiles.log bzr branch -Dhpss -Dlock -Derror -v http://bzr.malept.com/bazaar-overlay/

Revision history for this message
Luke-Jr (luke-jr) wrote :

So... no solution in sight? Why does it seem to only be this repo?

Revision history for this message
Mark Lee (malept) wrote :

Waiting on comments from the Bazaar team, to see if it's Bazaar or my setup (or both) that's causing the problem.

Revision history for this message
Robert Collins (lifeless) wrote : Re: [Bug 311518] Re: Lock not held in repository

It looks like you have a smart server running on that http url. I smell
a bug in the lock synchronisation logic in
RemoteBranch/RemoteRepository, particularly as you're reading from it so
no physical locks should be occuring.

-Rob

Revision history for this message
Andrew Bennetts (spiv) wrote : Re: Lock not held in repository

As I wrote in <https://answers.edge.launchpad.net/launchpad-bazaar/+question/56078>:

"""
It appears that the branch is accessible via bzr+http, but the branch's repository isn't (it is only accessible via HTTP).

I think there are two bugs here:

 1) The server is misconfigured. If a branch's repository isn't accessible via the same protocol/connection as the branch itself, then that branch is unusable.
 2) The client doesn't report the problem gracefully or clearly.

You should be able to workaround the misconfiguration by using "nosmart+http://..."
"""

Revision history for this message
Mark Lee (malept) wrote :

Andrew:
Thanks for your reply. It was indeed a misconfiguration, as smart server support was not enabled for the shared repository. However, I do remember now why I failed to add it - the mod_rewrite statement in the latest user guide did not work for me (My shared host uses Apache 1.3.x).

Instead of the statement in the user guide (which gave a 500 error):

RewriteRule ^(.*/|)\.bzr/smart$ /srv/example.com/scripts/bzr-smart.fcgi

I used the following:

RewriteRule ^(.*/)?\.bzr/smart$ /srv/example.com/scripts/bzr-smart.fcgi

So in addition to the clearer error message, perhaps the user guide should be updated as well?

Changed in bzr-gentoo-overlay:
status: Confirmed → Fix Released
Revision history for this message
John A Meinel (jameinel) wrote :

Sounds like some inconsistencies in Regex handling between versions of Apache.

Do we know if all versions support ()? to optionally match the group?

I would be happy to switch the documentation to whatever Apache is going to support the best.

John A Meinel (jameinel)
summary: - Lock not held in repository
+ Docs give incorrect advice for setting up bzr+http w/ Apache
Changed in bzr:
importance: Undecided → Low
status: New → Confirmed
tags: added: doc easy
Revision history for this message
Neil Martinsen-Burrell (nmb) wrote :

According to the Apache 1.3 docs, the regexp is a "Extended Regular Expression" and according to http://en.wikipedia.org/wiki/Regular_expression#POSIX_Extended_Regular_Expressions that will support the conditional match in the rewrite rule.

Revision history for this message
Martin Pool (mbp) wrote :

I may be missing something obvious here, but what's wrong with the original version?

()? is very basic regex syntax. Is the problem that not everything supports | for alternatives within a group?

Revision history for this message
Mark Lee (malept) wrote :

> ()? is very basic regex syntax. Is the problem that not everything
> supports | for alternatives within a group?

That was my experience.

Vincent Ladeuil (vila)
Changed in bzr:
assignee: nobody → Neil Martinsen-Burrell (nmb)
status: Confirmed → In Progress
milestone: none → 2.3b3
Vincent Ladeuil (vila)
Changed in bzr:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Related questions

Remote bug watches

Bug watches keep track of this bug in other bug trackers.