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

Patches fetched from local mercurial #1552

Closed
wants to merge 2 commits into from

Conversation

anubhabsen
Copy link

Issue #1506
I think this applies the patches from the local mercurial repository using a fetch. Please do let me know if there is something I am missing, and how I should go about testing it.

"cinnabar",
"fetch",
f"hg::{self.git_repo_dir}",
f"{revision['id']}",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a Phabricator revision ID, it's not the hash of the commit we just applied to the local mercurial repository.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry about that. If I understand correctly, needed_stack contains the list of patches to be applied. So path.base_revision where patch is an element of needed_stack is the hash of a commit that needs to be applied?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, base_revision is the revision in the Mercurial repository on top of which the patch must be applied (

# Update repo to base revision
hg_base = needed_stack[0].base_revision
if not self.has_revision(hg, hg_base):
logger.warning("Missing base revision {} from Phabricator".format(hg_base))
hg_base = "tip"
).

The process should be:

  1. Get patches from Phabricator;
  2. Apply each patch to the local Mercurial repository at the specified base revision;
  3. Fetch the commits from the local Mercurial repository in the local git repository.

For 3, the commits come from the local Mercurial repository, Phabricator is already out of the picture.

@marco-c
Copy link
Collaborator

marco-c commented May 20, 2020

Closing for lack of updates, feel free to reopen if you still intend to work on this.

@marco-c marco-c closed this May 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants