your-tools / tsrc

Manage groups of git repositories
https://your-tools.github.io/tsrc/
BSD 3-Clause "New" or "Revised" License
206 stars 36 forks source link

Syncing a single repository without using groups.... #254

Open natiki opened 4 years ago

natiki commented 4 years ago
tsrc sync repo1[.repo2, repo3]

Basically the ability to sync one or more repos from the command line

mattblovell commented 4 years ago

What is the delimited repository

repo1.repo2

in the example command line intended to denote? Doesn't the manifest file specify a flat list of repos (even if the destination locations happen to be nested)? Is the "." just supposed to be an OS-neutral path separator or are you indeed trying to capture some form of nesting?

natiki commented 4 years ago

Hi Matt,

tsrc sync repo1[.repo2, repo3] was a typo and was mean to be tsrc sync repo1[**,**repo2, repo3] which was meant to represent that you could sync one or more repos ie. [] optional part to command line. Apologies for the confusion.

Apologies for such an abominable specification request. Let me do it properly (hopefully):

image

So what I was aiming for is that the manifest definition could get a logical name added to repos so that we end up with something like:

repos:
  - url: git@gitlab.local:proj1/foo
    dest: foo
    branch: next
    name: dono-foo

repos:
  - url: git@gitlab.local:proj1/bar
    dest: bar
    branch: next
    name: dono-bar

so that from the command line I can do:

tsrc sync -names dono-foo
tsrc sync -names dono-foo, dono-bar

Now I realise I could do it this with the following hacks:

  1. Add each single repo to its own group https://tankerhq.github.io/tsrc/guide/groups/#defining_groups_in_the_manifest
  2. Use name somehow from a remotes definition

Both are clunky.