subcommands fail when only a local import exists

Bug #1699541 reported by Robie Basak
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
git-ubuntu
Fix Released
Medium
Unassigned

Bug Description

"git queue sync" expects to find the devel pointers in refs/remotes/pkg/ubuntu/*-devel. However, if I run a local import only, these exist in refs/heads/importer/ubuntu/*-devel, so it doesn't find them.

Workaround for "git queue sync" is to use --parent (and --series, --no-trim, --no-fetch and --source) to specify the parent commit precisely.

Long term, we think we need to teach GitRepository.get_heads_and_versions how to find the branch heads regardless of the two locations in which they might be.

Related branches

Nish Aravamudan (nacc)
Changed in usd-importer:
status: New → Confirmed
importance: Undecided → Medium
Robie Basak (racb)
tags: added: local-importer-ux
Changed in usd-importer:
milestone: none → 1.0
Revision history for this message
Nish Aravamudan (nacc) wrote :

Hrm, while I appreciate the difficulty here, how likely are local imports going to be?

To be clear, get_heads_and_versions can look in multiple prefixes, specified by a namespace (top-level 'directory' in refs/heads/) and a head_prefix (next-level 'directory' in refs/heads/<namespace>/).

Also, get_heads_and_versions only deals with local branches, not remote-tracking branches (as they need to be iterated differently).

I would suggest a couple of approaches, but I'm not sure what is best. Here is my initial proposal, though:

1) Restrict changes to queue code for now.

2) Given there are currently only two locations, maybe do some sort of try/except to test for the two possible ref namespaces to expect things in?

Or

1) Change queue to take a parameter that specifies the ref-namespace to look for the importer stuff? If you are doing a local import, then you would pass --import-ref-namespace=refs/headsimporter/, and it would default to refs/remotes/pkg ?

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

> Hrm, while I appreciate the difficulty here, how likely are local imports going to be?

I think that as long as we support local imports, we should make things work with them. For developers there's a velocity aspect too - I'd like to be able to test changes against other commands without being forced to push changes to the published branches first.

I don't remember what we agreed around the namespacing of local imports. If we don't want to fix it there, I think I favour your second option - an option to queue to tell it to use the local imported namespaces rather than the published ones.

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

> If we don't want to fix it there

s/fix/change/; I didn't mean to imply that it's assumed broken.

Nish Aravamudan (nacc)
Changed in usd-importer:
status: Confirmed → In Progress
Nish Aravamudan (nacc)
Changed in usd-importer:
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.