[PATCH STABLE] byteify-string: resolve symlink because byteifying

Augie Fackler raf at durin42.com
Thu Mar 19 20:36:41 UTC 2020


queued for stable with some log message rewording

> On Mar 19, 2020, at 16:25, Pierre-Yves David <pierre-yves.david at ens-lyon.org> wrote:
> 
> # HG changeset patch
> # User Pierre-Yves David <pierre-yves.david at octobus.net>
> # Date 1584563265 -3600
> #      Wed Mar 18 21:27:45 2020 +0100
> # Branch stable
> # Node ID 6409ccedfa1ae7e0df8cd5a9228ba5fdf0d550c9
> # Parent  864e9534d3d4f984e9c50a40e812e844816847bc
> # EXP-Topic no-bytify-symlink
> # Available At https://dev.heptapod.net/octobus/mercurial-devel/
> #              hg pull https://dev.heptapod.net/octobus/mercurial-devel/ -r 6409ccedfa1a
> byteify-string: resolve symlink because byteifying
> 
> Otherwise the script turn symlink into regular file.
> 
> diff --git a/contrib/byteify-strings.py b/contrib/byteify-strings.py
> --- a/contrib/byteify-strings.py
> +++ b/contrib/byteify-strings.py
> @@ -328,6 +328,7 @@ def main():
>         'allow-attr-methods': args.allow_attr_methods,
>     }
>     for fname in args.files:
> +        fname = os.path.realpath(fname)
>         if args.inplace:
>             with editinplace(fname) as fout:
>                 with open(fname, 'rb') as fin:
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel




More information about the Mercurial-devel mailing list