diff tests/test-copytrace-heuristics.t @ 35393:4441705b7111

tests: remove (glob) annotations that were only for '\' matches # skip-blame because this was mechanically rewritten the following script. I ran it on both *.t and *.py, but none of the *.py changes were proper. All *.t ones appear to be, and they run without addition failures on both Windows and Linux. import argparse import os import re ap = argparse.ArgumentParser() ap.add_argument('path', nargs='+') opts = ap.parse_args() globre = re.compile(r'^(.*) \(glob\)(.*)$') for p in opts.path: tmp = p + '.tmp' with open(p, 'rb') as src, open(tmp, 'wb') as dst: for line in src: m = globre.match(line) if not m or '$LOCALIP' in line or '*' in line: dst.write(line) continue if '?' in line[:-3] or ('?' in line[:-3] and line[-3:] != '(?)'): dst.write(line) continue dst.write(m.group(1) + m.group(2) + '\n') os.unlink(p) os.rename(tmp, p)
author Matt Harbison <matt_harbison@yahoo.com>
date Sun, 10 Dec 2017 22:50:57 -0500
parents f05a6e015ecc
children c829749e7639
line wrap: on
line diff
--- a/tests/test-copytrace-heuristics.t	Sun Dec 10 22:45:35 2017 -0500
+++ b/tests/test-copytrace-heuristics.t	Sun Dec 10 22:50:57 2017 -0500
@@ -55,7 +55,7 @@
   rebasing 2:557f403c0afd "mod a, mod dir/file.txt" (tip)
   merging b and a to b
   merging dir2/file.txt and dir/file.txt to dir2/file.txt
-  saved backup bundle to $TESTTMP/repo/.hg/strip-backup/557f403c0afd-9926eeff-rebase.hg (glob)
+  saved backup bundle to $TESTTMP/repo/.hg/strip-backup/557f403c0afd-9926eeff-rebase.hg
   $ cd ..
   $ rm -rf repo
 
@@ -125,7 +125,7 @@
   $ hg rebase -s . -d 2
   rebasing 3:9d5cf99c3d9f "mod a" (tip)
   merging b and a to b
-  saved backup bundle to $TESTTMP/repo/.hg/strip-backup/9d5cf99c3d9f-f02358cc-rebase.hg (glob)
+  saved backup bundle to $TESTTMP/repo/.hg/strip-backup/9d5cf99c3d9f-f02358cc-rebase.hg
   $ cd ..
   $ rm -rf repo
 
@@ -160,7 +160,7 @@
   $ hg rebase -s . -d 0
   rebasing 3:fbe97126b396 "mod b" (tip)
   merging a and b to a
-  saved backup bundle to $TESTTMP/repo/.hg/strip-backup/fbe97126b396-cf5452a1-rebase.hg (glob)
+  saved backup bundle to $TESTTMP/repo/.hg/strip-backup/fbe97126b396-cf5452a1-rebase.hg
   $ cd ..
   $ rm -rf repo
 
@@ -197,7 +197,7 @@
   $ hg rebase -s . -d 2
   rebasing 3:6b2f4cece40f "mod dir/a" (tip)
   merging dir/b and dir/a to dir/b
-  saved backup bundle to $TESTTMP/repo/.hg/strip-backup/6b2f4cece40f-503efe60-rebase.hg (glob)
+  saved backup bundle to $TESTTMP/repo/.hg/strip-backup/6b2f4cece40f-503efe60-rebase.hg
   $ cd ..
   $ rm -rf repo
 
@@ -255,7 +255,7 @@
   $ hg rebase -s 2 -d 1
   rebasing 2:ef716627c70b "mod a" (tip)
   merging foo and a to foo
-  saved backup bundle to $TESTTMP/repo/.hg/strip-backup/ef716627c70b-24681561-rebase.hg (glob)
+  saved backup bundle to $TESTTMP/repo/.hg/strip-backup/ef716627c70b-24681561-rebase.hg
 
   $ cd ..
   $ rm -rf repo
@@ -286,7 +286,7 @@
 
   $ hg rebase -s 1 -d 2
   rebasing 1:472e38d57782 "mv a b"
-  saved backup bundle to $TESTTMP/repo/.hg/strip-backup/472e38d57782-17d50e29-rebase.hg (glob)
+  saved backup bundle to $TESTTMP/repo/.hg/strip-backup/472e38d57782-17d50e29-rebase.hg
   $ hg up -q c492ed3c7e35dcd1dc938053b8adf56e2cfbd062
   $ ls
   b
