Importer clobbers existing directory before importing
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
git-ubuntu |
Fix Released
|
Medium
|
Unassigned |
Bug Description
My use case: investigating an importer failure
git ubuntu import -v -d texinfo texinfo
# fails as expected
git ubuntu import -v -d texinfo texinfo
Expected behaviour: resume import from where it left off, and fail almost immediately.
Actual behaviour: reimport everything from scratch and then fail.
Perhaps my expectations are mismatched with some other use cases (such as always trusting pkg). But I also tried --no-fetch, and it also clobbers in that case AFAICT.
Previously I think we concluded that pkg should be favoured. I now think that if the local branches are strictly fast forward of them, or if pkg doesn't exist, then perhaps we should perhaps resume from the current state, as used to happen before the restructuring.
There may be cases I haven't considered which means that this doesn't make sense. If so, I'd at least like an option for it to not clobber.
Another use case that a fix for this might support is maintaining some kind of forked importer and a mutated local imported branch for development purposes.
tags: | added: local-importer-ux |
Changed in usd-importer: | |
status: | New → Triaged |
importance: | Undecided → Medium |
milestone: | none → 1.0 |
Changed in usd-importer: | |
status: | Triaged → In Progress |
Changed in usd-importer: | |
status: | In Progress → Fix Released |
Relevent bit of spec:
git fetch (according to `git ubuntu clone` refspecs) importer/ * importer/ * importer/ {debian, ubuntu} /* importer/ * # in case the local tags have been manipulated
# do we want a flag to prevent the following?
delete refs/heads/
delete refs/tags/
copy refs/remotes/pkg/* to refs/heads/
fetch refs/tags/* to refs/tags/
Relevent bit of code (importer.py):
if not args.no_fetch:
if not args.no_fetch:
I think the base reference copy must be failing. I wonder if it's not copying the tags correctly in that case.