prepare-upload pushes unnecessarily when sponsoring

Bug #1999177 reported by Robie Basak
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
git-ubuntu
Fix Released
Wishlist
Robie Basak

Bug Description

When sponsoring an upload, it'd be nice to be able to point to the sponsoree branch instead of making the sponsor push to their own. prepare-upload could do this by fetching/updating the remote ref and checking that the HEAD commit is reachable from it. If it is not, then fall back to the push-to-own-remote behaviour; otherwise use the remote.

Related branches

Revision history for this message
Robie Basak (racb) wrote :

The --branch and --remote options would still be needed to detect which remote ref to use. So it'd be push-to-that-remote if the remote branch isn't up-to-date.

Revision history for this message
Steve Langasek (vorlon) wrote :

Just hit this painfully while trying to sponsor openjdk-17. The repository is huge and pushing a copy to my own namespace just for sponsoring is dire.

Worked around by having the sponsoree run `git ubuntu prepare-upload args` for me.

Revision history for this message
Robie Basak (racb) wrote :

> The repository is huge and pushing a copy to my own namespace just for sponsoring is dire.

Did you try it? I'm under the impression that it should be quick due to being a hardlink based clone on the Launchpad end.

The plan in the bug description is:

> prepare-upload could do this by fetching/updating the remote ref and checking that the HEAD commit is reachable from it.

Would that have been acceptable to you in this use case?

Revision history for this message
Steve Langasek (vorlon) wrote : Re: [Bug 1999177] Re: prepare-upload pushes unnecessarily when sponsoring

On Thu, Mar 02, 2023 at 08:28:10AM -0000, Robie Basak wrote:
> > The repository is huge and pushing a copy to my own namespace just for
> sponsoring is dire.

> Did you try it? I'm under the impression that it should be quick due to
> being a hardlink based clone on the Launchpad end.

I did and it was spending a long time trying to push.

> The plan in the bug description is:
>
> > prepare-upload could do this by fetching/updating the remote ref and
> checking that the HEAD commit is reachable from it.

> Would that have been acceptable to you in this use case?

Yes.

Robie Basak (racb)
Changed in git-ubuntu:
status: Triaged → In Progress
assignee: nobody → Robie Basak (racb)
Revision history for this message
Robie Basak (racb) wrote :

Fixed in 1.1.

Changed in git-ubuntu:
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.