-
Notifications
You must be signed in to change notification settings - Fork 186
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
Hg support #16
Comments
Ive considered hg support but as I don't really use HG I did not pursue it too far. Ill try to investigate the work involved again. It should totally be possible. |
yeah, this would be a decent amount of work but should be possible. I might be able to work on this but I cannot promise anything in the near term. PRs welcome if you or someone else takes this on. |
Well, I havent really delve into code so I'm not sure how to change it right now. I guess I would have to add the hg diff part and maybe perform some little changes in other files. Can you give me more details about how it works and what files should be updated? thanks |
Sure So at a high level this is how diff cover works. Using the subprocess module diff-cover runs git commands to get the diff and find out information the project. By parsing that output and comparing it to the output of a quality command like pep8 or a coverage report it can give the status of the lines that changed by ignoring the lines that have not. It relies on the following commands.
So to create a way to do this with merc you would have to figure out rough equivelents of hese commands and be able to parse the output of those commands ( you might save time with the --git flag when running At a code level you would need hg versions of the Then I think you just need an -hg switch in the commands themselves and read that to decide what instances of these objects to use. If you think you are up for that let me know. Obviously I can support. If you don't think you will be able to thats totally ok :-) At the very least, do you know what the equivalent versions of those git commands would be in hg? Im not even sure hg has the same Here is what I came up with
But I have not used hg very much. |
What does |
I believe it's the same as |
Ah, gotcha. There's no direct equivalent in mercurial: but only in the sense there is no staging area: (I'm interested in doing some of this porting, although I'm not sure that our process will match up totally: hg doesn't yet have native squashing of commits, so it's likely that a diff-cover process will need to work at the PR level, rather than the commit level). |
Makes sense. Go for it! The most common use case I know of is basically diffing PRS anyway |
Because of the lacking mercurial support I created an alternative tool, using Node.js, diff-test-coverage.
Supported source control systems:
|
Hi,
I would like to know if there is any plan of giving support for mercurial (hg). Would it be difficult to implement this upgrade in a fork and then try to submit the code to the original project.
At my organization, we use Bitbucket + hg and we would love to introduce something like a pep8/coverage checked for a diff, and this is the most interesting tool I have seen so far.
Thanks
The text was updated successfully, but these errors were encountered: