"bzr check" does not handle our split up .bzr layout properly (Errors if there is no branch)

Bug #64783 reported by Matthew Paul Thomas
26
Affects Status Importance Assigned to Milestone
Bazaar
Fix Released
Medium
Dan Watkins

Bug Description

bzr check is not internally structured around checking repositories, branches and trees as separate items, its basically the original code from when there was only a Branch object, and as such it currently requires that a Branch be present. It needs to be refactored to:
 - check the repository directly.
 - scan for and find branches in the same repository under the path check was given and check they are valid and their history is in the repository.
 - scan for and find working trees likewise.

Related branches

description: updated
Revision history for this message
Alexander Belchenko (bialix) wrote :

I'm also have this error when runnign this command from shared repository without working trees.

'bzr check' intended to check consistency of branch history (as help says) and I assume it's means check consistency of repository but not working tree of branch.

So I think variant 3 is expected behaviour. I'm also think that 'bzr check' should check repository consistency when running from the root of shared repository.

It's should be not so hard to fix (just try to open branch and don't try to open working tree) so I set Medium importance for this bug.

Changed in bzr:
importance: Undecided → Medium
status: Unconfirmed → Confirmed
Revision history for this message
John A Meinel (jameinel) wrote :

see also bug 111656

We should not fail if there is no WorkingTree, but we should check the working tree if it is available.

This should be easy since we have BzrDir.open_containing_tree_or_branch, which allows us to easily get a WT if it is available, else we just open the branch.

Revision history for this message
Dan Watkins (oddbloke) wrote :

This seems to be fixed in 0.92.0. ``check`` will now run against a branch in a no-trees repo. It does not run against a repository, but fails with a much more germane 'bzr: ERROR: Not a branch: "/home/daniel/devel/blah/.bzr/branch/".' I'll file a separate bug for running ``check`` against a repository.

Changed in bzr:
status: Confirmed → Fix Released
Dan Watkins (oddbloke)
Changed in bzr:
assignee: nobody → lifeless
milestone: none → 1.0rc1
Revision history for this message
Robert Collins (lifeless) wrote :

This is partially fixed as you can now run bzr check on a working tree, but the root problem, of not checking branches/repositories/trees cocneptually separately in the code is not fixed.

Changed in bzr:
assignee: lifeless → nobody
milestone: 1.0rc1 → none
status: Fix Released → Triaged
description: updated
Dan Watkins (oddbloke)
Changed in bzr:
assignee: nobody → daniel-thewatkins
status: Triaged → In Progress
Dan Watkins (oddbloke)
Changed in bzr:
milestone: none → 1.4
status: In Progress → Fix Committed
Revision history for this message
Dan Watkins (oddbloke) wrote :

Fixed in bzr.dev r3521.

Changed in bzr:
milestone: 1.4 → 1.6
status: Fix Committed → 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

Remote bug watches

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