Skip to content

Commit 1df5ccf

Browse files
daehyeokbbatsov
authored andcommitted
vcs: add Jujutsu support
1 parent eb6b681 commit 1df5ccf

File tree

5 files changed

+16
-3
lines changed

5 files changed

+16
-3
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
* [#1870](https://github.com/bbatsov/projectile/pull/1870): Add package command for CMake projects.
88
* [#1875](https://github.com/bbatsov/projectile/pull/1875): Add support for Sapling VCS.
9+
* [#1876](https://github.com/bbatsov/projectile/pull/1876): Add support for Jujutsu VCS.
910

1011
## 2.8.0 (2023-10-13)
1112

doc/modules/ROOT/pages/faq.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ automatically used when appropriate to improve performance.
5959

6060
Inside version control repositories, VC tools are used when installed
6161
to list files more efficiently. The supported tools include git, hg,
62-
fossil, bzr, darcs, pijul, svn, and sapling.
62+
fossil, bzr, darcs, pijul, svn, sapling and jujutsu.
6363

6464
Outside version control repositories, file search tools are used when
6565
installed for a faster search than pure Elisp. The supported tools

doc/modules/ROOT/pages/projects.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ a project. Out of the box Projectile supports:
3232
* Fossil
3333
* Darcs
3434
* Sapling
35+
* Jujutsu
3536

3637
=== File markers
3738

doc/modules/ROOT/pages/usage.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ automatically used when appropriate to improve performance.
5252

5353
Inside version control repositories, VC tools are used when installed
5454
to list files more efficiently. The supported tools include git, hg,
55-
fossil, bzr, darcs, pijul, svn, and sapling.
55+
fossil, bzr, darcs, pijul, svn, sapling and jujutsu.
5656

5757
Outside version control repositories, file search tools are used when
5858
installed for a faster search than pure Elisp. The supported tools

projectile.el

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -332,6 +332,7 @@ See `projectile-register-project-type'."
332332
"_darcs" ; Darcs VCS root dir
333333
".pijul" ; Pijul VCS root dir
334334
".sl" ; Sapling VCS root dir
335+
".jj" ; Jujutsu VCS root dir
335336
)
336337
"A list of files considered to mark the root of a project.
337338
The bottommost (parentmost) match has precedence."
@@ -426,7 +427,8 @@ is set to `alien'."
426427
"^\\.ccls-cache$"
427428
"^\\.cache$"
428429
"^\\.clangd$"
429-
"^\\.sl$")
430+
"^\\.sl$"
431+
"^\\.jj$")
430432
"A list of directories globally ignored by projectile.
431433
Regular expressions can be used.
432434
@@ -725,6 +727,12 @@ Set to nil to disable listing submodules contents."
725727
:group 'projectile
726728
:type 'string)
727729

730+
(defcustom projectile-jj-command "jj files --no-pager ."
731+
"Command used by projectile to get the files in a Jujutsu project."
732+
:group 'projectile
733+
:type 'string
734+
:package-version '(projectile . "2.9.0"))
735+
728736
(defcustom projectile-sapling-command "sl locate -0 -I ."
729737
"Command used by projectile to get the files in a Sapling project."
730738
:group 'projectile
@@ -1469,6 +1477,7 @@ Fallback to a generic command when not in a VCS-controlled project."
14691477
('pijul projectile-pijul-command)
14701478
('svn projectile-svn-command)
14711479
('sapling projectile-sapling-command)
1480+
('jj projectile-jj-command)
14721481
(_ projectile-generic-command)))
14731482

14741483
(defun projectile-get-sub-projects-command (vcs)
@@ -3659,6 +3668,7 @@ the variable `projectile-project-root'."
36593668
((projectile-file-exists-p (expand-file-name ".pijul" project-root)) 'pijul)
36603669
((projectile-file-exists-p (expand-file-name ".svn" project-root)) 'svn)
36613670
((projectile-file-exists-p (expand-file-name ".sl" project-root)) 'sapling)
3671+
((projectile-file-exists-p (expand-file-name ".jj" project-root)) 'jj)
36623672
;; then we check if there's a VCS marker up the directory tree
36633673
;; that covers the case when a project is part of a multi-project repository
36643674
;; in those cases you can still the VCS to get a list of files for
@@ -3672,6 +3682,7 @@ the variable `projectile-project-root'."
36723682
((projectile-locate-dominating-file project-root ".pijul") 'pijul)
36733683
((projectile-locate-dominating-file project-root ".svn") 'svn)
36743684
((projectile-locate-dominating-file project-root ".sl") 'sapling)
3685+
((projectile-locate-dominating-file project-root ".jj") 'jj)
36753686
(t 'none)))
36763687

36773688
(defun projectile--test-name-for-impl-name (impl-file-path)

0 commit comments

Comments
 (0)