@@ -320,7 +320,7 @@
   $ hg rebase -s . -d 1
   rebasing 2:a33d80b6e352 "mv dir/ dir2/" (tip)
   merging dir/a and dir2/a to dir2/a
-  saved backup bundle to $TESTTMP/repo/.hg/strip-backup/a33d80b6e352-fecb9ada-rebase.hg (glob)
+  saved backup bundle to $TESTTMP/repo/.hg/strip-backup/a33d80b6e352-fecb9ada-rebase.hg
   $ cd ..
   $ rm -rf server
   $ rm -rf repo
@@ -355,7 +355,7 @@
   $ hg rebase -s . -d 2
   rebasing 3:d41316942216 "mod a" (tip)
   merging c and a to c
-  saved backup bundle to $TESTTMP/repo/.hg/strip-backup/d41316942216-2b5949bc-rebase.hg (glob)
+  saved backup bundle to $TESTTMP/repo/.hg/strip-backup/d41316942216-2b5949bc-rebase.hg
 
   $ cd ..
   $ rm -rf repo
@@ -391,7 +391,7 @@
   merging a and b to b
   rebasing 2:d3efd280421d "mv b c"
   merging b and c to c
-  saved backup bundle to $TESTTMP/repo/.hg/strip-backup/472e38d57782-ab8d3c58-rebase.hg (glob)
+  saved backup bundle to $TESTTMP/repo/.hg/strip-backup/472e38d57782-ab8d3c58-rebase.hg
 
   $ cd ..
   $ rm -rf repo
@@ -428,7 +428,7 @@
   $ hg rebase -s . -d 2
   rebasing 3:ef716627c70b "mod a" (tip)
   merging b and a to b
-  saved backup bundle to $TESTTMP/repo/.hg/strip-backup/ef716627c70b-24681561-rebase.hg (glob)
+  saved backup bundle to $TESTTMP/repo/.hg/strip-backup/ef716627c70b-24681561-rebase.hg
   $ ls
   b
   c
@@ -500,7 +500,7 @@
   rebasing 2:ef716627c70b "mod a" (tip)
   merging b and a to b
   merging c and a to c
-  saved backup bundle to $TESTTMP/repo/repo/.hg/strip-backup/ef716627c70b-24681561-rebase.hg (glob)
+  saved backup bundle to $TESTTMP/repo/repo/.hg/strip-backup/ef716627c70b-24681561-rebase.hg
   $ ls
   b
   c
@@ -624,7 +624,7 @@
   $ hg rebase -s . -d 1 --config experimental.copytrace.sourcecommitlimit=100
   rebasing 2:6207d2d318e7 "mod a" (tip)
   merging dir2/b and dir1/a to dir2/b
-  saved backup bundle to $TESTTMP/repo/repo/.hg/strip-backup/6207d2d318e7-1c9779ad-rebase.hg (glob)
+  saved backup bundle to $TESTTMP/repo/repo/.hg/strip-backup/6207d2d318e7-1c9779ad-rebase.hg
   $ cat dir2/b
   a
   b
@@ -661,7 +661,7 @@
 
   $ hg rebase -s . -d 1 --config experimental.copytrace.sourcecommitlimit=100
   rebasing 2:e8919e7df8d0 "mv dir1 dir2" (tip)
-  saved backup bundle to $TESTTMP/repo/repo/.hg/strip-backup/e8919e7df8d0-f62fab62-rebase.hg (glob)
+  saved backup bundle to $TESTTMP/repo/repo/.hg/strip-backup/e8919e7df8d0-f62fab62-rebase.hg
   $ ls dir2
   a
   dummy
@@ -711,6 +711,6 @@
   $ hg rebase -s 8b6e13696 -d . --config experimental.copytrace.sourcecommitlimit=100
   rebasing 1:8b6e13696c38 "added more things to a"
   merging foo/bar and a to foo/bar
-  saved backup bundle to $TESTTMP/repo/repo/repo/.hg/strip-backup/8b6e13696c38-fc14ac83-rebase.hg (glob)
+  saved backup bundle to $TESTTMP/repo/repo/repo/.hg/strip-backup/8b6e13696c38-fc14ac83-rebase.hg
   $ cd ..
   $ rm -rf repo