Mercurial > hg-stable
diff mercurial/archival.py @ 31116:b44ab288358e
subrepo: run the repo decoders when archiving
The decoders were already run by default for the main repo, so this seemed like
an oversight.
The extdiff extension has been using 'archive' since 68822b7cdd01 to support -S,
and a colleague noticed that after diffing, making changes, and closing it, the
line endings were wrong for the diff-tool modified files in the subrepository.
(Files in the parent repo were correct, with the same .hgeol settings.) The
editor (Visual Studio in this case) reloads the file, but doesn't notice the EOL
change. It still adds new lines with the original EOL setting, and the file
ends up inconsistent.
Without this change, the first file `cat`d in the test prints '\r (esc)' EOL,
but the second doesn't on Windows or Linux.
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Sat, 25 Feb 2017 21:13:59 -0500 |
parents | 798bcb1274dd |
children | 21fa3d3688f3 |
line wrap: on
line diff
--- a/mercurial/archival.py Sat Feb 25 21:44:34 2017 -0500 +++ b/mercurial/archival.py Sat Feb 25 21:13:59 2017 -0500 @@ -331,7 +331,7 @@ for subpath in sorted(ctx.substate): sub = ctx.workingsub(subpath) submatch = matchmod.subdirmatcher(subpath, matchfn) - total += sub.archive(archiver, prefix, submatch) + total += sub.archive(archiver, prefix, submatch, decode) if total == 0: raise error.Abort(_('no files match the archive pattern'))