keyword: suppress keyword expansion while 'hg unshelve' for internal merge

Before this patch, 'hg unshelve' may cause unexpected conflict, if 'hg
unshelve'-ed changes are located near lines in which keywords are
embedded, because keywords are substituted with other strings in the
working directory.

This patch suppresses keyword expansion while 'hg unshelve' for
internal merge by adding 'unshelve' to 'restricted' command list like
'merge'.

--HG--
branch : stable
extra : rebase_source : 6595d2f5a12c949ab16fdcecece391b178911e5d
keyword: suppress keyword expansion while 'hg rebase' for internal merge

Before this patch, 'hg rebase' may cause unexpected conflict, if 'hg
rebase'-ed changes are located near lines in which keywords are
embedded, because keywords are substituted with other strings in the
working directory.

This patch suppresses keyword expansion while 'hg rebase' for internal
merge by adding 'rebase' to 'restricted' command list like 'merge'.

This patch specifies '--keep' to 'hg rebase', because revision #10 is
useful also for tests in succeeding patches.

--HG--
branch : stable
extra : rebase_source : e97c8aac72b6dde9f750c4f542bae6c6b1d43bc0
keyword: suppress keyword expansion while 'hg graft' for internal merge

Before this patch, 'hg graft' may cause unexpected conflict, if 'hg
graft'-ed changes are located near lines in which keywords are
embedded, because keywords are substituted with other strings in the
working directory.

This patch suppresses keyword expansion while 'hg graft' for internal
merge by adding 'graft' to 'restricted' command list like 'merge'.

--HG--
branch : stable
extra : rebase_source : 32330dcea72caac98cced6b8cf94888357b14f30
keyword: suppress keyword expansion while 'hg backout' for internal merge

Before this patch, 'hg backout' may cause unexpected conflict, if 'hg
backout'-ed changes are located near lines in which keywords are
embedded, because keywords are substituted with other strings in the
working directory.

This patch suppresses keyword expansion while 'hg backout' for
internal merge by adding 'backout' to 'restricted' command list like
'merge'.

--HG--
branch : stable
extra : rebase_source : 55e87b8e20d026f551d8af42c855e88752f53a0f
keyword: suppress keyword expansion while 'hg histedit' for internal merge

Before this patch, 'hg histedit' may cause unexpected conflict, if 'hg
histedit'-ed changes are located near lines in which keywords are
embedded, because keywords are substituted with other strings in the
working directory.

This patch suppresses keyword expansion while 'hg histedit' for
internal merge by adding 'histedit' to 'restricted' command list like
'merge'.

Test in this patch just swaps order of revision #13 and #14: this is
enough to cause internal merge.

--HG--
branch : stable
extra : rebase_source : 8f0334760840129676b09cf985594a5f90500edd
keyword: suppress keyword expansion while 'hg fetch' for internal merge

Before this patch, 'hg fetch' may cause unexpected conflict, if 'hg
fetch'-ed changes are located near lines in which keywords are
embedded, because keywords are substituted with other strings in the
working directory.

This patch suppresses keyword expansion while 'hg fetch' for internal
merge by adding 'fetch' to 'restricted' command list like 'merge'.

This patch uses 'hg import' to safely create the new head to be merged
at succeeding 'hg fetch', because:

  - branch of revision #10 is different from one of #11 in 'Test'
    repository, so just 'hg fetch -r 11' doesn't cause merging between
    them

    this means the new head should be created manually.

  - 'hg import' is easier and safer than 'cat <<EOF' and 'hg commit'
    to replay same changes including special characters like '$'

    safeness of 'hg import' with keyword extension is already examined
    in 'test-keyword.t'.

--HG--
branch : stable
extra : rebase_source : e2d60856d15e0865b093241b6943dec81eba8230
resolve: keep wlock while resolving

This will make resolve use correct locking and thus make it more safe.

Resolve is usually a long running command spending a lot of time waiting for
user input on hard problems. It is thus a real world scenario to start multiple
resolves at once or run other commands (such as up -C and merge) while resolve
is running. Proper locking prevents that.

