[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [tortoisesvn] r25285 committed - TortoiseMerge: Use left file except marked blocks....

From: Simon Large <simon.tortoisesvn_at_gmail.com>
Date: Mon, 10 Mar 2014 15:28:25 +0000

"Use left file except marked blocks" is correct but confusing. It
sounds exactly like what you were trying to avoid, i.e. undoing the
marked bits and keeping the rest. How about "Use left file plus marked
changes".

Simon

On 10 March 2014 15:13, <tortoisesvn_at_googlecode.com> wrote:
> Revision: 25285
> Author: ch3cooli_at_gmail.com
> Date: Mon Mar 10 15:13:00 2014 UTC
> Log: TortoiseMerge: Use left file except marked blocks.
> (Fixes issue #623) : Add Hunk Selection in TortoiseMerge
> http://code.google.com/p/tortoisesvn/source/detail?r=25285
>
> Modified:
> /trunk/Languages/TortoiseUI.pot
> /trunk/src/Resources/TortoiseMergeENG.rc
> /trunk/src/TortoiseMerge/BaseView.cpp
> /trunk/src/TortoiseMerge/BaseView.h
> /trunk/src/TortoiseMerge/RightView.cpp
> /trunk/src/TortoiseMerge/RightView.h
> /trunk/src/TortoiseMerge/resource.h
>
> =======================================
> --- /trunk/Languages/TortoiseUI.pot Mon Mar 10 15:03:36 2014 UTC
> +++ /trunk/Languages/TortoiseUI.pot Mon Mar 10 15:13:00 2014 UTC
> @@ -9930,6 +9930,10 @@
> msgid "Use left file"
> msgstr ""
>
> +#. Resource IDs: (252)
> +msgid "Use left file except marked blocks"
> +msgstr ""
> +
> #. Resource IDs: (1432)
> msgid "Use recycle bin when reverting"
> msgstr ""
> =======================================
> --- /trunk/src/Resources/TortoiseMergeENG.rc Mon Mar 10 15:03:36 2014 UTC
> +++ /trunk/src/Resources/TortoiseMergeENG.rc Mon Mar 10 15:13:00 2014 UTC
> @@ -876,6 +876,8 @@
> IDS_VIEWCONTEXTMENU_ENCODING "File Encoding"
> IDS_VIEWCONTEXTMENU_MARKBLOCK "Mark this block"
> IDS_VIEWCONTEXTMENU_UNMARKBLOCK "Unmark this block"
> + IDS_VIEWCONTEXTMENU_USELEFTFILEEXCEPTMARKED
> + "Use left file except marked blocks"
> END
>
> STRINGTABLE
> =======================================
> --- /trunk/src/TortoiseMerge/BaseView.cpp Mon Mar 10 15:03:36 2014 UTC
> +++ /trunk/src/TortoiseMerge/BaseView.cpp Mon Mar 10 15:13:00 2014 UTC
> @@ -2376,6 +2376,9 @@
> case POPUPCOMMAND_UNMARKBLOCK:
> m_pwndRight->MarkBlock(false);
> break;
> + case POPUPCOMMAND_USELEFTFILEEXCEPTMARKED:
> + m_pwndRight->UseLeftFileExceptMarked();
> + break;
> // 2-pane view multiedit commands; target is left view
> case POPUPCOMMAND_PREPENDFROMRIGHT:
> if (!m_pwndLeft->IsReadonly())
> @@ -5749,7 +5752,7 @@
> /**
> Replaces lines from source view to this
> */
> -void CBaseView::UseViewBlock(CBaseView * pwndView, int nFirstViewLine, int
> nLastViewLine)
> +void CBaseView::UseViewBlock(CBaseView * pwndView, int nFirstViewLine, int
> nLastViewLine, bool skipMarked)
> {
> if (!IsViewGood(pwndView))
> return;
> @@ -5759,6 +5762,8 @@
>
> for (int viewLine = nFirstViewLine; viewLine <= nLastViewLine;
> viewLine++)
> {
> + if (skipMarked && GetViewMarked(viewLine))
> + continue;
> viewdata line = pwndView->GetViewData(viewLine);
> if (line.ending != EOL_NOENDING)
> line.ending = m_lineendings;
> @@ -5866,6 +5871,11 @@
> Invalidate();
> RefreshViews();
> }
> +
> +void CBaseView::UseViewFileExceptMarked(CBaseView *pwndView)
> +{
> + UseViewBlock(pwndView, 0, GetViewCount() - 1, true);
> +}
>
> int CBaseView::GetIndentCharsForLine(int x, int y)
> {
> =======================================
> --- /trunk/src/TortoiseMerge/BaseView.h Mon Mar 10 15:03:36 2014 UTC
> +++ /trunk/src/TortoiseMerge/BaseView.h Mon Mar 10 15:13:00 2014 UTC
> @@ -188,6 +188,7 @@
> virtual void UseLeftFile() {return UseViewFile(m_pwndLeft); }
> virtual void UseRightBlock() {return UseViewBlock(m_pwndRight); }
> virtual void UseRightFile() {return UseViewFile(m_pwndRight); }
> + virtual void UseLeftFileExceptMarked() { return
> UseViewFileExceptMarked(m_pwndLeft); }
>
> // ViewData methods
> void InsertViewData(int index, const CString& sLine,
> DiffStates state, int linenumber, EOL ending, HIDESTATE hide, int
> movedline);
> @@ -432,10 +433,11 @@
>
> virtual void UseBothBlocks(CBaseView * /*pwndFirst*/, CBaseView *
> /*pwndLast*/) {};
> virtual void UseViewBlock(CBaseView * /*pwndView*/) {}
> - void UseViewBlock(CBaseView * pwndView, int nFirstViewLine,
> int nLastViewLine);
> + void UseViewBlock(CBaseView * pwndView, int nFirstViewLine,
> int nLastViewLine, bool skipMarked = false);
> virtual void UseViewFile(CBaseView * /*pwndView*/) {}
> virtual void MarkBlock(bool /*marked*/) {}
> void MarkBlock(bool marked, int nFirstViewLine, int
> nLastViewLine);
> + void UseViewFileExceptMarked(CBaseView *pwndView);
>
> virtual void AddContextItems(CIconMenu& popup, DiffStates state);
> void AddCutCopyAndPaste(CIconMenu& popup);
> @@ -606,6 +608,7 @@
> POPUPCOMMAND_USEBOTHRIGHTFIRST,
> POPUPCOMMAND_MARKBLOCK,
> POPUPCOMMAND_UNMARKBLOCK,
> + POPUPCOMMAND_USELEFTFILEEXCEPTMARKED,
> // multiple writable views
> POPUPCOMMAND_PREPENDFROMRIGHT,
> POPUPCOMMAND_REPLACEBYRIGHT,
> =======================================
> --- /trunk/src/TortoiseMerge/RightView.cpp Mon Mar 10 15:03:36 2014 UTC
> +++ /trunk/src/TortoiseMerge/RightView.cpp Mon Mar 10 15:13:00 2014 UTC
> @@ -199,6 +199,11 @@
> return;
> CBaseView::MarkBlock(marked, nFirstViewLine, nLastViewLine);
> }
> +
> +void CRightView::UseViewFileExceptMarked()
> +{
> + CBaseView::UseViewFileExceptMarked(m_pwndLeft);
> +}
>
> void CRightView::AddContextItems(CIconMenu& popup, DiffStates state)
> {
> @@ -248,6 +253,7 @@
> if (showUnmark)
> popup.AppendMenuIcon(POPUPCOMMAND_UNMARKBLOCK,
> IDS_VIEWCONTEXTMENU_UNMARKBLOCK);
> }
> + popup.AppendMenuIcon(POPUPCOMMAND_USELEFTFILEEXCEPTMARKED,
> IDS_VIEWCONTEXTMENU_USELEFTFILEEXCEPTMARKED);
> popup.AppendMenuIcon(POPUPCOMMAND_USELEFTFILE,
> IDS_VIEWCONTEXTMENU_USEOTHERFILE);
> if (IsLeftViewGood() && !m_pwndLeft->IsReadonly())
> {
> =======================================
> --- /trunk/src/TortoiseMerge/RightView.h Mon Mar 10 15:03:36 2014 UTC
> +++ /trunk/src/TortoiseMerge/RightView.h Mon Mar 10 15:13:00 2014 UTC
> @@ -36,6 +36,7 @@
> void UseLeftBlock(); ///< Use Block from Left
> void UseLeftFile(); ///< Use File from Left
> void MarkBlock(bool marked);
> + void UseViewFileExceptMarked();
>
> protected:
> void AddContextItems(CIconMenu& popup, DiffStates state);
> =======================================
> --- /trunk/src/TortoiseMerge/resource.h Mon Mar 10 15:03:36 2014 UTC
> +++ /trunk/src/TortoiseMerge/resource.h Mon Mar 10 15:13:00 2014 UTC
> @@ -261,6 +261,7 @@
> #define IDS_VIEWCONTEXTMENU_ENCODING 4017
> #define IDS_VIEWCONTEXTMENU_MARKBLOCK 4018
> #define IDS_VIEWCONTEXTMENU_UNMARKBLOCK 4019
> +#define IDS_VIEWCONTEXTMENU_USELEFTFILEEXCEPTMARKED 4020
> #define IDS_VIEWTITLE_THEIRS 4200
> #define IDS_VIEWTITLE_MERGED 4201
> #define IDS_VIEWTITLE_MINE 4202
>
> ------------------------------------------------------
> http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=3547&dsMessageId=3074284

------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=757&dsMessageId=3074286

To unsubscribe from this discussion, e-mail: [dev-unsubscribe_at_tortoisesvn.tigris.org].
Received on 2014-03-10 16:28:32 CET

This is an archived mail posted to the TortoiseSVN Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.