svnmerge helps to block some changesets from a specific branch. How can this be achieved with Mercurial?
How should one use the svnmerge workflow with Mercurial?
453 Views Asked by user134843 At
1
There are 1 best solutions below
Related Questions in MERCURIAL
- "Mercurial only supports encoded strings" error?
- Mercurial: Uncommitted local changes are detected while there are none
- How to prevent CMake rerun after CMakeLists.txt changed?
- Using Beyond Compare with Mercurial as the external diff tool to perform in-place directory comparison
- Mercurial/TortoiseHg: Can multiple repositories share the exact same file(s)?
- Is there any way to use hg copy from a specific revision?
- Mercurial in WSL: HGEDITOR $PATH is different from my $PATH
- PYTHONHOME environment variable is unset and empty, I don't know what put to have my python related command working again on linux
- Pushing to local phabricator with TortoiseHG produces Error
- How to prevent a mercurial commit with no files specified (prevent commiting all modified files) using a hook
- What does `hg cp` do and how to "undo" it?
- Reliably run Mercurial's "hg status" from a C# program
- How to uncommit one file in a series of commits in TortoiseHG (Mercurial)?
- Finding changes to a block of text with mercurial
- UnicodeDecodeError while pulling in mercurial (hg) UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 4: ordinal not in range(128)
Related Questions in SVN-MERGE
- svn:mergeinfo is not being cherry-picked properly between branches
- How are the sub folder's mergeinfo used when merging at top folder level?
- Detecting branch reintegration or merge in pre-commit script
- How to import and merge 2 directories with SmartSVN?
- Why SVN does not merge trunk when trunk subdirs have been merged?
- Best practice to merge / not merge svn tags
- SVN merging issue
- SVN merge with multiple revisions [Not Range]
- svnmerge workflow
- Does SVN Merge Save Disk Space?
- svnmerge vs svn merge
- How can I merge my files when the folder structure has changed
- svnmerge croaks on mysterious conflict
- Subversion merge local changes trunk to branch
- SVN - Add code from TRUNK to old branch
Related Questions in MERGE-TRACKING
- Can Subversion properly handle merges in both directions (trunk <-> branch)?
- Looking for a Document Comparer that can generate difference reports
- How to enable subversion merge tracking
- What am I doing wrong with SVN merging?
- How to reintegrate with automatic merge (merge-tracking) in TortoiseSVN 1.8
- Preventing working copy out of date when using SVN merge tracking
- SVN: Track merges
- How should one use the svnmerge workflow with Mercurial?
- Is SVN 1.5 Merge-tracking ready for prime-time?
- How do I use the new SVN merge-tracking?
- Why does TortoiseSVN (1.5.3) try to merge 1-Head when I pull from trunk?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
What subversion calls a merge is pretty different to what a merge is in Mercurial. The operation that svnmerge or
svn mergedoes is usually referred to as a "cherry pick" in other version control systems. Basically it creates a new commit that is a copy of the original changeset in the target branch. In Mercurial that can be done using the transplant extension.This method is less popular in DVCS compared to regular merging as it creates multiple heads, which are harder to maintain. Here's how you would use it and what the resulting output would look like:
Here you have your commit A that fixes the bug on trunk and you
hg transplantit to release, creating a new commit B that contains the same changes as A, but with different parents.The alternative approach is to not use transplant and check in only fixes to the release branch. You would create a new release branch and make the fix there, then you would merge the release branch into default. That would look like this:
Here B is a merge commit. It has no "extra" changes associated with it (unless there were conflicts that were resolved) and has the special property of marking the release branch as merged into default at that point. There's only one actual changeset that fixes the bug - the one marked "A" - although of course the changes themselves are in the default branch too.
The advantage of this approach are:
Normally you'd tag the release branch "v1.1" or whatever at the appropriate point so you know where that release came from.
The disadvantages with this approach are when:
There is not much you can do with the first issue - if you have to maintain a branch that is very old, then you will end up with diverging branches anyway. The patches are probably very different anyway.
The second problem occurs if for example you have an "emergency" patch to the release version that papers over or works around a bug, but requires a larger fix on default to address the underlying problem. In that case, you would have to merge release and then create a new explicit commit to "undo" the commit you didn't want.
This practice actually has similar advantages with
svn mergein a way. If you merge changes selectively from trunk to release, you have to remember the revisions that you merged (assuming you aren't merging all of trunk).svn mergesets the svn:mergeinfo properties, but tracking these can cause problems, plus you have to check the logs carefully to say "oh, yeah, I did merge that fix into release".If you svn-merge the whole release branch to trunk when you have a fix, there is no need to remember what revisions have been merged.