static void OnFindBranches_INTERNAL(string input) { var branches = VersionControl.ParseBranches(input); Debug.Log("Local Branches:"); foreach (var branch in branches) { if (!branch.isRemote) { if (branch.isCurrent) { Debug.Log(branch.name + " (current branch)"); } else { Debug.Log(branch.name); } } } Debug.Log("Remote Branches:"); foreach (var branch in branches) { if (branch.isRemote) { Debug.Log(branch.name + " (" + branch.remoteName + ")"); } } }
// TODO: Handle errors (BrowserUtility.OnFindBranches) private static void OnFindBranches(object sender, System.EventArgs e) { mBranches = VersionControl.ParseBranches((sender as System.Diagnostics.Process).StandardOutput.ReadToEnd()); var tempList = new List <string>(); var tempList2 = new List <string>(); for (int i = 0; i < mBranches.Length; i++) { if (!mBranches[i].isRemote) { tempList.Add(mBranches[i].name); if (mBranches[i].isCurrent) { mLocalBranchIndex = i; } } else { if (!tempList2.Contains(mBranches[i].remoteName)) { tempList2.Add(mBranches[i].remoteName); } } } mLocalBranchNames = tempList.ToArray(); mRemoteNames = tempList2.ToArray(); }