You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 23, 2023. It is now read-only.
Sometimes there may be a very large repository in HG & Git in which one wants
to open source only one certain directory, such as a sub-project or particular
library.
As far as I can tell, currently the only way to do this is to write a bunch of
editors which delete all folders that aren't being open sourced. This is far
from optimal, as fetching the other folders could be expensive operation, and
writing scrubbers for very complicated (dozens of folders) repositories for
every open source project is error prone. It would be easier to limit a
repository to a certain path.
Enhancement: Sparse checkout
Include an optional "path" field in the repository JSON object in the config
file:
"internal": {
"type": "hg",
"url": "file:///home/mbethencourt/work/test_repos/hg_0",
"project_space": "internal",
"path": "subproject/libraryname"
},
* Without a "path", MOE falls back to old behavior (operating on entire repo).
* With a path, MOE tries to use "sparse" checkout feature. A "renamer"
translator will still probably be used to make the layout match external layout.
Sparse checkouts would be implemented a little differently for each client:
* Git would use the sparse checkout feature (
http://blog.quilitz.de/2010/03/checkout-sub-directories-in-git-sparse-checkouts/
)
* SVN would use either "--non-recursive" or "--depth empty", and then "update"
or "--depth infinite" the specified path
* HG, unfortunately, does not seem to have a sparse checkout feature. It can
still be imitated however by cobbling together a few commands.
Original issue reported on code.google.com by [email protected] on 23 Aug 2011 at 9:15
The text was updated successfully, but these errors were encountered:
Original issue reported on code.google.com by
[email protected]
on 23 Aug 2011 at 9:15The text was updated successfully, but these errors were encountered: