You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 24, 2020. It is now read-only.
We have requirement where we need to pull changes to branch rather than "default branch".
If I do hg pull , the commit gets pulled to the default branch even though my checkout branch is branch other than "default".
I changed "git2hg.py" -
def extract_hg_metadata(message, git_extra,repo):
split = message.split("\n--HG--\n", 1)
# Renames are explicitly stored in Mercurial but inferred in Git. For
# commits that originated in Git we'd like to optionally infer rename
# information to store in Mercurial, but for commits that originated in
# Mercurial we'd like to disable this. How do we tell whether the commit
# originated in Mercurial or in Git? We rely on the presence of extra hg-git
# fields in the Git commit.
# - Commits exported by hg-git versions past 0.7.0 always store at least one
# hg-git field.
# - For commits exported by hg-git versions before 0.7.0, this becomes a
# heuristic: if the commit has any extra hg fields, it definitely originated
# in Mercurial. If the commit doesn't, we aren't really sure.
# If we think the commit originated in Mercurial, we set renames to a
# dict. If we don't, we set renames to None. Callers can then determine
# whether to infer rename information.
renames = None
extra = {}
file = repo.opener('branch')
**branch = None.**
to
branch = test
The commit seems to go the branch named "test", but it is creating multiple heads,
Any feedback on avoiding multiple heads will be appreciated..
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
We have requirement where we need to pull changes to branch rather than "default branch".
If I do hg pull , the commit gets pulled to the default branch even though my checkout branch is branch other than "default".
I changed "git2hg.py" -
def extract_hg_metadata(message, git_extra,repo):
split = message.split("\n--HG--\n", 1)
# Renames are explicitly stored in Mercurial but inferred in Git. For
# commits that originated in Git we'd like to optionally infer rename
# information to store in Mercurial, but for commits that originated in
# Mercurial we'd like to disable this. How do we tell whether the commit
# originated in Mercurial or in Git? We rely on the presence of extra hg-git
# fields in the Git commit.
# - Commits exported by hg-git versions past 0.7.0 always store at least one
# hg-git field.
# - For commits exported by hg-git versions before 0.7.0, this becomes a
# heuristic: if the commit has any extra hg fields, it definitely originated
# in Mercurial. If the commit doesn't, we aren't really sure.
# If we think the commit originated in Mercurial, we set renames to a
# dict. If we don't, we set renames to None. Callers can then determine
# whether to infer rename information.
renames = None
extra = {}
file = repo.opener('branch')
to
branch = test
The commit seems to go the branch named "test", but it is creating multiple heads,
Any feedback on avoiding multiple heads will be appreciated..
The text was updated successfully, but these errors were encountered: