Questions tagged [hg-merge]

`hg merge` is a Mercurial command used for merging revisions into working directory. Use this tag for all questions related to merging with Mercurial.

merge another revision into working directory:

hg merge [-P] [-f] [[-r] REV]

The current working directory is updated with all changes made in the requested revision since the last common predecessor revision.

Options:

-f, --force         force a merge including outstanding changes (DEPRECATED)
-r, --rev <REV>     revision to merge
-P, --preview       review revisions to merge (no merge is performed)
-t, --tool <VALUE>  specify merge tool

Reference: https://www.selenic.com/mercurial/hg.1.html#merge

2 questions
243
votes
4 answers

How to correctly close a feature branch in Mercurial?

I've finished working on a feature branch feature-x. I want to merge results back to the default branch and close feature-x in order to get rid of it in the output of hg branches. I came up with the following scenario, but it has some issues: $ hg…
Andrey Vlasovskikh
  • 16,489
  • 7
  • 44
  • 62
0
votes
1 answer

How to merge a branch with other branch of the same parent but exclude a changeset alone in mercurial

I have a branch a1 whose parent branch is A. Now I have created another branch a2 from same parent A. I want to merge a1 with a2 excluding a chengeset from a1. Is there a way to partially merge a branch excluding a changeset?
Vishal
  • 25
  • 3