tests/test-subrepo-deep-nested-change.t
changeset 17108 1894dac619de
parent 17106 4d0e81dca75f
child 17112 f690402e80fb
equal deleted inserted replaced
17107:dcac72c9efb2 17108:1894dac619de
    97   $ hg debugsub -R cloned/sub1
    97   $ hg debugsub -R cloned/sub1
    98   path sub2
    98   path sub2
    99    source   ../sub2
    99    source   ../sub2
   100    revision 53dd3430bcaf5ab4a7c48262bcad6d441f510487
   100    revision 53dd3430bcaf5ab4a7c48262bcad6d441f510487
   101 
   101 
       
   102 Check that deep archiving works
       
   103  
       
   104   $ cd cloned
       
   105   $ echo 'test' > sub1/sub2/test.txt
       
   106   $ hg --config extensions.largefiles=! add sub1/sub2/test.txt
       
   107   $ mkdir sub1/sub2/folder
       
   108   $ echo 'subfolder' > sub1/sub2/folder/test.txt
       
   109   $ hg --config extensions.largefiles=! add sub1/sub2/folder/test.txt
       
   110   $ hg ci -Sm "add test.txt"
       
   111   committing subrepository sub1
       
   112   committing subrepository sub1/sub2
       
   113   $ hg --config extensions.largefiles=! archive -S ../archive_all
       
   114   $ find ../archive_all | sort
       
   115   ../archive_all
       
   116   ../archive_all/.hg_archival.txt
       
   117   ../archive_all/.hgsub
       
   118   ../archive_all/.hgsubstate
       
   119   ../archive_all/main
       
   120   ../archive_all/sub1
       
   121   ../archive_all/sub1/.hgsub
       
   122   ../archive_all/sub1/.hgsubstate
       
   123   ../archive_all/sub1/sub1
       
   124   ../archive_all/sub1/sub2
       
   125   ../archive_all/sub1/sub2/folder
       
   126   ../archive_all/sub1/sub2/folder/test.txt
       
   127   ../archive_all/sub1/sub2/sub2
       
   128   ../archive_all/sub1/sub2/test.txt
       
   129 
       
   130 Check that archive -X works in deep subrepos
       
   131 
       
   132   $ hg --config extensions.largefiles=! archive -S -X '**test*' ../archive_exclude
       
   133   $ find ../archive_exclude | sort
       
   134   ../archive_exclude
       
   135   ../archive_exclude/.hg_archival.txt
       
   136   ../archive_exclude/.hgsub
       
   137   ../archive_exclude/.hgsubstate
       
   138   ../archive_exclude/main
       
   139   ../archive_exclude/sub1
       
   140   ../archive_exclude/sub1/.hgsub
       
   141   ../archive_exclude/sub1/.hgsubstate
       
   142   ../archive_exclude/sub1/sub1
       
   143   ../archive_exclude/sub1/sub2
       
   144   ../archive_exclude/sub1/sub2/sub2
       
   145 
       
   146   $ hg --config extensions.largefiles=! archive -S -I '**test*' ../archive_include
       
   147   $ find ../archive_include | sort
       
   148   ../archive_include
       
   149   ../archive_include/sub1
       
   150   ../archive_include/sub1/sub2
       
   151   ../archive_include/sub1/sub2/folder
       
   152   ../archive_include/sub1/sub2/folder/test.txt
       
   153   ../archive_include/sub1/sub2/test.txt
       
   154 
   102 Check that deep archive works with largefiles (which overrides hgsubrepo impl)
   155 Check that deep archive works with largefiles (which overrides hgsubrepo impl)
   103 This also tests the repo.ui regression in 43fb170a23bd, and that lf subrepo
   156 This also tests the repo.ui regression in 43fb170a23bd, and that lf subrepo
   104 subrepos are archived properly.
   157 subrepos are archived properly.
   105 Note that add --large through a subrepo currently adds the file as a normal file
   158 Note that add --large through a subrepo currently adds the file as a normal file
   106 
   159 
   107   $ cd cloned
       
   108   $ echo "large" > sub1/sub2/large.bin
   160   $ echo "large" > sub1/sub2/large.bin
   109   $ hg --config extensions.largefiles= add --large -R sub1/sub2 sub1/sub2/large.bin
   161   $ hg --config extensions.largefiles= add --large -R sub1/sub2 sub1/sub2/large.bin
   110   $ echo "large" > large.bin
   162   $ echo "large" > large.bin
   111   $ hg --config extensions.largefiles= add --large large.bin
   163   $ hg --config extensions.largefiles= add --large large.bin
   112   $ hg --config extensions.largefiles= ci -S -m "add large files"
   164   $ hg --config extensions.largefiles= ci -S -m "add large files"
   124   ../archive_lf/sub1
   176   ../archive_lf/sub1
   125   ../archive_lf/sub1/.hgsub
   177   ../archive_lf/sub1/.hgsub
   126   ../archive_lf/sub1/.hgsubstate
   178   ../archive_lf/sub1/.hgsubstate
   127   ../archive_lf/sub1/sub1
   179   ../archive_lf/sub1/sub1
   128   ../archive_lf/sub1/sub2
   180   ../archive_lf/sub1/sub2
       
   181   ../archive_lf/sub1/sub2/folder
       
   182   ../archive_lf/sub1/sub2/folder/test.txt
   129   ../archive_lf/sub1/sub2/large.bin
   183   ../archive_lf/sub1/sub2/large.bin
   130   ../archive_lf/sub1/sub2/sub2
   184   ../archive_lf/sub1/sub2/sub2
       
   185   ../archive_lf/sub1/sub2/test.txt
       
   186   $ rm -rf ../archive_lf
       
   187 
       
   188 Exclude large files from main and sub-sub repo
       
   189 
       
   190   $ hg --config extensions.largefiles= archive -S -X '**.bin' ../archive_lf
       
   191   $ find ../archive_lf | sort
       
   192   ../archive_lf
       
   193   ../archive_lf/.hg_archival.txt
       
   194   ../archive_lf/.hgsub
       
   195   ../archive_lf/.hgsubstate
       
   196   ../archive_lf/main
       
   197   ../archive_lf/sub1
       
   198   ../archive_lf/sub1/.hgsub
       
   199   ../archive_lf/sub1/.hgsubstate
       
   200   ../archive_lf/sub1/sub1
       
   201   ../archive_lf/sub1/sub2
       
   202   ../archive_lf/sub1/sub2/folder
       
   203   ../archive_lf/sub1/sub2/folder/test.txt
       
   204   ../archive_lf/sub1/sub2/sub2
       
   205   ../archive_lf/sub1/sub2/test.txt
       
   206   $ rm -rf ../archive_lf
       
   207 
       
   208 Exclude normal files from main and sub-sub repo
       
   209 
       
   210   $ hg --config extensions.largefiles= archive -S -X '**.txt' ../archive_lf
       
   211   $ find ../archive_lf | sort
       
   212   ../archive_lf
       
   213   ../archive_lf/.hgsub
       
   214   ../archive_lf/.hgsubstate
       
   215   ../archive_lf/large.bin
       
   216   ../archive_lf/main
       
   217   ../archive_lf/sub1
       
   218   ../archive_lf/sub1/.hgsub
       
   219   ../archive_lf/sub1/.hgsubstate
       
   220   ../archive_lf/sub1/sub1
       
   221   ../archive_lf/sub1/sub2
       
   222   ../archive_lf/sub1/sub2/large.bin
       
   223   ../archive_lf/sub1/sub2/sub2
       
   224   $ rm -rf ../archive_lf
       
   225 
       
   226 Include normal files from within a largefiles subrepo
       
   227 
       
   228   $ hg --config extensions.largefiles= archive -S -I '**.txt' ../archive_lf
       
   229   $ find ../archive_lf | sort
       
   230   ../archive_lf
       
   231   ../archive_lf/.hg_archival.txt
       
   232   ../archive_lf/sub1
       
   233   ../archive_lf/sub1/sub2
       
   234   ../archive_lf/sub1/sub2/folder
       
   235   ../archive_lf/sub1/sub2/folder/test.txt
       
   236   ../archive_lf/sub1/sub2/test.txt
       
   237   $ rm -rf ../archive_lf
       
   238 
       
   239 Include large files from within a largefiles subrepo
       
   240 
       
   241   $ hg --config extensions.largefiles= archive -S -I '**.bin' ../archive_lf
       
   242   $ find ../archive_lf | sort
       
   243   ../archive_lf
       
   244   ../archive_lf/large.bin
       
   245   ../archive_lf/sub1
       
   246   ../archive_lf/sub1/sub2
       
   247   ../archive_lf/sub1/sub2/large.bin
       
   248   $ rm -rf ../archive_lf
       
   249 
       
   250 Find an exact largefile match in a largefiles subrepo
       
   251 
       
   252   $ hg --config extensions.largefiles= archive -S -I 'sub1/sub2/large.bin' ../archive_lf
       
   253   $ find ../archive_lf | sort
       
   254   ../archive_lf
       
   255   ../archive_lf/sub1
       
   256   ../archive_lf/sub1/sub2
       
   257   ../archive_lf/sub1/sub2/large.bin
       
   258   $ rm -rf ../archive_lf
       
   259 
       
   260 Find an exact match to a standin (should archive nothing)
       
   261   $ hg --config extensions.largefiles= archive -S -I 'sub/sub2/.hglf/large.bin' ../archive_lf
       
   262   $ find ../archive_lf | sort
       
   263   find: `../archive_lf': No such file or directory
   131 
   264 
   132   $ cd ..
   265   $ cd ..