Mercurial > hg
changeset 21706:5c64c338fa9f stable
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'.
author | FUJIWARA Katsunori <foozy@lares.dti.ne.jp> |
---|---|
date | Thu, 05 Jun 2014 16:47:14 +0900 |
parents | dd5ca1a32109 |
children | e22cfd1ae97c |
files | hgext/keyword.py tests/test-keyword.t |
diffstat | 2 files changed, 14 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/keyword.py Thu Jun 05 16:47:14 2014 +0900 +++ b/hgext/keyword.py Thu Jun 05 16:47:14 2014 +0900 @@ -103,7 +103,7 @@ # hg commands that trigger expansion only when writing to working dir, # not when reading filelog, and unexpand when reading from working dir restricted = ('merge kwexpand kwshrink record qrecord resolve transplant' - ' unshelve rebase graft') + ' unshelve rebase graft backout') # names of extensions using dorecord recordextensions = 'record'
--- a/tests/test-keyword.t Thu Jun 05 16:47:14 2014 +0900 +++ b/tests/test-keyword.t Thu Jun 05 16:47:14 2014 +0900 @@ -1258,4 +1258,17 @@ $Xinfo$ +xxxx +Test restricted mode with backout + + $ hg backout -q 11 + $ hg diff a + diff -r 01a68de1003a a + --- a/a Thu Jan 01 00:00:00 1970 +0000 + +++ b/a * (glob) + @@ -3,4 +3,3 @@ + do not process $Id: + xxx $ + $Xinfo$ + -xxxx + $ cd ..