diff tests/test-kwarchive.t @ 298:aa945541d2ca

kwarchive: fully implements recursing into Mercurial subrepos and do keyword expansion there also
author Franz Glasner <hg@dom66.de>
date Wed, 30 Jan 2019 00:14:15 +0100
parents 4e86a3bce096
children 56df37d7878e
line wrap: on
line diff
--- a/tests/test-kwarchive.t	Tue Jan 29 19:17:29 2019 +0100
+++ b/tests/test-kwarchive.t	Wed Jan 30 00:14:15 2019 +0100
@@ -282,24 +282,24 @@
   $ cat .hgsubstate
   ^[a-f0-9]+\s+subrepo1$ (re)
 
-... archiving subrepos does not automatically anything expand in the subrepos
+... archiving subrepos does expand correctly configured subrepos also
 
   $ hg kwarchive -S --path-filter=full --user-filter=full _archive
   $ cat _archive/subrepo1/test2.txt
   test2.txt: This is a file with some replacement tests
   ^$ (re)
-  $HGheader$
-  $HGnodeid$
-  $Date$
-  $JustDate$
-  $HGrevision$
-  $Revision$
-  $Author$
+  $HGheader: subrepo1/test2.txt 0c95c26060e11bb02614a08140e64df4bf9f4db1 1970-01-01 00:00:00 +0000 First+Second+<first.second@example.com> draft $
+  $HGnodeid: a6d464aee6d2eee611b33b6ab88de136fc9eadf6 $
+  $Date: 1970-01-01 00:00:00 +0000 $
+  $JustDate: 1970-01-01 $
+  $HGrevision: 0c95c26060e11bb02614a08140e64df4bf9f4db1 $
+  $Revision: 0c95c26060e1 $
+  $Author: First+Second+<first.second@example.com> $
   ^$ (re)
-  $MySubstKeyword$
-  |VCSMySubstKeyword|
+  $MySubstKeyword: This is a custom replacement $
+  This is a custom replacement
 
-... but simple configuring it in the parent within the "patterns" yields
+... but simply configuring it in the parent within the "patterns" yields
 ... an error
 
   $ cat >.hgkwarchive <<EOF
@@ -413,3 +413,53 @@
   $Header: dir3/dir4/test-s.file 0c95c26060e1 1970-01-01 00:00:00 +0000 first.second draft $
   $Id: test-s.file 0c95c26060e1 1970-01-01 00:00:00 +0000 first.second draft $
   $Source: dir3/dir4/test-s.file $
+
+  $ hg kwarchive -S --user-filter=full --path-filter=full _archive
+  $ cat _archive/VERSION
+  0.0.dev1
+  5da89dae8d25aa4d9c6973c1269cca7d37822e6e
+  $ cat _archive/test2.txt
+  This is a file with some replacement tests
+  ^$ (re)
+  $HGheader: https://theuser:thepass@hg.example.com:4443/repo.hg/test2.txt 5da89dae8d25aa4d9c6973c1269cca7d37822e6e 1970-01-01 00:00:00 +0000 First+Second+<first.second@example.com> draft $
+  $HGnodeid: 070aa91690d7b1f757fdc373fe61c03c5b28e0b0 $
+  $Date: 1970-01-01 00:00:00 +0000 $
+  $JustDate: 1970-01-01 $
+  $HGrevision: 5da89dae8d25aa4d9c6973c1269cca7d37822e6e $
+  $Revision: 5da89dae8d25 $
+  $Author: First+Second+<first.second@example.com> $
+  ^$ (re)
+  $MySubstKeyword: This is a custom replacement $
+  This is a custom replacement
+  $ cat _archive/subrepos1/subrepo1/VERSION
+  0.0.dev1
+  d1b8815da083673940df64aa6e450308e6b493b0
+  $ cat _archive/subrepos1/subrepo1/test2.txt
+  test2.txt: This is a file with some replacement tests
+  ^$ (re)
+  $HGheader: file:///subrepo1/test2.txt d1b8815da083673940df64aa6e450308e6b493b0 1970-01-01 00:00:00 +0000 First+Second+<first.second@example.com> draft $
+  $HGnodeid: a6d464aee6d2eee611b33b6ab88de136fc9eadf6 $
+  $Date: 1970-01-01 00:00:00 +0000 $
+  $JustDate: 1970-01-01 $
+  $HGrevision: d1b8815da083673940df64aa6e450308e6b493b0 $
+  $Revision: d1b8815da083 $
+  $Author: First+Second+<first.second@example.com> $
+  ^$ (re)
+  $MySubstKeyword: This is a custom replacement $
+  This is a custom replacement
+  $ cat _archive/subrepos1/subrepo1/subrepos2/subrepo2/VERSION
+  0.0.dev1
+  0c95c26060e11bb02614a08140e64df4bf9f4db1
+  $ cat _archive/subrepos1/subrepo1/subrepos2/subrepo2/test2.txt
+  test2.txt: This is a file with some replacement tests
+  ^$ (re)
+  $HGheader: file:///subrepo2/test2.txt 0c95c26060e11bb02614a08140e64df4bf9f4db1 1970-01-01 00:00:00 +0000 First+Second+<first.second@example.com> draft $
+  $HGnodeid: a6d464aee6d2eee611b33b6ab88de136fc9eadf6 $
+  $Date: 1970-01-01 00:00:00 +0000 $
+  $JustDate: 1970-01-01 $
+  $HGrevision: 0c95c26060e11bb02614a08140e64df4bf9f4db1 $
+  $Revision: 0c95c26060e1 $
+  $Author: First+Second+<first.second@example.com> $
+  ^$ (re)
+  $MySubstKeyword: This is a custom replacement $
+  This is a custom replacement