view tests/failfilemerge.py @ 28573:6a42564081cb

shelve: adds restoring newly created branch (issue5048) (BC) Before this patch shelve never preserved branch information, so after applying unshelve branch was the same as it was on working copy no matter in which branch shelve took place. This patch makes bare shelving(with no files specified, without interactive,include and exclude option) remembers information if the working directory was on newly created branch ,in other words working directory was on different branch than its first parent. In this situation unshelving restores branch information to the working directory.
author liscju <piotr.listkiewicz@gmail.com>
date Wed, 10 Feb 2016 02:23:27 +0100
parents 61f4d59e9a0b
children 424c1632fffb
line wrap: on
line source

# extension to emulate interupting filemerge._filemerge

from __future__ import absolute_import

from mercurial import (
    filemerge,
    extensions,
    error,
)

def failfilemerge(filemergefn,
        premerge, repo, mynode, orig, fcd, fco, fca, labels=None):
    raise error.Abort("^C")
    return filemergefn(premerge, repo, mynode, orig, fcd, fco, fca, labels)

def extsetup(ui):
    extensions.wrapfunction(filemerge, '_filemerge',
                            failfilemerge)