protected virtual void OnButtonEditClicked(object sender, System.EventArgs e)
        {
            Repository rep = GetSelectedRepository();

            if (rep != null)
            {
                Repository           repCopy = rep.Clone();
                EditRepositoryDialog dlg     = new EditRepositoryDialog(repCopy);
                try
                {
                    if (MessageService.RunCustomDialog(dlg, this) != (int)Gtk.ResponseType.Ok)
                    {
                        VersionControlService.ResetConfiguration();
                        return;
                    }

                    rep.CopyConfigurationFrom(repCopy);
                    VersionControlService.SaveConfiguration();

                    TreeIter  iter;
                    TreeModel model;
                    if (repoTree.Selection.GetSelected(out model, out iter))
                    {
                        // Update values
                        store.SetValue(iter, RepoNameCol, rep.Name);
                        store.SetValue(iter, VcsName, rep.VersionControlSystem.Name);
                        bool filled = (bool)store.GetValue(iter, FilledCol);
                        if (filled && repoTree.GetRowExpanded(store.GetPath(iter)))
                        {
                            FullRepoNode(rep, iter);
                            repoTree.ExpandRow(store.GetPath(iter), false);
                        }
                        else if (filled)
                        {
                            store.SetValue(iter, FilledCol, false);
                            store.AppendValues(iter, null, "", "", true, "vcs-repository");
                        }
                    }
                    UpdateRepoDescription();
                }
                finally
                {
                    dlg.Destroy();
                }
            }
        }