Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create helpers for managing untracked repos #317

Open
mkjmdski opened this issue Sep 11, 2021 · 7 comments
Open

Create helpers for managing untracked repos #317

mkjmdski opened this issue Sep 11, 2021 · 7 comments

Comments

@mkjmdski
Copy link

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.

@dmerejkowsky
Copy link
Collaborator

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 ?

@mkjmdski
Copy link
Author

I think I could try with os.walk, breadth-first search might be too much time consuming for me.

@mkjmdski
Copy link
Author

Could you recommend what would be the best approach to implement that in terms of repository structure?

@dmerejkowsky
Copy link
Collaborator

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) ?

@mkjmdski
Copy link
Author

Yeah, exactly this is what my question is about. :).

@dmerejkowsky
Copy link
Collaborator

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.

@Lecrapouille
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants