-
Notifications
You must be signed in to change notification settings - Fork 88
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
Mimic wstool info output #246
base: master
Are you sure you want to change the base?
Conversation
…ne of details per repository.
I don't have permissions to approve workflow runs on this repository but I've pushed a copy of this branch to my fork in order to run the action there https://github.com/nuclearsandwich/vcstool/actions/runs/2980535291 |
Thanks @nuclearsandwich! There are some linting issues. I will try to run the workflows on my fork (following your example) and fix those before requesting any more attention. |
Workflow was failing due to an upstream issue. Take care when reading the comments :( |
Yeah, in #247 I've pinned the flake8 version back so that CI is working while we figure out a strategy that will work for most of ROS Infrastructure. I plan to merge that PR into my fork's default branch tomorrow if you would like to use that as a basis for running actions on your fork or even opening a PR targeting mine you'd be welcome to do so. With that in mind I think that it is still worth:
|
In the first comment I showed the workspace I am using for testing. It contains only git repositories. Does anyone have good examples of other types of ROS(2) repositories I could use as part of a testing workspace? I am looking for the following repository types:
|
Nevermind about the list of repositories of different types. There is a |
… Placeholder values used outside of bzr trunk.
All 4 VCS types now have support. I have attached an example repos file (example.txt) that you can use to create a worksapce and see the results. Note that there might be a better way to get the bzr repo into the workspace but I am not familiar enough to know how to do that. mkdir -p /tmp/example_ws/src
cd /tmp/example_ws
vcs import src < example.txt
mkdir src/bzr
cd src/bzr
bzr branch lp:gwibber
cd /tmp/example_ws
vcs repos The output should look like the following. .............
Localname S SCM Version UID URI
--------- - --- ------- --- ---
src/ament/ament_cmake - git master 799183ab9bcf https://github.com/ament/ament_cmake.git
src/ament/ament_index - git master 23da167ecf38 https://github.com/ament/ament_index.git
src/ament/ament_lint - git master bbdaa17224f3 https://github.com/ament/ament_lint.git
src/ament/ament_package - git master 122af3e498dc https://github.com/ament/ament_package.git
src/bzr/gwibber - bzr 1449 k6jr58pbmqk27mda http://bazaar.launchpad.net/~gwibber-committers/gwibber/trunk/
src/hg/branch - hg stable 805419729e11 https://www.mercurial-scm.org/repo/hg-stable
src/hg/hash - hg stable 6d79894d3460 https://www.mercurial-scm.org/repo/hg-stable
src/hg/tag - hg stable 067f2c53fb24 https://www.mercurial-scm.org/repo/hg-stable
src/immutable/hash - git <detached> 377d5b3d03c2 https://github.com/dirk-thomas/vcstool.git
src/immutable/tag - git 0.1.27 bf9ca56de693 https://github.com/dirk-thomas/vcstool.git
src/svn/rev - svn 635 ec8ed9e5-419c-173f-15d3-ce57b7db7bff https://github.com/dirk-thomas/vcstool
src/vcstool - git master daf389377310 https://github.com/dirk-thomas/vcstool.git
src/without_version - git master daf389377310 https://github.com/dirk-thomas/vcstool.git |
Using the tabulate package the output should look like this. $ vcs repos
.............
+-------------------------+--------+-----+------------+--------------------------------------+----------------------------------------------------------------+
| localname | status | scm | version | uid | uri |
+-------------------------+--------+-----+------------+--------------------------------------+----------------------------------------------------------------+
| src/ament/ament_cmake | - | git | master | 799183ab9bcf | https://github.com/ament/ament_cmake.git |
| src/ament/ament_index | - | git | master | 23da167ecf38 | https://github.com/ament/ament_index.git |
| src/ament/ament_lint | - | git | master | bbdaa17224f3 | https://github.com/ament/ament_lint.git |
| src/ament/ament_package | - | git | master | 122af3e498dc | https://github.com/ament/ament_package.git |
| src/bzr/gwibber | - | bzr | 1449 | k6jr58pbmqk27mda | http://bazaar.launchpad.net/~gwibber-committers/gwibber/trunk/ |
| src/hg/branch | - | hg | stable | f0a3aaa07d6a | https://www.mercurial-scm.org/repo/hg-stable |
| src/hg/hash | - | hg | stable | 6d79894d3460 | https://www.mercurial-scm.org/repo/hg-stable |
| src/hg/tag | - | hg | stable | 067f2c53fb24 | https://www.mercurial-scm.org/repo/hg-stable |
| src/immutable/hash | - | git | <detached> | 377d5b3d03c2 | https://github.com/dirk-thomas/vcstool.git |
| src/immutable/tag | - | git | 0.1.27 | bf9ca56de693 | https://github.com/dirk-thomas/vcstool.git |
| src/svn/rev | - | svn | 3 | ec8ed9e5-419c-173f-15d3-ce57b7db7bff | https://github.com/dirk-thomas/vcstool |
| src/vcstool | - | git | master | daf389377310 | https://github.com/dirk-thomas/vcstool.git |
| src/without_version | - | git | master | daf389377310 | https://github.com/dirk-thomas/vcstool.git |
+-------------------------+--------+-----+------------+--------------------------------------+----------------------------------------------------------------+ |
I haven't done a full review since the last time I looked but I would strongly prefer not introducing an additional dependency. I think the previous output demo was good enough and the additional package isn't required. |
I reverted the use of a new dependency for printing out the results. This branch is working for me when I run it locally. That said, my workspaces are almost entirely made of git repositories so I have not done extensive testing of most of the interfaces. I did update the tests for the other VCS interfaces and those are passing, and I have an example workspace with one of each VCS type that this is working for. If anyone has time it would be nice to get this reviewed. I think it would be a nice addition to the existing tool if we could get it published. |
Just checking in to see if this can get merged? Our team internally is using this branch in a custom virtual environment more often and it would be nice if the |
Note that teams I work on are using the following command to get access to the pip install git+https://github.com/tdenewiler/vcstool@wstool-info-output |
This adds support for
vcs repos
that gives output similar to that fromwstool info
output. Related to #196 and #209.So far, only the git client supports this type of output. If there is interest I would appreciate help with the other clients, and would be willing to devote some time to it over the next couple months to get it over the finish line.
Testing
From a workspace, run
vcs repos
. I created a workspace using a subset of the repositories listed in the Gist at https://gist.github.com/nuclearsandwich/71c12be27e526ef8de4e997975bdb787. Without making changes the current output isIf one of the files is modified in
ament_package
this is the output.If an untracked file is added (I did
touch x
inament_packages
) this is the output.$ vcs repos .... Localname S SCM Version UID URI --------- - --- ------- --- --- src/ament/ament_cmake - git master 65a3ad5f128e https://github.com/ament/ament_cmake.git src/ament/ament_index - git master 496403d08658 https://github.com/ament/ament_index.git src/ament/ament_lint - git master 96d9ca4fd32b https://github.com/ament/ament_lint.git src/ament/ament_package ?? git master 6098894352c4 https://github.com/ament/ament_package.git