test-export: stablize the test

Summary:
Depending on Python random seed, this test might fail with:

  --- test-export-t.py:251 (expected)
  +++ test-export-t.py:251 (actual)
  @@ -1 +1,2 @@
  -
  +abort: foo/1: both added and removed
  +[255]

Fix it by avoiding "rename".

Reviewed By: xavierd

Differential Revision: D18001839

fbshipit-source-id: efde3d9b6734a84a00a46cb00bbf493d64a460b2
This commit is contained in:
Jun Wu 2019-10-18 13:28:02 -07:00 committed by Facebook Github Bot
parent a5e17d48b7
commit 12e114359b

View File

@ -245,7 +245,7 @@ sh % "drawdag" << r"""
# B/foo/3=3\n (copied from bar/1)
# B/foo/1=1\n (copied from bar/1)
# B/bar/2=2\n
B # B/foo/2=2\n (renamed from foo/1)
B # B/foo/2=2\n (copied from foo/1)
| # A/bar/1=0\n
A # A/foo/1=0\n
"""
@ -269,7 +269,7 @@ sh % "hg export -r 'all()' --pattern 'path:foo'" == r"""
# User test
# Date 0 0
# Thu Jan 01 00:00:00 1970 +0000
# Node ID c5a079dfa7dc8d389147a9ae832c47d8ee4675be
# Node ID cb7f9f1d5ead31d80e237c8dbfc093f43aaaac9b
# Parent fb76e11a34f68e6d45150c9bb1f54f85326f08ec
B
@ -311,7 +311,7 @@ sh % "hg export -r 'all()' --pattern 'path:foo/3' --config diff.filtercopysource
# User test
# Date 0 0
# Thu Jan 01 00:00:00 1970 +0000
# Node ID c5a079dfa7dc8d389147a9ae832c47d8ee4675be
# Node ID cb7f9f1d5ead31d80e237c8dbfc093f43aaaac9b
# Parent fb76e11a34f68e6d45150c9bb1f54f85326f08ec
B
@ -337,7 +337,7 @@ sh % "hg export -r 'all()' --pattern 'path:foo/3' --config diff.filtercopysource
# User test
# Date 0 0
# Thu Jan 01 00:00:00 1970 +0000
# Node ID c5a079dfa7dc8d389147a9ae832c47d8ee4675be
# Node ID cb7f9f1d5ead31d80e237c8dbfc093f43aaaac9b
# Parent fb76e11a34f68e6d45150c9bb1f54f85326f08ec
B