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

tsrc init should be stateless #179

Closed
dmerejkowsky opened this issue Nov 28, 2019 · 0 comments · Fixed by #185
Closed

tsrc init should be stateless #179

dmerejkowsky opened this issue Nov 28, 2019 · 0 comments · Fixed by #185

Comments

@dmerejkowsky
Copy link
Collaborator

Problem:
Currently the command init is halfway stateful, halfway stateless. By that I mean it is smart enough to read the manifest url from the .tsrc/manifest.yml file, but it is dumb enough to blindly overwrite the group list.

This becomes annoying in the following scenario:

  • There is a default group
  • You run tsrc init
  • A new group foo appears
  • You want to use the repos from the foo group and the default group
  • You must run tsrc init -g default -g foo, because running just tsrc init -g foo would make repos from the defalult groups disappear.

Solution

  • Move the .tsrc/manifest.yml file in .tsrc/workspace.yml and document its format
  • Make init stateless - probably emit a warning or even an error if the file exists

The new scenario then becomes:

  • There is a default group
  • You run tsrc init
  • A new group foo appears
  • You want to use the repos from the foo group and the default group
  • You edit the config in .tsrc/workspace.yml with the new list of groups
  • You run tsrc 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

Successfully merging a pull request may close this issue.

1 participant