Importing a non-master git branch is unobvious

Reported by Juhani Numminen on 2012-05-17
70
This bug affects 14 people
Affects Status Importance Assigned to Milestone
Launchpad itself
Low
Unassigned

Bug Description

I would like to import branches other than HEAD from a git repository, but this seems not to be possible.

To reproduce:
1. Go to "Request code import" page for any project, e.g. for Launchpad: https://code.launchpad.net/launchpad/+new-import
2. In section Git, a label says: "The URL of the git repository. The HEAD branch will be imported."

Jelmer Vernooij (jelmer) wrote :

You can specify a different branch to import by adding ",branch=NAME" to the end of the URL.

This should be documented, or we could possibly have a separate field in the UI.

Changed in launchpad:
status: New → Triaged
importance: Undecided → Low
summary: - git import can't import branches other than HEAD
+ document how to import non-HEAD git branches

I had such a guess (write it after a comma, perhaps in the form of a key=VALUE pair) about how to import a branch other than HEAD, based on what I've read at http://doc.bazaar.canonical.com/developers/colocated-branches.html#ui-changes .

Ivan Zakharyaschev (imz) on 2012-08-27
summary: - document how to import non-HEAD git branches
+ can't import a non-HEAD git branch

I've just tried to import a non-HEAD branch, but it doesn't work.

The example is https://code.launchpad.net/~imz/epiphany-browser/ps-memstat-data .

I've written in the Git repo URL field:

git://gitorious.org/ps-memstat/ps-memstat.git,branch=epiphany/ac100-second-longer

Here's the branch I want to import: https://gitorious.org/ps-memstat/ps-memstat/commits/epiphany/ac100-second-longer .

It has the commit with the message "Second longer run to collect stats for epiphany-browser-3.4.1-0ubuntu1 on Toshiba AC100.", but it hasn't been imported to https://code.launchpad.net/~imz/epiphany-browser/ps-memstat-data .

Ivan Zakharyaschev (imz) on 2012-08-27
Changed in launchpad:
status: Triaged → Confirmed
tags: added: branch bzr git
Curtis Hovey (sinzui) on 2012-09-14
Changed in launchpad:
status: Confirmed → Triaged
summary: - can't import a non-HEAD git branch
+ can't import a non-master git branch
Curtis Hovey (sinzui) on 2012-10-29
tags: added: feature

It's 2014 now, any update on this ?

William Grant (wgrant) wrote :

As the comments above describe, one can import a non-HEAD git branch by appending ",branch=FOO" to the URL. There's no obvious UI for it, and that's what this bug covers now.

summary: - can't import a non-master git branch
+ Importing a non-master git branch is unobvious
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers