annotate 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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
27988
61f4d59e9a0b rebase: update working directory when aborting (issue5084)
timeless <timeless@mozdev.org>
parents:
diff changeset
1 # extension to emulate interupting filemerge._filemerge
61f4d59e9a0b rebase: update working directory when aborting (issue5084)
timeless <timeless@mozdev.org>
parents:
diff changeset
2
61f4d59e9a0b rebase: update working directory when aborting (issue5084)
timeless <timeless@mozdev.org>
parents:
diff changeset
3 from __future__ import absolute_import
61f4d59e9a0b rebase: update working directory when aborting (issue5084)
timeless <timeless@mozdev.org>
parents:
diff changeset
4
61f4d59e9a0b rebase: update working directory when aborting (issue5084)
timeless <timeless@mozdev.org>
parents:
diff changeset
5 from mercurial import (
61f4d59e9a0b rebase: update working directory when aborting (issue5084)
timeless <timeless@mozdev.org>
parents:
diff changeset
6 filemerge,
61f4d59e9a0b rebase: update working directory when aborting (issue5084)
timeless <timeless@mozdev.org>
parents:
diff changeset
7 extensions,
61f4d59e9a0b rebase: update working directory when aborting (issue5084)
timeless <timeless@mozdev.org>
parents:
diff changeset
8 error,
61f4d59e9a0b rebase: update working directory when aborting (issue5084)
timeless <timeless@mozdev.org>
parents:
diff changeset
9 )
61f4d59e9a0b rebase: update working directory when aborting (issue5084)
timeless <timeless@mozdev.org>
parents:
diff changeset
10
61f4d59e9a0b rebase: update working directory when aborting (issue5084)
timeless <timeless@mozdev.org>
parents:
diff changeset
11 def failfilemerge(filemergefn,
61f4d59e9a0b rebase: update working directory when aborting (issue5084)
timeless <timeless@mozdev.org>
parents:
diff changeset
12 premerge, repo, mynode, orig, fcd, fco, fca, labels=None):
61f4d59e9a0b rebase: update working directory when aborting (issue5084)
timeless <timeless@mozdev.org>
parents:
diff changeset
13 raise error.Abort("^C")
61f4d59e9a0b rebase: update working directory when aborting (issue5084)
timeless <timeless@mozdev.org>
parents:
diff changeset
14 return filemergefn(premerge, repo, mynode, orig, fcd, fco, fca, labels)
61f4d59e9a0b rebase: update working directory when aborting (issue5084)
timeless <timeless@mozdev.org>
parents:
diff changeset
15
61f4d59e9a0b rebase: update working directory when aborting (issue5084)
timeless <timeless@mozdev.org>
parents:
diff changeset
16 def extsetup(ui):
61f4d59e9a0b rebase: update working directory when aborting (issue5084)
timeless <timeless@mozdev.org>
parents:
diff changeset
17 extensions.wrapfunction(filemerge, '_filemerge',
61f4d59e9a0b rebase: update working directory when aborting (issue5084)
timeless <timeless@mozdev.org>
parents:
diff changeset
18 failfilemerge)