With pipelines I cannot set push_location and public_branch generally

Bug #843211 reported by Gavin Panella
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar
Fix Released
Medium
Vincent Ladeuil

Bug Description

I have a directory layout like so:

~/Launchpad
     /launchpad <-- repo
         /a-branch
         /b-branch
     /another-project <-- repo
         /foo-branch

I sometimes use pipelines, and to make push locations just work I add
settings like the following to locations.conf, one block per project:

  [/home/gavin/Launchpad/launchpad/*/.bzr/pipes]
  push_location = bzr+ssh://bazaar.launchpad.net/~allenap/launchpad
  push_location:policy = appendpath
  public_branch = bzr+ssh://bazaar.launchpad.net/~allenap/launchpad
  public_branch:policy = appendpath

It would be convenient if I could do this just once instead of once
for each project. For example, it might be interesting if it were
possible to name parts of the pattern in the section heading:

  [/home/gavin/Launchpad/{project}/*/.bzr/pipes]
  push_location = bzr+ssh://bazaar.launchpad.net/~allenap/{project}
  push_location:policy = appendpath
  public_branch = bzr+ssh://bazaar.launchpad.net/~allenap/{project}
  public_branch:policy = appendpath

Perhaps what I'm doing is unnecessary, or silly. I've fumbled along
for a few years slowly accreting stuff in locations.conf, so perhaps
there's a better way.

Tags: config

Related branches

Revision history for this message
Vincent Ladeuil (vila) wrote :

First of all, keep in mind that locations.conf override any branch.conf settings, so if you set a push_location in locations.conf and branch.conf, the later will always be ignored.

To work around this, I use the following trick:

locations:
  [/home/vila/src/bzr/bugs]
  mypush = lp:~vila/bzr
  mypush:policy = appendpath

And then use 'bzr push `bzr config mypush`' when I create the branch on lp.

Not ideal but it let me control the push_location for each branch.

There is a work in progress to allow:

1 - more freedom in option expansion (bug #832013)
  [/home/vila/src/bzr/bugs]
  mypush = lp:~{launchpad_username}/bzr/{nick}

in locations.conf.

2 - a way to specify *default* values for config options by path (bug #832046)

Changed in bzr:
importance: Undecided → High
status: New → Confirmed
tags: added: config
Revision history for this message
John A Meinel (jameinel) wrote : Re: [Bug 843211] Re: With pipelines I cannot set push_location and public_branch generally

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

On 09/12/2011 04:16 PM, Vincent Ladeuil wrote:
> First of all, keep in mind that locations.conf override any branch.conf
> settings, so if you set a push_location in locations.conf and
> branch.conf, the later will always be ignored.
>
> To work around this, I use the following trick:
>
> locations:
> [/home/vila/src/bzr/bugs]
> mypush = lp:~vila/bzr
> mypush:policy = appendpath
>
> And then use 'bzr push `bzr config mypush`' when I create the branch on
> lp.
>
> Not ideal but it let me control the push_location for each branch.
>
> There is a work in progress to allow:
>
> 1 - more freedom in option expansion (bug #832013)
> [/home/vila/src/bzr/bugs]
> mypush = lp:~{launchpad_username}/bzr/{nick}
>
> in locations.conf.
>
> 2 - a way to specify *default* values for config options by path (bug
> #832046)
>

I think Aaron also introduced a config setting for "just the final path
portion, not the whole recursive set". And we might also support "**/"
as part of the matching functions.

I'm not sure if Aaron's change actually landed, though.

John
=:->

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

iEYEARECAAYFAk5uU44ACgkQJdeBCYSNAAOjRQCaA5JKDidlwFucAKtoF3yxHarh
ZUwAoJRLkyIFyWE9FRPp0LZCChzrWxPq
=pqhy
-----END PGP SIGNATURE-----

Martin Pool (mbp)
Changed in bzr:
importance: High → Medium
Vincent Ladeuil (vila)
Changed in bzr:
assignee: nobody → Vincent Ladeuil (vila)
status: Confirmed → In Progress
Vincent Ladeuil (vila)
Changed in bzr:
milestone: none → 2.5b4
status: In Progress → Fix Released
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.