post_push hook doesn't work on newly created branches

Bug #750749 reported by Ricardo Kirkner
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Bazaar
Confirmed
High
Unassigned
Breezy
Triaged
Medium
Unassigned

Bug Description

I'm writing a command/hook to automatically subscribe the project owner to branches pushed to launchpad, to make private branches work with our workflow.

So far the post_push hook seems to work, however this only happens if the branch already exists on launchpad; if the branch doesn't exist, the post_push hook doesn't get executed.

Tags: hooks
Martin Pool (mbp)
Changed in bzr:
status: New → Confirmed
importance: Undecided → Medium
tags: added: hooks
Changed in bzr:
importance: Medium → High
Revision history for this message
Martin Pool (mbp) wrote :

Confirmed. I think the problem here is that in bzrlib.push, we use create_clone_on_transport() if the destination does not exist, and that method does not fire post_push. We could change it to do so, or probably better change things so that we just create the destination directory and then push into it.

Revision history for this message
John A Meinel (jameinel) wrote : Re: [Bug 750749] Re: post_push hook doesn't work on newly created branches

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

On 4/5/2011 12:58 AM, Martin Pool wrote:
> Confirmed. I think the problem here is that in bzrlib.push, we use
> create_clone_on_transport() if the destination does not exist, and that
> method does not fire post_push. We could change it to do so, or
> probably better change things so that we just create the destination
> directory and then push into it.
>
> ** Changed in: bzr
> Status: New => Confirmed
>
> ** Changed in: bzr
> Importance: Undecided => Medium
>
> ** Tags added: hooks
>
> ** Changed in: bzr
> Importance: Medium => High
>

Would it make more sense to just use 'post_branch_tip_changed' ? Though
I don't know if it is called for initial push.

John
=:->

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

iEYEARECAAYFAk2a3TMACgkQJdeBCYSNAAPYNgCeICZtswPzKkSUaY3/izbcWuyH
jUwAoIjQsaJla6TkbktNZVsYQFNi8vZL
=qMT1
-----END PGP SIGNATURE-----

Revision history for this message
Andrew Bennetts (spiv) wrote :

> Would it make more sense to just use 'post_branch_tip_changed' ? Though
> I don't know if it is called for initial push.

If it's not triggered by an initial push, it should be :)

Jelmer Vernooij (jelmer)
Changed in brz:
status: New → Triaged
importance: Undecided → Medium
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.