• R/O
  • SSH

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javaandroidc++linuxc#objective-ccocoa誰得qtrubypythongamewindowsbathyscaphephpguic翻訳omegattwitterframeworktestbtronarduinovb.net計画中(planning stage)directxpreviewerゲームエンジンdom

Папка MyUtils


Commit MetaInfo

Revisionfcd8b2cf008dcb3b5e90a376bbdc01891af9da57 (tree)
Time2017-02-01 15:46:45
AuthorКонстантин Кошкин <catsoft1940@gmai...>
CommiterКонстантин Кошкин

Log Message

Скрипт для сравнения ert-файлов из оболочки Tortoise Hg

Change Summary

Incremental Difference

diff -r eb913edc1faa -r fcd8b2cf008d Scripts/ErtCmp/ErtCmpHg.vbs
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Scripts/ErtCmp/ErtCmpHg.vbs Wed Feb 01 09:46:45 2017 +0300
@@ -0,0 +1,77 @@
1+' Ñêðèïò äëÿ ñðàâíåíèÿ ert-ôàéëîâ èç îáîëî÷êè Tortoise Hg
2+' Âåðñèÿ 0.01 îò 22.10.2015
3+
4+Set Shell = CreateObject("WScript.Shell")
5+Set fso = CreateObject("Scripting.FileSystemObject")
6+Set args = WScript.Arguments
7+
8+If args.Count < 2 then
9+ WScript.Quit
10+End If
11+
12+file1 = Replace(args(0),"/","\")
13+file2 = Replace(args(1),"/","\")
14+
15+set f1 = fso.GetFile(file1)
16+set f2 = fso.GetFile(file2)
17+set tf1 = fso.GetFolder("c:\MyUtils\Scripts\ErtCmp\1\")
18+set tf2 = fso.GetFolder("c:\MyUtils\Scripts\ErtCmp\2\")
19+
20+
21+TempDir1 = "c:\MyUtils\Scripts\ErtCmp\1\"
22+TempDir2 = "c:\MyUtils\Scripts\ErtCmp\2\"
23+TempPath = "c:\MyUtils\Scripts\ErtCmp\temp\"
24+GComp = "c:\MyUtils\GComp\gcomp.exe -d "
25+KDiff = "c:\MyUtils\KDiff3\kdiff3.exe"
26+
27+If Err = 0 then
28+ ' Î÷èñòèì âðåìåííûå ïàïêè
29+ Set sf = tf1.Files
30+ For Each file In sf
31+ file.Delete True
32+ Next
33+ Set sf = tf2.Files
34+ For Each file In sf
35+ file.Delete(True)
36+ Next
37+
38+ ' Ñêîïèðóåì ôàéëû âî âðåìåííóþ ïàïêó
39+ fso.CopyFile f1.Path,tf1.Path & "\",True
40+ fso.CopyFile f2.Path,tf2.Path & "\",True
41+
42+ set f1 = fso.GetFile(tf1.Path & "\" & f1.name)
43+ set f2 = fso.GetFile(tf2.Path & "\" & f2.name)
44+ f1.Attributes = 0
45+ f2.Attributes = 0
46+
47+ ' Ðàñïàêóåì Ert ôàéëû
48+ cmdline = GComp & " -F " & """" & f1.Path & """ -DD " & tf1.Path
49+ Shell.run cmdline,,True
50+
51+ cmdline = GComp & " -F " & """" & f2.Path & """ -DD " & tf2.Path
52+ Shell.run cmdline,,True
53+
54+ 'WScript.Quit
55+
56+ ' Çàïóñòèì KDiff
57+ cmdline = KDiff & " " & tf1.Path & "\ÌîäóëüÔîðìû.1s " & tf2.Path & "\ÌîäóëüÔîðìû.1s"
58+ Shell.run cmdline,,True
59+
60+ ' Î÷èñòèì âðåìåííûå ïàïêè
61+ Set sf = tf1.Files
62+ For Each file In sf
63+ file.Delete True
64+ Next
65+ Set sf = tf1.SubFolders
66+ For Each folder In sf
67+ folder.Delete True
68+ Next
69+ Set sf = tf2.Files
70+ For Each file In sf
71+ file.Delete(True)
72+ Next
73+ Set sf = tf2.SubFolders
74+ For Each folder In sf
75+ folder.Delete True
76+ Next
77+End If
\ No newline at end of file