Skip to content

Sync everything when there are groups #360

@vonpupp

Description

@vonpupp

Hello,

I have the following manifest:

repos:
  - dest: org
    branch: main
    remotes:
    - name: origin
      url: git@gitlab.com:vonpupp-org/org.git
    - name: https
      url: https://vonpupp:<token>@gitlab.com/vonpupp-org/org.git
    - name: nas
      url: ssh://nas/share/repos/gitlab.com:vonpupp-org:org.git
  - dest: org-media
    branch: main
    remotes:
    - name: origin
      url: git@gitlab.com:vonpupp-org/org-media.git
    - name: https
      url: https://vonpupp:<token>@gitlab.com/vonpupp-org/org-media.git
    - name: nas
      url: ssh://nas/share/repos/gitlab.com:vonpupp-org:org-media.git
  - dest: albertdelafuente.com-hugo-refined
    branch: master
    remotes:
    - name: origin
      url: git@gitlab.com:albertdelafuentecom/albertdelafuente.com-hugo-refined.git
    - name: https
      url: https://vonpupp:<token>@gitlab.com/albertdelafuentecom/albertdelafuente.com-hugo-refined.git
    - name: nas
      url: ssh://nas/share/repos/gitlab.com:albertdelafuentecom:albertdelafuente.com-hugo-refined.git


groups:
  default:
    repos: []
  org:
    repos:
      - org
      - org-media

As you can see I have an "org" group which works when I sync with tsrc --verbose sync --group org -r org. Now I just added the last repo and I want to sync everything in the file. I thought of adding as default all the repos, which works, but... as I am adding more and more repos to the manifest I tend to forget to add them to the default group, so they are not part of the sync process.

I tried to use a general regex match like tsrc --verbose sync --group default -r .* but that didn't work. The behavior is "Workspace is empty", which kind of makes sense and kind of doesn't also depending on the point of view.

Possible solutions:

  • tsrc --verbose sync --group default -r .*. Allowing the regular expression . or .*
  • tsrc --verbose sync --group all (being the all name group a reserved name)
  • tsrc --verbose sync --all (a new flag for such purposes)

I hope it makes sense.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions