push from lightweight checkout to location with bzrdir creates BranchReference

Bug #159103 reported by James Henstridge
This bug report is a duplicate of:  Bug #376274: push creating wrong format. Edit Remove
6
Affects Status Importance Assigned to Milestone
Bazaar
Confirmed
High
Unassigned
Breezy
Triaged
Medium
Jelmer Vernooij

Bug Description

I don't have a reliable way of reproducing this problem, but thought I'd report it anyway in case anyone else has an insight.

As part of Launchpad development, I'll often push branches to our development server, roughly following this workflow:
 1. create a lightweight checkout of the local copy of the branch
 2. make my changes in the lightweight checkout and commit
 3. run "bzr push" in the lightweight checkout, which will create a new branch and push it via bzr+ssh to the development server.

The destination directory on the development server is part of a shared repository.

Usually this works fine, but once or twice I ended up with a BranchReference object on the server containing the path to the local copy of the branch (which of course does not exist remotely).

It only happens occasionally, but it has also happened to other members of the team so I don't think it is purely related to my local environment.

Tags: checkout push
Revision history for this message
Christian Reis (kiko) wrote :

This happens to me consistently. Here are some details:

kiko@whatever:~$ bzr --version
Bazaar (bzr) 0.90.0

I use a script to create my branches:

# Create the branch in the repository
cd ~/repo/
bzr branch ~/devel/archives/launchpad $1

# Make a lightweight checkout of the new branch
cd ~/devel
bzr checkout --lightweight ~/repo/$1 $1

bzr push --remember \
    bzr+ssh://devpad.canonical.com/code/kiko/launchpad/$1 &

I then use the checkout, commit, commit and then push, and it says no new revisions. I can reproduce this pretty reliably using whatever.async.com.br and devpad.canonical.com.

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

Is this still happening with 1.3?

Revision history for this message
James Henstridge (jamesh) wrote :

I haven't seen reports of problems recently, but that might just be because we've been lucky (I've never been able to find a way of reliably reproducing it).

Revision history for this message
Aaron Bentley (abentley) wrote : Re: [Bug 159103] Re: "bzr push" occasionally creates a branch reference instead of a branch

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

James Henstridge wrote:
> I haven't seen reports of problems recently, but that might just be
> because we've been lucky (I've never been able to find a way of reliably
> reproducing it).

It seemed to be repeatable if you created a .bzrdir and then pushed.

Aaron
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFH94oP0F+nu1YWqI0RAhK8AJ9tV67ERP8iJizUr8BESNd6b4x00wCfdXCN
fbz7bgiWbgSRgncg/h7gRJ0=
=bw0k
-----END PGP SIGNATURE-----

Revision history for this message
Martin Pool (mbp) wrote : Re: "bzr push" occasionally creates a branch reference instead of a branch

I could not reproduce this using kiko's recipe in bzr 1.9. If you're still hitting this, please help us work out how to reproduce it.

Changed in bzr:
status: New → Incomplete
Revision history for this message
James Henstridge (jamesh) wrote :

Attached is a script that replicates the problem for me with bzr-1.9. This is using Aaron's idea of pushing to a location with an existing .bzr dir (in this case, a directory initialised as a repository).

On my system, the script prints the following at the end:

  ./branch format: Bazaar Branch Format 6 (bzr 0.15)
  ./checkout format: Bazaar-NG Branch Reference Format 1
  ./target format: Bazaar-NG Branch Reference Format 1

I'd expect ./target to be a real branch rather than a reference, given that I get a real branch when pushing to a non-existent location.

Revision history for this message
Jelmer Vernooij (jelmer) wrote :

Reproduced here as well. Thanks for the script.

Changed in bzr:
status: Incomplete → Triaged
importance: Undecided → Medium
Vincent Ladeuil (vila)
Changed in bzr:
status: Triaged → Confirmed
Revision history for this message
Jelmer Vernooij (jelmer) wrote :

related to bug 462513?

tags: added: checkout push
summary: - "bzr push" occasionally creates a branch reference instead of a branch
+ push from lightweight checkout to location with bzrdir creates
+ BranchReference
Changed in bzr:
importance: Medium → High
Jelmer Vernooij (jelmer)
tags: added: check-for-breezy
Jelmer Vernooij (jelmer)
tags: removed: check-for-breezy
Changed in brz:
status: New → Triaged
importance: Undecided → Medium
assignee: nobody → Jelmer Vernooij (jelmer)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

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