1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
| [MenuItem("SVN/Commit",false,1)] static void SVNCommit(){ List<string> pathList = new List<string> (); string basePath = SVNProjectPath + "/Assets"; pathList.Add (basePath); pathList.Add (SVNProjectPath+"/ProjectSettings"); string commitPath = string.Join ("*", pathList.ToArray ()); ProcessCommand ("TortoiseProc.exe", "/command:commit /path:"+ commitPath); } [MenuItem("SVN/Update",false,2)] static void SVNUpdate(){ ProcessCommand ("TortoiseProc.exe", "/command:update /path:" + SVNProjectPath + " /closeonend:0"); } [MenuItem("SVN/", false, 3)] static void Breaker () { } [MenuItem("SVN/CleanUp",false,4)] static void SVNCleanUp(){ ProcessCommand ("TortoiseProc.exe", "/command:cleanup /path:" + SVNProjectPath); } [MenuItem("SVN/Log",false,5)] static void SVNLog(){ ProcessCommand ("TortoiseProc.exe", "/command:log /path:" + SVNProjectPath); } static string SVNProjectPath{ get{ System.IO.DirectoryInfo parent = System.IO.Directory.GetParent(Application.dataPath); return parent.ToString(); } }
|