-
Notifications
You must be signed in to change notification settings - Fork 311
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
Instead of applying patch in git, fetch it from the local Mercurial repository #1506
Comments
Hi @marco-c, I'd like to try and fix this issue! I hope that's okay :) |
Sure, feel free! Any issue is open for contribution by anyone. As a first step, read #1092. |
May I know where the Mercurial repo for bugbug is? |
So I was able to fetch the commit from my terminal like this: $git cinnabar fetch hg::https://hg.mozilla.org/mozilla-central/ 50244579252a229131ae04a1d2c60682611e5702 I replaced lines 358-380 with: But I am not sure how to test this file(bugbug/scripts/commit_classifier.py), without having to run trainer.py as mentioned in the README. |
You will need to fetch the commit that was just applied to the local mercurial repository, not a specific commit which already exists in https://hg.mozilla.org/mozilla-central/. |
I think I've not understood what a "local mercurial repo" means. |
If you look at the code of the commit classifier script mentioned in the first comment, it is cloning a Mercurial repository, then cloning a git repository using git cinnabar. Then it applies a set of patches to the locally cloned Mercurial repository and tries to apply the same set of patches to the locally cloned git repository. |
Hi @marco-c ! I am an Outreachy applicant and I want to work on this issue. Can you confirm if the set of patches are applied to Mercurial from line 352-356? |
@KhadijaKamran the patch is applied to the Mercurial repo at bugbug/scripts/commit_classifier.py Lines 376 to 380 in f990605
bugbug/scripts/commit_classifier.py Lines 383 to 404 in f990605
What we want to change is the way to apply the patch to the git repo (see the previous comments in this issue). |
Hey @marco-c! Would the following command help: |
Using git-cinnabar, we can replace
bugbug/scripts/commit_classifier.py
Lines 358 to 380 in e60a51b
Then, we can stop installing
patch
in our Docker image:bugbug/infra/dockerfile.commit_retrieval
Line 10 in e60a51b
The text was updated successfully, but these errors were encountered: