Mercurial > hg > easyhg
changeset 328:ea62eb083ed4 filelist_right_button_menu
Merge fixes: primarily, handle failed merges better
author | Chris Cannam |
---|---|
date | Fri, 11 Mar 2011 18:08:22 +0000 |
parents | f166f70c64f9 |
children | ef977e7482cd |
files | easyhg-extdiff.sh easyhg-merge.sh filestates.cpp filestatuswidget.cpp mainwindow.cpp |
diffstat | 5 files changed, 24 insertions(+), 32 deletions(-) [+] |
line wrap: on
line diff
--- a/easyhg-extdiff.sh Fri Mar 11 17:42:12 2011 +0000 +++ b/easyhg-extdiff.sh Fri Mar 11 18:08:22 2011 +0000 @@ -7,24 +7,17 @@ while [ $# -gt 2 ]; do shift done -found="" for d in kdiff3 kdiff3.exe; do if [ -x "$p/$d" ]; then - found=true - "$p/$d" "$1" "$2" - break + exec "$p/$d" "$1" "$2" elif [ -x "$(type -path $d)" ]; then - found=true - "$d" "$1" "$2" - break; + exec "$d" "$1" "$2" fi done -if [ -z "$found" ]; then - od=/usr/bin/opendiff - if [ -x "$od" ]; then - found=true - "$od" "$1" "$2" | cat - fi +od=/usr/bin/opendiff +if [ -x "$od" ]; then + "$od" "$1" "$2" | cat + exit 0 fi -[ -n "$found" ] +exit 1
--- a/easyhg-merge.sh Fri Mar 11 17:42:12 2011 +0000 +++ b/easyhg-merge.sh Fri Mar 11 18:08:22 2011 +0000 @@ -12,23 +12,15 @@ left="$1" ancestor="$2" right="$3" -found="" for d in kdiff3 kdiff3.exe; do if [ -x "$p/$d" ]; then - found=true - "$p/$d" "$ancestor" "$left" "$right" -o "$out" - break + exec "$p/$d" "$ancestor" "$left" "$right" -o "$out" elif [ -x "$(type -path $d)" ]; then - found=true - "$d" "$ancestor" "$left" "$right" -o "$out" - break; + exec "$d" "$ancestor" "$left" "$right" -o "$out" fi done -if [ -z "$found" ]; then - fm=/Developer/Applications/Utilities/FileMerge.app/Contents/MacOS/FileMerge - if [ -x "$fm" ]; then - found=true - "$fm" -left "$left" -merge "$out" -ancestor "$ancestor" -right "$right" - fi +fm=/Developer/Applications/Utilities/FileMerge.app/Contents/MacOS/FileMerge +if [ -x "$fm" ]; then + exec "$fm" -left "$left" -merge "$out" -ancestor "$ancestor" -right "$right" fi -[ -n "$found" ] +exit 1
--- a/filestates.cpp Fri Mar 11 17:42:12 2011 +0000 +++ b/filestates.cpp Fri Mar 11 18:08:22 2011 +0000 @@ -156,7 +156,7 @@ break; case InConflict: - a << Annotate << Diff << RedoMerge << Revert << MarkResolved; + a << Annotate << Diff << RedoMerge << MarkResolved << Revert; break; case Missing: @@ -168,7 +168,7 @@ break; case Clean: - a << Remove << Annotate; + a << Annotate << Remove; break; case Ignored:
--- a/filestatuswidget.cpp Fri Mar 11 17:42:12 2011 +0000 +++ b/filestatuswidget.cpp Fri Mar 11 18:08:22 2011 +0000 @@ -60,11 +60,11 @@ m_actionLabels[FileStates::Annotate] = tr("Show annotated version"); m_actionLabels[FileStates::Diff] = tr("Diff to parent"); m_actionLabels[FileStates::Commit] = tr("Commit..."); - m_actionLabels[FileStates::Revert] = tr("Revert to last commit"); + m_actionLabels[FileStates::Revert] = tr("Revert to last committed state"); m_actionLabels[FileStates::Add] = tr("Add to version control"); m_actionLabels[FileStates::Remove] = tr("Remove from version control"); m_actionLabels[FileStates::RedoMerge] = tr("Redo merge"); - m_actionLabels[FileStates::MarkResolved] = tr("Mark resolved"); + m_actionLabels[FileStates::MarkResolved] = tr("Mark conflict as resolved"); m_actionLabels[FileStates::Ignore] = tr("Ignore"); m_actionLabels[FileStates::UnIgnore] = tr("Stop ignoring");
--- a/mainwindow.cpp Fri Mar 11 17:42:12 2011 +0000 +++ b/mainwindow.cpp Fri Mar 11 18:08:22 2011 +0000 @@ -1845,6 +1845,13 @@ reportNewRemoteHeads(output); return; } + case ACT_MERGE: + case ACT_RETRY_MERGE: + MoreInformationDialog::information + (this, tr("Merge"), tr("Merge failed"), + tr("Some files were not merged successfully.<p>You can Merge again to repeat the interactive merge; use Revert to abandon the merge entirely; or edit the files that are in conflict in an editor and, when you are happy with them, choose Mark Resolved in each file's right-button menu."), + output); + return; case ACT_STAT: break; // go on and report default: