-
Notifications
You must be signed in to change notification settings - Fork 5
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
Ignoring directories #33
Comments
Mercurial should be responsible for that. But you're right. There seems to be no support for an I also thought about parsing the |
Just a quick update. I'm still hacking away at this on my fork (at about half an hour a week, so it's going to take a while...). It currently works (as a nice side-effect of using the status-bitmasks at the directory level)... however it's way too slow to be practical. |
I'm kinda drawing a blank on improving performance while shelling out to hg The other alternative, parsing .hgignore ourselves is also looking dicey. I've been looking at the Mercurial sourcecode and there's nearly 800 lines of python code concerned with it. (having zero python experience means this is a rather slow process). So, working on it, no clue yet how to solve it. |
I really love the plugin. Related to this bug it seems for me that atom-hg doesn't pay attention to the atom setting 'Exclude VCS Ignored Paths'. In other words .hgingnore files are hidden for me regardless of whether 'Exclude VCS Ignored Paths' is checked or not. My case is wanting to get all the benefits of the plugin, but I don't want ignored files hidden. I'm on Windows BTW. |
Thanks, @gabefinch! I really appreciate our plugin is being helpful :)
If I’m right, I think we can create another ticket for this. In your case, you want the ignored files to be shown.
Yes. We can create another ticket for that (#44). In the case of this ticket, the problem is that when we are hiding the ignored files, if a directory only contains ignored files (or it is also ignored in .hgignore) Atom still displays it as a regular directory. This is a limitation by the Mercurial executable itself, and @TomKemperNL and I have been thinking about a way to solve this problem on the plugin side, but it seems difficult until now and almost not possible in a regular way. |
Currently directories with only ignored files are showed as empty directories.
I'd prefer to hide them (just like the git-repo does).
Unfortunately, unlike Git, Mercurial doesn't track directory information, so where Git Status --ignored nicely shows 'the best stuff to hide', Hg Status -i will gladly show each and every file of your node_modules folder as ignored.
The simplest option would be to unify our status cache and mark directories:
as ignored directories. We're already fetching all that info, so shouldn't take too long.
The other option dovetails with the problem that hg stat -i is sloooow. We could try to just parse .hgignore and replicate the mercurial ignore-rules. I think 90% of that will be easy, and the remaining 10% will be a hellish collection of edge-cases. Maybe porting the ignore unit-tests from mercurial could work...
Unless people feel deeply about option 2, I'll get started on option 1, since we'll be able to reuse the resulting unit-tests for option 2. I definitely think we'll need to do option 2 someday, but I'd rather add the functionality first and focus on performance later.
The text was updated successfully, but these errors were encountered: