reuse-tool icon indicating copy to clipboard operation
reuse-tool copied to clipboard

Support Jujutsu VCS

Open omasanori opened this issue 2 years ago • 5 comments

Jujutsu (jj) is a distributed VCS compatible with Git repository.

  • jj recognizes .gitignore.
  • jj tracks every file unless ignored. jj files can find all tracked files, which can be usable for checking if a file is ignored.
  • jj workspace root works like hg root.

omasanori avatar Mar 22 '23 03:03 omasanori

Thanks for the suggestion. As far as I understand jj VCS, all git commands continue to work. So in order to make the REUSE helper tool work in a jj repo, the user just has to have git installed, right?

If this is the case, I am not sure why the tool needs to support another VCS. This can be a very complicated process at the very heart of the tool.

mxmehl avatar Mar 22 '23 09:03 mxmehl

Thank you for your response, @mxmehl!

As far as I understand jj VCS, all git commands continue to work. So in order to make the REUSE helper tool work in a jj repo, the user just has to have git installed, right?

In co-located setups, you can use Git commands (there are .git and .jj directories). Otherwise, you can not (there is .jj directory only, underlying Git repository metadata is in .jj/repo/store/git), which is the default.

omasanori avatar Mar 22 '23 09:03 omasanori

This can be a very complicated process at the very heart of the tool.

This is technically not true. The VCS behaviour should be compartmentalised in separate classes in vcs.py. And if it isn't, that's a bug.

carmenbianca avatar Mar 22 '23 10:03 carmenbianca

Thanks for both clarifications. Well, then, technically, it should be possible to include support for this VCS, even if it's usage still is quite limited as it seems.

As I understand, a user does not have to have JJ installed to be able to run the script, only if they intent to scan such a repo. However, it should be installed in the Docker images which may become a bit trickier as it isn't in many official repos yet, and only available via binary packages. That may increase maintenance effort.

In any case, I'd welcome a PR as I am not a JJ user and do not have the time to dig into it to test and debug things properly.

mxmehl avatar Mar 22 '23 11:03 mxmehl

As I understand, a user does not have to have JJ installed to be able to run the script, only if they intent to scan such a repo.

Yes, I think so, just like Mercurial is not necessary for Git projects and vice versa.

However, it should be installed in the Docker images which may become a bit trickier as it isn't in many official repos yet, and only available via binary packages. That may increase maintenance effort.

JJ communicates with Git remote repositories, not JJ ones. Thus, JJ installation should be unnecessary for CI. It matters if they use REUSE tools locally, and in this case, JJ must be installed. (Otherwise, why do they work on JJ workspaces without installing it?)

I will try to implement the support. Thank you for your suggestion!

omasanori avatar Mar 22 '23 12:03 omasanori