Patchwork D11725: windows: use raw string in test log paths

login
register
mail settings
Submitter phabricator
Date Oct. 28, 2021, 9:19 a.m.
Message ID <differential-rev-PHID-DREV-mbqpxcululunlfw3oftv-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/50050/
State Superseded
Headers show

Comments

phabricator - Oct. 28, 2021, 9:19 a.m.
Alphare created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  Otherwise the backslashes will work as escapes on Windows and break everything.

REPOSITORY
  rHG Mercurial

BRANCH
  default

REVISION DETAIL
  https://phab.mercurial-scm.org/D11725

AFFECTED FILES
  tests/test-fix.t

CHANGE DETAILS




To: Alphare, #hg-reviewers
Cc: mercurial-patches, mercurial-devel

Patch

diff --git a/tests/test-fix.t b/tests/test-fix.t
--- a/tests/test-fix.t
+++ b/tests/test-fix.t
@@ -1785,7 +1785,7 @@ 
   $ cat >> $LOGGER <<EOF
   > # Appends the input file's name to the log file.
   > import sys
-  > with open('$LOGFILE', 'a') as f:
+  > with open(r'$LOGFILE', 'a') as f:
   >     f.write(sys.argv[1] + '\n')
   > sys.stdout.write(sys.stdin.read())
   > EOF