private void BinairyFilesChooseLocalBaseRemote(ConflictData item)
        {
            string caption = string.Format(fileBinairyChooseLocalBaseRemote.Text,
                                            item.Local.Filename,
                                            GetLocalSideString(),
                                            GetRemoteSideString());

            using (var frm = new FormModifiedDeletedCreated(string.Format(chooseLocalButtonText.Text + " ({0})", GetLocalSideString()),
                                                                            string.Format(chooseRemoteButtonText.Text + " ({0})", GetRemoteSideString()),
                                                                            keepBaseButtonText.Text,
                                                                            caption))
            {
                frm.ShowDialog(this);
                if (frm.KeepBase) //base
                    ChooseBaseOnConflict(item.Filename);
                if (frm.KeepLocal) //local
                    ChooseLocalOnConflict(item.Filename);
                if (frm.KeepRemote) //remote
                    ChooseRemoteOnConflict(item.Filename);
            }
        }
        private bool CheckForRemoteRevision(ConflictData item)
        {
            if (!string.IsNullOrEmpty(item.Remote.Filename))
                return true;

            string caption = string.Format(fileModifiedLocallyAndDelededRemotelyLong.Text,
                item.Filename,
                GetLocalSideString(),
                GetRemoteSideString());

            using (var frm = new FormModifiedDeletedCreated(string.Format(keepModifiedButtonText.Text + " ({0})", GetLocalSideString()),
                string.Format(deleteFileButtonText.Text + " ({0})", GetRemoteSideString()),
                keepBaseButtonText.Text,
                caption))
            {
                frm.ShowDialog(this);
                if (frm.KeepBase) //base
                    ChooseBaseOnConflict(item.Filename);
                if (frm.KeepLocal) //delete
                    ChooseLocalOnConflict(item.Filename);
                if (frm.KeepRemote) //remote
                    Module.RunGitCmd("rm -- \"" + item.Filename + "\"");
            }
            return false;
        }
예제 #3
0
        private bool CheckForLocalRevision(string filename)
        {
            if (string.IsNullOrEmpty(Module.GetConflictedFileNames(filename)[1]))
            {
                string caption = string.Format(fileDeletedLocallyAndModifiedRemotelyLong.Text,
                                                filename,
                                                GetLocalSideString(),
                                                GetRemoteSideString());

                using (var frm = new FormModifiedDeletedCreated(string.Format(deleteFileButtonText.Text + " ({0})", GetLocalSideString()),
                                                                                string.Format(keepModifiedButtonText.Text + " ({0})", GetRemoteSideString()),
                                                                                keepBaseButtonText.Text,
                                                                                caption))
                {
                    frm.ShowDialog(this);
                    if (frm.KeepBase) //base
                        ChooseBaseOnConflict(GetFileName());
                    if (frm.KeepLocal) //delete
                        Module.RunGitCmd("rm -- \"" + filename + "\"");
                    if (frm.KeepRemote) //remote
                        ChooseRemoteOnConflict(GetFileName());
                }
                return false;
            }
            return true;
        }