--HG--
branch : stable
extra : rebase_source : 90bc9fcdd734a1094aafd3ceecb5616ce7694990
memfilectx: add a size method

This method is needed to have memfilectx behave like the other file
contexts. We can't just inherit this method because each file context has
different behavior: filectx reads from the filelog, and workingfilectx reads
from the disk. Therefore, we define memfilectx to return the size of the data
in memory.

--HG--
extra : rebase_source : 25732fab4dc35a76cfb8f659fde48c7e0dc42dbf
extra : __touch-noise__ : 4009230938
extra : amend_source : e8c49f2da601fab8ff459cb96e1d80585cd3fbdd
gpg: accept '--edit' like other commands creating new changeset

After this patch, users can invoke editor for the commit message by
'--edit' option regardless of '--message'.

--HG--
extra : rebase_source : 64a03227b65ef8cdba2a0256161ffc13fff2fefe
backout: accept '--edit' like other commands creating new changeset

After this patch, users can invoke editor for the commit message by
'--edit' option regardless of '--message'/'--logfile'.

--HG--
extra : rebase_source : 2f054419c41da36af5151a6fd51961d89e0e5f61
qrefresh: allow to specify '--message/'--logfile' and '--edit' at the same time

Before this patch, 'hg qrefresh' disallows to specify
'--message/'--logfile' and '--edit' at the same time.

'hg qrefresh' has disallowed such combination since Mercurial 0.9.2,
but this restriction seems not to be reasonable for recent Mercurial,
because all other commands creating new changeset allow it.

This patch allows 'hg qrefresh' to specify '--message/'--logfile' and
'--edit' at the same time like other commands creating new changeset.

--HG--
extra : rebase_source : 25a9a3b9ecf1fc8069c5a013038c43613a5b4dc1
qfold: allow to specify '--message/'--logfile' and '--edit' at the same time

Before this patch, 'hg qfold' disallows to specify
'--message/'--logfile' and '--edit' at the same time.

'hg qfold' has disallowed such combination since Mercurial 0.9.2, but
this restriction seems not to be reasonable for recent Mercurial,
because all other commands creating new changeset allow it.

This patch allows 'hg qfold' to specify '--message/'--logfile' and
'--edit' at the same time like other commands creating new changeset.

--HG--
extra : rebase_source : 58fbe1b4dd8e3b78c9456d1e0df813ffdb5a355e
shelve: add option combination tests for refactoring in succeeding patch

--HG--
extra : rebase_source : 3bc53a3d11a2c85b4ccdbb320f4aaeab2a2e57e7
vfs: add unlinkpath to vfs

This patch adds unlinkpath() function in vfs to replace util.unlinkpath().

--HG--
extra : rebase_source : 03488ce46c0d8585b28fb33f8cb28a2e1ecbcb6b
patch: replace functions in fsbackend to use vfs

Several functions in fsbackend are replaced to use vfs functions.
vfs operations are applied on filename and path is joined by _join().

--HG--
extra : rebase_source : d0dadf6812dea393a610665dc0b030ab352bbb6e
workingctx: duplicate status list received at _poststatus hook

basectx.status may reorder the list after workingctx._poststatus is called,
so workingctx must copy it.  Otherwise, wctx.deleted() would return "unknown"
files, for example.

--HG--
extra : rebase_source : 6eb6e96c704a2afa37bdbf357824c0a08215a018
bash_completion: add -l|--list support for shelve

This was overlooked previously and found via 'hg shelve -p -l <tab>' (to show
the diff of the shelved commit).

--HG--
extra : rebase_source : 72a3c4affcd1bf63557d03a1536c725444f56e5c
merge with stable
resolve: fix grammar of no matching files message
status: document the content of the returned tuple in the docstring

The ``status`` function returns a lot of information. We document it.

--HG--
extra : rebase_source : 4d2b19a66fcf55a1634a52c0b4283c7a14bdf4e4