Exemplo n.º 1
0
        private void AddRemoteBranch(string remote, string name)
        {
            Dictionary <string, ConfigBranch> branchList = null;

            if (remoteBranches.TryGetValue(remote, out branchList))
            {
                if (!branchList.ContainsKey(name))
                {
                    branchList.Add(name, new ConfigBranch {
                        Name = name, Remote = remotes[remote]
                    });
                    OnRemoteBranchListChanged?.Invoke();
                }
            }
        }
Exemplo n.º 2
0
        private void RepositoryManager_OnRemoteBranchRemoved(string remote, string name)
        {
            Dictionary <string, ConfigBranch> branchList;

            if (remoteBranches.TryGetValue(remote, out branchList))
            {
                if (branchList.ContainsKey(name))
                {
                    branchList.Remove(name);

                    Logger.Trace("OnRemoteBranchListChanged");
                    OnRemoteBranchListChanged?.Invoke();
                }
                else
                {
                    Logger.Warning("Branch {0} is not found in Remote {1}", name, remote);
                }
            }
            else
            {
                Logger.Warning("Remote {0} is not found", remote);
            }
        }