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

merge to branch rather than default branch #320

Open
rammuralidhar opened this Issue Dec 12, 2016 · 0 comments

Comments

Projects
None yet
1 participant
@rammuralidhar

rammuralidhar commented Dec 12, 2016

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..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment