Unable to export a subdirectory from a git repository in launchpad

Asked by Heber Parrucci on 2017-05-16

I am trying to export a subdirectory using bzr export. It is a git repository on launchpad. The destination folder remains empty.

Repository: https://git.launchpad.net/qa-regression-testing
Command: bzr export keys lp:qa-regression-testing/notes_testing/secure-boot/keys

Result: the destination folder remains empty.

Question information

Language:
English Edit question
Status:
Solved
For:
Launchpad itself Edit question
Assignee:
No assignee Edit question
Solved by:
Heber Parrucci
Solved:
2017-05-18
Last query:
2017-05-18
Last reply:
2017-05-16
Colin Watson (cjwatson) said : #1

I think this syntax is probably wrong for bzr in some way. But using bzr to export a subdirectory from a git repository seems unnecessarily complicated. You probably want some native git approach, either a simple clone or something like this:

  https://stackoverflow.com/questions/600079/how-do-i-clone-a-subdirectory-only-of-a-git-repository

Heber Parrucci (heber013) said : #2

Thanks for your response. Note that the "bzr export" was working properly with this repo until some days ago. We are using it in some Jenkins jobs and we don't want to clone the whole tree. I tried with "git archive --remote=path" but it throws: fatal: Operation not supported by protocol.
I will try with the suggestion you did by using a sparse checkout.

Heber Parrucci (heber013) said : #3

We finally implemented the git sparse checkout, but since it takes too much time to complete, we combined it with a cache mechanism. Thanks!