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

Correct invocation for jujutsu file listing

Open PigeonF opened this issue 6 months ago • 4 comments

The jj files command was deprecated in jujutsu 0.19.0, and removed in jujutsu 0.26.0 (released in february of 2025). The fix is to use the new jj file list command instead.

Before adding a note to the changelog I wanted to ask about backwards compatibility. This PR fixes use with jujutsu >= 0.26.0, but breaks users with jujutsu < 0.19.0 (which was released in july 2024). In theory the code in vcs.py could check which version of jujutsu is installed and then use the corresponding correct command, but I am not sure what the project policy is with regards to backwards compatibility vs maintainer burden, so the current fix breaks backwards compatibility with older versions in order to keep the code simple.

  • [ ] Added a change log entry in changelog.d/<directory>/.
  • [x] Added self to copyright blurb of touched files.
  • [x] Added self to AUTHORS.rst.
  • [ ] Wrote tests.
  • [ ] Documented my changes in docs/man/ or elsewhere.
  • [x] My changes do not contradict the current specification.
  • [x] I agree to license my contribution under the licenses indicated in the changed files.

Fixes #1166.

PigeonF avatar Jun 09 '25 16:06 PigeonF

I think your changes are good and I agree that we should usually support one version. However, in this case, version 0.19 was released only last July, so if a distro relies on the packed version, the deprecation may be too short notice. Perhaps it would make sense to put the version detection in for now and create an issue to remove it again at some point in the future?

floriansnow avatar Jun 15 '25 09:06 floriansnow

Looking at repology, there are some distros shipping the outdated versions (i.e. jujutsu < 0.19.0) - most notably alpine 3.20. If you agree, I will put in the version detection to deal with both versions, and add a comment about removing the version detection in the future.

PigeonF avatar Jun 15 '25 09:06 PigeonF

I have added the version detection. I did not find existing tests for the VCS file listings, so I have not added any. I have tested the changes locally with jj 0.14.0 (the version which introduced jj root), 0.18.0, 0.19.0 and 0.29.0.

If these changes are in line with your thinking, let me know and I will add an entry to the changelog (presumably under "fixed"?)

PigeonF avatar Jun 17 '25 21:06 PigeonF

CC: @Minion3665

TheCodedProf avatar Jun 19 '25 23:06 TheCodedProf

In light of the recent release I have rebased the changes onto main (and added the missing entry to the changelog.d directory).

PigeonF avatar Sep 05 '25 08:09 PigeonF

This looks good to me, thank you!

carmenbianca avatar Sep 05 '25 13:09 carmenbianca