branch in the root of treeless shared repository ignores --no-trees option

Bug #305802 reported by Alexander Belchenko
6
Affects Status Importance Assigned to Milestone
Bazaar
Confirmed
Low
Unassigned

Bug Description

bzr 1.10.

C:\Temp\1>bzr init-repo . --no-trees
Shared repository (format: pack-0.92)
Location:
  shared repository: .

C:\Temp\1>bzr init a
Repository branch (format: pack-0.92)
Location:
  shared repository: .
  repository branch: a

C:\Temp\1>bzr init .
Repository tree (format: pack-0.92)
Location:
  shared repository: .
  repository branch: .

Expected behavior: branch in the root of shared repository is also treeless. But in fact it's not:

C:\Temp\1>bzr info -v
Repository tree (format: pack-0.92)
Location:
  shared repository: .
  repository branch: .

Format:
       control: Meta directory format 1
  working tree: Working tree format 4
        branch: Branch format 6
    repository: Packs containing knits without subtree support

In the working tree:
         0 unchanged
         0 modified
         0 added
         0 removed
         0 renamed
         1 unknown
         0 ignored
         0 versioned subdirectories

Branch history:
         0 revisions
         0 committers

Repository:
         0 revisions

Revision history for this message
edam (edam) wrote :

I have found a workaround for this bug which some people may find useful.

I would like to state first that I DO NOT KNOW KNOW NOTHING about bazaar's I am not a bazaar developer and DO NOT KNOW how bazaar's repositories/branches work. So, like me, if you do this it is at your own risk!

You can manually remove the working copy like this:
edam@tims-pc:~/bzrtest$ bzr init-repo project --no-trees
Shared repository (format: pack-0.92)
Location:
  shared repository: project
edam@tims-pc:~/bzrtest$ bzr init project
Repository tree (format: pack-0.92)
Location:
  shared repository: project
  repository branch: project
edam@tims-pc:~/bzrtest$ rm -rf project/.bzr/checkout
edam@tims-pc:~/bzrtest$ bzr info -v project

Perhaps a bzr developer could comment on this workaround - is it safe/correct?

Revision history for this message
Alexander Belchenko (bialix) wrote : Re: [Bug 305802] Re: branch in the root of treeless shared repository ignores --no-trees option

edam пишет:
> I have found a workaround for this bug which some people may find
> useful.
>
> I would like to state first that I DO NOT KNOW KNOW NOTHING about
> bazaar's I am not a bazaar developer and DO NOT KNOW how bazaar's
> repositories/branches work. So, like me, if you do this it is at your
> own risk!
>
> You can manually remove the working copy like this:
> edam@tims-pc:~/bzrtest$ bzr init-repo project --no-trees
> Shared repository (format: pack-0.92)
> Location:
> shared repository: project
> edam@tims-pc:~/bzrtest$ bzr init project
> Repository tree (format: pack-0.92)
> Location:
> shared repository: project
> repository branch: project
> edam@tims-pc:~/bzrtest$ rm -rf project/.bzr/checkout
> edam@tims-pc:~/bzrtest$ bzr info -v project
>
> Perhaps a bzr developer could comment on this workaround - is it
> safe/correct?
>
You can do the same with builtin command:
bzr remove-tree

Though I don't need workaround. I've reported bug, because it's the bug.

Revision history for this message
edam (edam) wrote :

Ah yes, bzr remove-tree is a much better solution! Thanks!

I posted the workaround to help *anyone* affected by the bug BTW - it wasn't meant just for you! ;o)

Revision history for this message
John A Meinel (jameinel) wrote :

stiil present in bzr.dev 5031 (2.2.0dev1)

Changed in bzr:
importance: Undecided → Low
status: New → Confirmed
tags: added: easy
Jelmer Vernooij (jelmer)
tags: added: check-for-breezy
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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