[PATCH] tests: fix for failure of test-convert-p4-filetypes.t

FUJIWARA Katsunori foozy at lares.dti.ne.jp
Sat Mar 26 00:39:03 EDT 2016


# HG changeset patch
# User FUJIWARA Katsunori <foozy at lares.dti.ne.jp>
# Date 1458964552 -32400
#      Sat Mar 26 12:55:52 2016 +0900
# Node ID 24fdf9128c046e7cc156305d6475520252f7b081
# Parent  345f4fa4cc8912bb722ad3e35d68858487420bc6
tests: fix for failure of test-convert-p4-filetypes.t

Before this patch, test-convert-p4-filetypes.t fails (at least with
2015.2/1366233 version of p4/p4d), because some files below are
omitted in expected output for revision 1.

  - file_tempobj
  - file_xtempobj

These files are:

  - add-ed at revision 0, and
  - edit-ed at revision 1

According to perforce command reference below, file type 'tempobj' and
'xtempobj' imply '+S' modifier, which indicates that "Only the head
revision is stored". This means that these files should appear only in
the most recent revision (= revision 1).

    https://www.perforce.com/perforce/doc.current/manuals/cmdref/file.types.html

BTW, test-convert-p4-filetypes.t with 2015.2/1366233 version of p4/p4d
fails similarly also at recent revisions for hgext/convert/p4.py in
2015. Therefore, this patch should be reviewed by perforce guru, to
examine whether this failure depends on version (and/or configuration)
of p4/p4d or not.

diff --git a/tests/test-convert-p4-filetypes.t b/tests/test-convert-p4-filetypes.t
--- a/tests/test-convert-p4-filetypes.t
+++ b/tests/test-convert-p4-filetypes.t
@@ -317,7 +317,7 @@ convert
   1 initial
   0 keywords
   $ hg -R dst log --template 'rev={rev} desc="{desc}" tags="{tags}" files="{files}"\n'
-  rev=1 desc="keywords" tags="tip" files="crazy_symlink+k file_binary file_binary+k file_binary+kx file_binary+x file_ctext file_cxtext file_ktext file_kxtext file_ltext file_text file_text+c file_text+d file_text+f file_text+k file_text+ko file_text+kx file_text+l file_text+m file_text+s file_text+s2 file_text+w file_text+x file_ubinary file_uxbinary file_xbinary file_xltext file_xtext target_symlink target_symlink+k"
+  rev=1 desc="keywords" tags="tip" files="crazy_symlink+k file_binary file_binary+k file_binary+kx file_binary+x file_ctext file_cxtext file_ktext file_kxtext file_ltext file_tempobj file_text file_text+c file_text+d file_text+f file_text+k file_text+ko file_text+kx file_text+l file_text+m file_text+s file_text+s2 file_text+w file_text+x file_ubinary file_uxbinary file_xbinary file_xltext file_xtempobj file_xtext target_symlink target_symlink+k"
   rev=0 desc="initial" tags="" files="file_binary file_binary+k file_binary+kx file_binary+x file_ctext file_cxtext file_ktext file_kxtext file_ltext file_symlink file_symlink+k file_text file_text+c file_text+d file_text+f file_text+k file_text+ko file_text+kx file_text+l file_text+m file_text+s2 file_text+w file_text+x file_ubinary file_uxbinary file_xbinary file_xltext file_xtext target_symlink target_symlink+k"
 
 revision 0
@@ -406,7 +406,7 @@ revision 0
 
 revision 1
   $ hg -R dst update 1
-  30 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  32 files updated, 0 files merged, 0 files removed, 0 files unresolved
   $ head dst/file_* | cat -v
   ==> dst/file_binary <==
   this is binary$Id$
@@ -525,6 +525,17 @@ revision 1
   $Revision$
   $Header$$Header$Header$
   
+  ==> dst/file_tempobj <==
+  this is tempobj
+  $Id$
+  $Header$
+  $Date$
+  $DateTime$
+  $Change$
+  $File$
+  $Revision$
+  $Header$$Header$Header$
+  
   ==> dst/file_text <==
   this is text
   $Id$
@@ -712,6 +723,17 @@ revision 1
   $Revision$
   $Header$$Header$Header$
   
+  ==> dst/file_xtempobj <==
+  this is xtempobj
+  $Id$
+  $Header$
+  $Date$
+  $DateTime$
+  $Change$
+  $File$
+  $Revision$
+  $Header$$Header$Header$
+  
   ==> dst/file_xtext <==
   this is xtext
   $Id$


More information about the Mercurial-devel mailing list