OSDN Git Service

Update version number and change log for 1.0.1.0 release
[tortoisegit/TortoiseGitJp.git] / doc / test / MakeTest.bat
1 @echo off\r
2 :: There is no easy way to avoid using an absolute path here.\r
3 :: To avoid editing a versioned file you should create a text file\r
4 :: called DocPath.txt which contains the path to the TSVN doc folder.\r
5 :: It must use forward slashes and URL escaping if necessary - no spaces!\r
6 if not exist DocPath.txt echo c:/TortoiseGit/doc > DocPath.txt\r
7 for /f %%p in (DocPath.txt) do @set docpath=%%p\r
8 \r
9 if exist temp rd /s/q temp\r
10 md temp\r
11 cd temp\r
12 md repos\r
13 md doc\r
14 md docs\r
15 md repos2\r
16 md ext\r
17 svnadmin create repos --fs-type fsfs\r
18 svnadmin create repos2 --fs-type fsfs\r
19 svn co -q file:///%docpath%/test/temp/repos doc\r
20 if errorlevel 1 goto checkout_fail\r
21 svn co -q file:///%docpath%/test/temp/repos docs\r
22 svn co -q file:///%docpath%/test/temp/repos2 ext\r
23 \r
24 :: This is used to add content to the 'external' repository.\r
25 cd ext\r
26 :: Copy some files from the docs to create content\r
27 copy ..\..\..\source\en\TortoiseGit\tsvn_server\server*.xml > nul\r
28 for %%f in (server*.xml) do svn add %%f\r
29 :: Commit external repos2 r1\r
30 svn ci -q -m "Document the server" .\r
31 cd ..\r
32 rd /s/q ext\r
33 \r
34 cd doc\r
35 :: Copy some files from the docs to create content\r
36 type nul > ..\targets\r
37 for %%f in (add blame checkout) do (\r
38         @copy/b ..\..\..\source\en\TortoiseGit\tsvn_dug\dug_%%f.xml+..\..\footnote1.txt dug_%%f.xml> nul\r
39         @echo dug_%%f.xml >> ..\targets\r
40 )\r
41 svn add --no-auto-props --targets ..\targets\r
42 :: Commit repos r1\r
43 svn ci -q -m "Document some commands" .\r
44 type nul > ..\targets\r
45 for %%f in (commit export ignore) do (\r
46         @copy/b ..\..\..\source\en\TortoiseGit\tsvn_dug\dug_%%f.xml+..\..\footnote1.txt dug_%%f.xml> nul\r
47         @echo dug_%%f.xml >> ..\targets\r
48 )\r
49 svn add --no-auto-props --targets ..\targets\r
50 :: Commit repos r2\r
51 svn ci -q -m "Document commands group 2" .\r
52 type nul > ..\targets\r
53 for %%f in (relocate revert showlog) do (\r
54         @copy/b ..\..\..\source\en\TortoiseGit\tsvn_dug\dug_%%f.xml+..\..\footnote1.txt dug_%%f.xml> nul\r
55         @echo dug_%%f.xml >> ..\targets\r
56 )\r
57 svn add --targets ..\targets\r
58 :: Commit repos r3\r
59 svn ci -q -m "Document some more commands" .\r
60 \r
61 :: Add a reference to the external repository\r
62 svn ps -q svn:externals "ext file:///%docpath%/test/temp/repos2/" .\r
63 :: Commit repos r4\r
64 svn up -q\r
65 svn ci -q -m "create externals reference" .\r
66 svn up -q\r
67 \r
68 copy ..\..\subwcrev1.txt subwcrev.txt > nul\r
69 svn add --no-auto-props subwcrev.txt\r
70 :: Commit repos r5\r
71 svn ci -q -m "Document the SubWCRev program" .\r
72 svn up -q ../docs\r
73 \r
74 :: Now make some changes that will cause conflicts later.\r
75 :: Change detection is broken when timestamps are the same.\r
76 :: Force a current timestamp by using type instead of copy.\r
77 type ..\..\subwcrev2.txt > subwcrev.txt\r
78 for %%f in (ignore showlog) do (\r
79         @copy/b ..\..\..\source\en\TortoiseGit\tsvn_dug\dug_%%f.xml+..\..\footnote2.txt dug_%%f.xml> nul\r
80 )\r
81 :: Add text which will need merging on next update\r
82 type ..\..\footnote1.txt >> dug_export.xml\r
83 :: Commit repos r6\r
84 svn ci -q -m "Clarify the description of SubWCRev" .\r
85 \r
86 :: Add yet more files\r
87 type nul > ..\targets\r
88 for %%f in (branchtag conflicts general) do (\r
89         @copy ..\..\..\source\en\TortoiseGit\tsvn_dug\dug_%%f.xml > nul\r
90         @echo dug_%%f.xml >> ..\targets\r
91 )\r
92 type ..\..\footnote1.txt >> dug_ignore.xml\r
93 svn add --no-auto-props --targets ..\targets\r
94 :: Commit repos r7\r
95 svn ci -q -m "Document final commands" .\r
96 \r
97 :: Update to just before the latest commit\r
98 :: This is so CfM has something to work on when checking the repository\r
99 svn up -q -r6\r
100 \r
101 :: Modify some files\r
102 for %%f in (add blame relocate) do (\r
103         @copy/b ..\..\..\source\en\TortoiseGit\tsvn_dug\dug_%%f.xml+..\..\footnote2.txt dug_%%f.xml> nul\r
104 )\r
105 @copy/b ..\..\..\source\en\TortoiseGit\tsvn_dug\dug_ignore.xml+..\..\footnote3.txt+..\..\footnote1.txt dug_ignore.xml> nul\r
106 :: Add an unversioned file\r
107 echo Read Me > readme.txt\r
108 :: Add a nested WC\r
109 md nested\r
110 svn co -q file:///%docpath%/test/temp/repos2 nested\r
111 :: Change a file property\r
112 svn ps -q local:property "This is a local property" dug_revert.xml\r
113 :: Lock a file\r
114 svn lock -m "Major update" dug_add.xml > NUL\r
115 \r
116 cd ..\docs\r
117 :: Make changes which conflict with what we did earlier.\r
118 copy /y ..\..\subwcrev3.txt subwcrev.txt > nul\r
119 for %%f in (checkout commit export ignore showlog) do (\r
120         @copy/b ..\..\..\source\en\TortoiseGit\tsvn_dug\dug_%%f.xml+..\..\footnote3.txt dug_%%f.xml> nul\r
121 )\r
122 svn diff . > ..\docs.patch\r
123 \r
124 cd ..\r
125 del targets\r
126 goto end\r
127 :checkout_fail\r
128 echo Perhaps you have not set the correct unix-style path in DocPath.txt\r
129 :end\r
130 cd ..\r
131 set docpath=\r