Skip to content
This repository has been archived by the owner on Jul 24, 2020. It is now read-only.

merge to branch rather than default branch #320

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

merge to branch rather than default branch #320

rammuralidhar opened this issue Dec 12, 2016 · 0 comments

Comments

@rammuralidhar
Copy link

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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant