Skip to content
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

Projectile not recognizing hg projects #1802

Open
M-Taan opened this issue Oct 9, 2022 · 12 comments
Open

Projectile not recognizing hg projects #1802

M-Taan opened this issue Oct 9, 2022 · 12 comments

Comments

@M-Taan
Copy link
Contributor

M-Taan commented Oct 9, 2022

Expected behavior

Going into a mercurial project and calling projectile-add-to-known-project
Then when trying to switch to the newly added project using projectile-switch-project
It should show the files inside that project.

Actual behavior

It's showing me files inside my home directory instead

1665309705

Steps to reproduce the problem

projectile-add-to-known-project to a mercurial project
Then trying to go into that project using projectile-switch-project

Mercurial Version

version 6.2.3

Projectile version information

Projectile: 20221004.1327

Emacs version

Emacs 28.2

Operating system

Running Arch Linux: 5.19.13-arch1-1

@M-Taan
Copy link
Contributor Author

M-Taan commented Oct 9, 2022

It works correctly just for .emacs.d
1665310127

@M-Taan
Copy link
Contributor Author

M-Taan commented Oct 9, 2022

After some tinkering, it seems that it doesn't work on projects that use mercurial, but works just fine for git projects. I'll update the issue accordingly.

@M-Taan M-Taan changed the title Issue when using projectile-switch-project Projectile not recognizing hg projects Oct 9, 2022
@bbatsov
Copy link
Owner

bbatsov commented Oct 25, 2022

I haven't used Mercurial in ages - it's possible that our project detection there is broken. Should be an easy thing to fix.

@zilti
Copy link
Contributor

zilti commented Oct 31, 2022

In fact, not just Mercurial projects aren't being detected, but neither are Fossil. And using an empty .projectile file also does not work.

@bbatsov
Copy link
Owner

bbatsov commented Nov 1, 2022

@zilti I'll try to find some time to reproduce this, but the logic for project detection hasn't been change in a while. This definitely makes me wonder what has happened. You can try setting a breakpoint in projectile-project-root (or rather one of the root detection functions it calls) and see what happens there.

@bbatsov
Copy link
Owner

bbatsov commented Nov 1, 2022

I've tested this with .projectile project just now and it works fine for me.

@bbatsov
Copy link
Owner

bbatsov commented Nov 1, 2022

I also cloned a Mercurial project now and it works fine:

image

So, I can't reproduce any of the problems outline here.

@bbatsov
Copy link
Owner

bbatsov commented Nov 1, 2022

Are you using the latest version of Projectile? Perhaps you can post your config here?

At any rate - it'd be good to do the debugging exercise I suggested earlier.

@M-Taan
Copy link
Contributor Author

M-Taan commented Nov 1, 2022

Hey @bbatsov, I'll give it a try in my free time and try what you suggested earlier.

@zilti
Copy link
Contributor

zilti commented Nov 1, 2022

My Projectile version is 2.6.0-snapshot, the one that comes with Doom Emacs. It seems Doom manipulates the variables for project detection. Weirdly though .projectile does not work there even though they left it in... Anyway I will open an issue over @doomemacs.

@bbatsov
Copy link
Owner

bbatsov commented Nov 1, 2022

I forgot to mention that the debugging instructions are here https://docs.projectile.mx/projectile/troubleshooting.html#debugging-projectile-commands

@M-Taan
Copy link
Contributor Author

M-Taan commented Nov 17, 2022

Hey, adding .projectile did indeed work with Mercurial projects

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants