tsrc
tsrc copied to clipboard
Create helpers for managing untracked repos
Is your feature request related to a problem? Please describe. Sometimes I clone repositories inside tsrc workdir that are not tracked in manifest and it would be great if tsrc had some tools that could help manage this repositories.
Describe the solution you'd like
tsrc list-untracked ideally would walk recursively through the filetree and print git repositories that are not managed by tsrc. This way I could add them to manifest in easy way.
tsrc delete-untracked could work like tsrc list-untracked but would delete untracked repositories instead.
Looks nice. I think we need to implement breadth-first search for untracked git repository (a simple call to os.walk maybe too slow). Wanna try working on a PR ?
I think I could try with os.walk, breadth-first search might be too much time consuming for me.
Could you recommend what would be the best approach to implement that in terms of repository structure?
I think I could try with os.walk, breadth-first search might be too much time consuming for me.
No problem. Go for it :) We can merge a first patch with some simple code and worry about performance later.
Could you recommend what would be the best approach to implement that in terms of repository structure?
Not sure what you mean. Do you want to talk about architecture (where to put the code in terms of modules/classes/functions) ?
Yeah, exactly this is what my question is about. :).
This is a bit hard to discuss on GitHub. I've created a room on Gitter - it should be easier to talk about architecture there.
Just a quick comment to give a usage case that could be fixed thanks to this ticket:
- Current manifest:
- url: [email protected]:foo/bar
dest: bar
- Modified manifest:
- url: [email protected]:foo/bar
dest: new/path/here/bar
- tsrc sync:
We have two folders: bar/ and new/path/here/bar/ Therefore tsrc list-untracked should be called by sync