more concise syntax for bzr branch lp:project; bzr push lp:~user/project/newbranch

Bug #358377 reported by Marius Gedminas
4
Affects Status Importance Assigned to Milestone
Bazaar
Confirmed
Medium
Unassigned
Breezy
Fix Released
Medium
Jelmer Vernooij
Launchpad itself
Triaged
Low
Unassigned

Bug Description

James Westby suggested I file a wishlist bug about this, so here goes:

When you clone a project with 'bzr branch lp:projectname', make local modifications, and then want to publish that branch, you currently have to use 'bzr push lp:~yourusername/projectname/yourbranchname'.

When I do this, I feel like I'm repeating myself -- I've already specified my launchpad username with 'bzr launchpad-login', and I already specified the project name when I did 'bzr branch' (and I can see that with bzr info). If I want to publish a public branch of that project, the only bit of new information is the name of my branch.

I therefore suggest that Bazaar's launchpad plugin acquire explicit syntax for this use case: making a public branch of a project. I don't have good syntax in mind -- maybe something like 'bzr push lp:+my/newbranchname'? It kind of feels like it follows Launchpad's convention of using '+' for special names, but there may be other considerations.

Revision history for this message
Marius Gedminas (mgedmin) wrote :

Perhaps I should mention the example that prompted me to file this bug report. According to James Westby, in the future I'll be able to make branches of Ubuntu packages, and publish bugfixes by doing

  bzr branch lp:ubuntu/jaunty/packagename
  vi; bzr commit --fixes lp:123456
  bzr push lp:~mgedmin/ubuntu/jaunty/packagename/mybranchname

Counting the path elements in the last command I cannot help but remember a Monty Python quote: "Five is right out!"

Revision history for this message
Jonathan Lange (jml) wrote :

Filed bug 362068 to highlight the problem with the five segments thing.

More generally, I think that you're right -- it does involve too much repetition. I avoid this by having my Bazaar locations.conf configured like this:

[/home/jml/src]
public_branch = lp:~jml
public_branch:policy = appendpath
push_location = lp:~jml
push_location:policy = appendpath

So that by default, all of my pushes from ~/src/project/branch go to lp:~jml/project/branch. Bazaar should definitely have a better solution to this use case though. Whether it's special syntax or better locations.conf management is an open question.

Changed in launchpad-bazaar:
importance: Undecided → Low
status: New → Triaged
Jonathan Lange (jml)
tags: added: launchpad
Martin Pool (mbp)
Changed in bzr:
status: New → Confirmed
importance: Undecided → Medium
Jelmer Vernooij (jelmer)
tags: added: check-for-breezy
Revision history for this message
Jelmer Vernooij (jelmer) wrote :

Breezy has a "brz publish" command that helps with this:

$ bzr branch lp:brz blah
$ cd blah && hackhackhack
# This will create lp:~$USER/brz/blah:
$ brz publish

tags: removed: check-for-breezy
Changed in brz:
status: New → Fix Released
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

Remote bug watches

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