Warn users when doing checkouts with read-only transports

Bug #189390 reported by Martin Albisetti
16
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar
Confirmed
High
Unassigned
Breezy
Triaged
High
Unassigned

Bug Description

I don't have a branch handy to reproduce this, but a user in IRC reported that when trying to do "bzr update" on a checked-out branch through http, and the branch happens to be locked, bzr returns:

 bzr: ERROR: Cannot lock LockDir(http://bazaar.launchpad.net/...bzr/branch/lock): Transport operation not possible: http does not support mkdir()

Of course, this wasn't a very useful error message for the user.

Users should be warned when checking out a branch through a read-only transport that they might not be able to perform some operations (like the warning about working trees not being updated when pushing to a remote branch), and possibly a better error message could be shown (like what the user can do about it)

Revision history for this message
Robert Collins (lifeless) wrote : Re: [Bug 189390] [NEW] Warn users when doing checkouts with read-only transports

On Tue, 2008-02-05 at 21:23 +0000, Martin Albisetti wrote:
> Public bug reported:
>
> I don't have a branch handy to reproduce this, but a user in IRC
> reported that when trying to do "bzr update" on a checked-out branch
> through http, and the branch happens to be locked, bzr returns:
>
> bzr: ERROR: Cannot lock
> LockDir(http://bazaar.launchpad.net/...bzr/branch/lock): Transport
> operation not possible: http does not support mkdir()
>
> Of course, this wasn't a very useful error message for the user.
>
> Users should be warned when checking out a branch through a read-only
> transport that they might not be able to perform some operations (like
> the warning about working trees not being updated when pushing to a
> remote branch), and possibly a better error message could be shown (like
> what the user can do about it)

No transports are inherently readonly though. For instance, http is
writable via webdav. And writable transports may become readonly. This
can happen when you get removed from a group for example.

-Rob
--
GPG key available at: <http://www.robertcollins.net/keys.txt>.

Revision history for this message
Aaron Bentley (abentley) wrote :

Update should not require write permissions on the master branch.

Revision history for this message
Martin Albisetti (beuno) wrote :

So the bug title/description should be different?
It would seem it's trying to lock the branch for some reason.

Revision history for this message
James Westby (james-w) wrote :

Hi,

On checkout (and I would say branch) bzr could attempt to create
a temporary file with a random name in the source branch .bzr.
If this fails then a warning message could be printed.

A warning message doesn't stop the user from trying things later,
or stop people from adjusting permissions to allow writing. However
it does give a new user a clue as to what to do later.

However I think that fixing these error messages is a better idea.

Thanks,

James

Martin Albisetti (beuno)
Changed in bzr:
importance: Undecided → High
status: New → Confirmed
Jelmer Vernooij (jelmer)
tags: added: confusing-ui
Revision history for this message
anatoly techtonik (techtonik) wrote :

I got this even on "bzr commit". See bug #1415405.

Jelmer Vernooij (jelmer)
tags: added: check-for-breezy
Jelmer Vernooij (jelmer)
tags: removed: check-for-breezy
Changed in brz:
status: New → Triaged
importance: Undecided → High
tags: added: readonly
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

Remote bug watches

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