transpant and keywords together

Berkes Adam adam.berkes at intland.com
Wed Dec 23 04:57:33 CST 2009


Ok, I had to play a bit with the patch (at least I had cleaned up 
different old mercurial installations) but after I successfully applied 
it seems to solve the problem. I will make another test with a clean 
case but I assume it will be ok.

Will it be part of any mercurial core repository soon?

Adam
> Adam,
>
> * Berkes Adam on Tuesday, December 22, 2009 at 19:03:27 +0100
>   
>> It is 100% reproducable, I've tried a small scenario:
>>     
>
> The following patch fixes it for me. Would you mind trying it?
>
> thx
>
> c
>
>
>
> # HG changeset patch
> # User Christian Ebert <blacktrash at gmx.net>
> # Date 1261514387 0
> # Node ID eb7b5d262866780cf0b958ec3b3e6f11f802b94d
> # Parent  f76984a27b3dfdfda17ef93683a3cb9a04e2dc43
> keyword: always enforce diff in restricted mode during transplant
>
> Expanded keyword was read into diff whith transplant -b otherwise.
>
> Thanks to Adam Berkes for providing an example case.
>
> diff --git a/hgext/keyword.py b/hgext/keyword.py
> --- a/hgext/keyword.py
> +++ b/hgext/keyword.py
> @@ -523,9 +523,11 @@
>                  opts=None):
>          '''Monkeypatch patch.diff to avoid expansion except when
>          comparing against working dir.'''
> -        if node2 is not None:
> +        # force restricted mode when transplanting
> +        transplant = kwtools['hgcmd'] == 'transplant'
> +        if node2 is not None and not transplant:
>              kwt.match = util.never
> -        elif node1 is not None and node1 != repo['.'].node():
> +        elif node1 is not None and node1 != repo['.'].node() or transplant:
>              kwt.restrict = True
>          return orig(repo, node1, node2, match, changes, opts)
>  
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at selenic.com
> http://selenic.com/mailman/listinfo/mercurial-devel
>   

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://selenic.com/pipermail/mercurial-devel/attachments/20091223/ba9f0855/attachment.htm>


More information about the Mercurial-devel mailing list