Ejemplo n.º 1
0
 static void CoreTest_RepositoryLocation()
 {
     VersionControl.GetRepositoryLocation(
         (sender, e) =>
         EditorUtility.DisplayDialog("Repository Location",
                                     VersionControl.ParseRepositoryLocation(((Process)sender).StandardOutput.ReadToEnd()), "Ok"));
 }
Ejemplo n.º 2
0
        /// Updates all tree listings by running three git commands.
        private static void UpdateTrees()
        {
            if (string.IsNullOrEmpty(mRepositoryLocation) && !_runningLocationProcess)
            {
                _runningLocationProcess = true;
                VersionControl.GetRepositoryLocation(OnRepositoryLocation);
            }

            // Get list of files
            VersionControl.FindFiles(OnFindFiles);

            // Get list of branches
            VersionControl.FindBranches(OnFindBranches);
        }
Ejemplo n.º 3
0
 /// <summary>
 /// Runs on EditorWindow.OnEnable().
 /// </summary>
 public static void OnEnable()
 {
     mFrameCount         = 0;
     mRepositoryLocation = VersionControl.repositoryLocationCache;
     if (!string.IsNullOrEmpty(mRepositoryLocation))
     {
         mRepositoryShortName = mRepositoryLocation.Substring(mRepositoryLocation.LastIndexOf(System.IO.Path.DirectorySeparatorChar) + 1);
     }
     else if (!_runningLocationProcess)
     {
         mGuiEnabled             = false;
         _runningLocationProcess = true;
         VersionControl.GetRepositoryLocation(OnRepositoryLocation);
     }
 }