• R/O
  • SSH
  • HTTPS

tortoisesvn: Commit


Commit MetaInfo

Révision25212 (tree)
l'heure2014-02-15 06:18:36
Auteurstefankueng

Message de Log

Use the svn_move_behavior_auto_moves flag when fetching the log, and handle the new actions "moved" and "move-replaced".

Change Summary

Modification

--- trunk/src/LogCache/Access/LogIteratorBase.cpp (revision 25211)
+++ trunk/src/LogCache/Access/LogIteratorBase.cpp (revision 25212)
@@ -1,6 +1,6 @@
11 // TortoiseSVN - a Windows shell extension for easy version control
22
3-// Copyright (C) 2007-2009, 2011-2013 - TortoiseSVN
3+// Copyright (C) 2007-2009, 2011-2014 - TortoiseSVN
44
55 // This program is free software; you can redistribute it and/or
66 // modify it under the terms of the GNU General Public License
@@ -178,6 +178,8 @@
178178
179179 case CRevisionInfoContainer::ACTION_ADDED:
180180 case CRevisionInfoContainer::ACTION_REPLACED:
181+ case CRevisionInfoContainer::ACTION_MOVED:
182+ case CRevisionInfoContainer::ACTION_MOVEREPLACED:
181183 {
182184 if (iter.HasFromPath())
183185 {
--- trunk/src/LogCache/Access/XMLLogReader.cpp (revision 25211)
+++ trunk/src/LogCache/Access/XMLLogReader.cpp (revision 25212)
@@ -1,6 +1,6 @@
11 // TortoiseSVN - a Windows shell extension for easy version control
22
3-// Copyright (C) 2007-2010, 2012 - TortoiseSVN
3+// Copyright (C) 2007-2010, 2012, 2014 - TortoiseSVN
44
55 // This program is free software; you can redistribute it and/or
66 // modify it under the terms of the GNU General Public License
@@ -263,6 +263,14 @@
263263 action = CRevisionInfoContainer::ACTION_DELETED;
264264 break;
265265
266+ case 'V':
267+ action = CRevisionInfoContainer::ACTION_MOVED;
268+ break;
269+
270+ case 'E':
271+ action = CRevisionInfoContainer::ACTION_MOVEREPLACED;
272+ break;
273+
266274 default:
267275
268276 std::cerr << "ignoring unknown action type" << std::endl;
--- trunk/src/LogCache/Access/XMLLogWriter.cpp (revision 25211)
+++ trunk/src/LogCache/Access/XMLLogWriter.cpp (revision 25212)
@@ -69,6 +69,8 @@
6969 static const std::string modifiedActionText = "\n action=\"M\"";
7070 static const std::string replacedActionText = "\n action=\"R\"";
7171 static const std::string deletedActionText = "\n action=\"D\"";
72+ static const std::string movedActionText = "\n action=\"V\"";
73+ static const std::string movereplacedActionText = "\n action=\"E\"";
7274
7375 static const std::string pathText = ">";
7476 static const std::string pathEndText = "</path>\n";
@@ -112,6 +114,12 @@
112114 case CRevisionInfoContainer::ACTION_REPLACED:
113115 file << replacedActionText;
114116 break;
117+ case CRevisionInfoContainer::ACTION_MOVED:
118+ file << movedActionText;
119+ break;
120+ case CRevisionInfoContainer::ACTION_MOVEREPLACED:
121+ file << movereplacedActionText;
122+ break;
115123 default:
116124 break;
117125 }
--- trunk/src/LogCache/CacheLogQuery.cpp (revision 25211)
+++ trunk/src/LogCache/CacheLogQuery.cpp (revision 25212)
@@ -1,6 +1,6 @@
11 // TortoiseSVN - a Windows shell extension for easy version control
22
3-// Copyright (C) 2007-2013 - TortoiseSVN
3+// Copyright (C) 2007-2014 - TortoiseSVN
44
55 // This program is free software; you can redistribute it and/or
66 // modify it under the terms of the GNU General Public License
@@ -422,7 +422,9 @@
422422
423423 if ( ( (cache->GetLogInfo().GetSumChanges (index)
424424 & ( CRevisionInfoContainer::ACTION_ADDED
425- | CRevisionInfoContainer::ACTION_REPLACED)) != 0)
425+ | CRevisionInfoContainer::ACTION_REPLACED
426+ | CRevisionInfoContainer::ACTION_MOVED
427+ | CRevisionInfoContainer::ACTION_MOVEREPLACED)) != 0)
426428 && (currentPath.get() != NULL))
427429 {
428430 // create the appropriate iterator to follow the potential path change
--- trunk/src/LogCache/Containers/RevisionInfoContainer.h (revision 25211)
+++ trunk/src/LogCache/Containers/RevisionInfoContainer.h (revision 25212)
@@ -1,6 +1,6 @@
11 // TortoiseSVN - a Windows shell extension for easy version control
22
3-// Copyright (C) 2007-2011 - TortoiseSVN
3+// Copyright (C) 2007-2011, 2014 - TortoiseSVN
44
55 // This program is free software; you can redistribute it and/or
66 // modify it under the terms of the GNU General Public License
@@ -268,17 +268,21 @@
268268
269269 enum TChangeAction
270270 {
271- HAS_COPY_FROM = 0x01,
271+ HAS_COPY_FROM = 0x01,
272+
273+ ACTION_ADDED = 0x04,
274+ ACTION_CHANGED = 0x08,
275+ ACTION_REPLACED = 0x10,
276+ ACTION_DELETED = 0x20,
277+ ACTION_MOVED = 0x40,
278+ ACTION_MOVEREPLACED = 0x80,
272279
273- ACTION_ADDED = 0x04,
274- ACTION_CHANGED = 0x08,
275- ACTION_REPLACED = 0x10,
276- ACTION_DELETED = 0x20,
277-
278280 ANY_ACTION = ACTION_ADDED
279281 | ACTION_CHANGED
280282 | ACTION_REPLACED
281283 | ACTION_DELETED
284+ | ACTION_MOVED
285+ | ACTION_MOVEREPLACED
282286 };
283287
284288 /**
--- trunk/src/LogCache/ILogReceiver.h (revision 25211)
+++ trunk/src/LogCache/ILogReceiver.h (revision 25212)
@@ -1,6 +1,6 @@
11 // TortoiseSVN - a Windows shell extension for easy version control
22
3-// Copyright (C) 2007-2007, 2009-2011 - TortoiseSVN
3+// Copyright (C) 2007-2007, 2009-2011, 2014 - TortoiseSVN
44
55 // This program is free software; you can redistribute it and/or
66 // modify it under the terms of the GNU General Public License
@@ -49,10 +49,12 @@
4949
5050 enum
5151 {
52- LOGACTIONS_ADDED = 0x00000001,
53- LOGACTIONS_MODIFIED = 0x00000002,
54- LOGACTIONS_REPLACED = 0x00000004,
55- LOGACTIONS_DELETED = 0x00000008
52+ LOGACTIONS_ADDED = 0x00000001,
53+ LOGACTIONS_MODIFIED = 0x00000002,
54+ LOGACTIONS_REPLACED = 0x00000004,
55+ LOGACTIONS_DELETED = 0x00000008,
56+ LOGACTIONS_MOVED = 0x00000010,
57+ LOGACTIONS_MOVEREPLACED = 0x00000020
5658 };
5759
5860 /**
--- trunk/src/LogCache/SVNLogQuery.cpp (revision 25211)
+++ trunk/src/LogCache/SVNLogQuery.cpp (revision 25212)
@@ -181,7 +181,7 @@
181181 = (svn_log_changed_path2_t *) apr_hash_get ( log_entry->changed_paths2
182182 , item->key
183183 , item->klen);
184- static const char actionKeys[5] = "AMRD";
184+ static const char actionKeys[7] = "AMRDVE";
185185 const char* actionKey = strchr (actionKeys, log_item->action);
186186
187187 entry.action = actionKey == NULL
@@ -235,7 +235,7 @@
235235 = (svn_log_changed_path_t *) apr_hash_get ( log_entry->changed_paths
236236 , item->key
237237 , item->klen);
238- static const char actionKeys[5] = "AMRD";
238+ static const char actionKeys[7] = "AMRDVE";
239239 const char* actionKey = strchr (actionKeys, log_item->action);
240240
241241 entry.action = actionKey == NULL
@@ -410,7 +410,7 @@
410410 , includeChanges
411411 , strictNodeHistory
412412 , includeMerges
413- , svn_move_behavior_no_moves
413+ , svn_move_behavior_auto_moves
414414 , revprops
415415 , LogReceiver
416416 , (void *)&baton
--- trunk/src/TortoiseProc/LogDialog/LogDlg.cpp (revision 25211)
+++ trunk/src/TortoiseProc/LogDialog/LogDlg.cpp (revision 25212)
@@ -177,6 +177,8 @@
177177 , m_hDeletedIcon(NULL)
178178 , m_hMergedIcon(NULL)
179179 , m_hReverseMergedIcon(NULL)
180+ , m_hMovedIcon(NULL)
181+ , m_hMoveReplacedIcon(NULL)
180182 , m_nIconFolder(0)
181183 , m_prevLogEntriesSize(0)
182184 , m_temprev(0)
@@ -218,6 +220,8 @@
218220 DestroyIcon(m_hDeletedIcon);
219221 DestroyIcon(m_hMergedIcon);
220222 DestroyIcon(m_hReverseMergedIcon);
223+ DestroyIcon(m_hMovedIcon);
224+ DestroyIcon(m_hMoveReplacedIcon);
221225 if ( m_pStoreSelection )
222226 {
223227 m_pStoreSelection->ClearSelection();
@@ -428,6 +432,10 @@
428432 IMAGE_ICON, 0, 0, LR_DEFAULTSIZE);
429433 m_hReverseMergedIcon = (HICON)LoadImage(AfxGetResourceHandle(),
430434 MAKEINTRESOURCE(IDI_ACTIONREVERSEMERGED), IMAGE_ICON, 0, 0, LR_DEFAULTSIZE);
435+ m_hMovedIcon = (HICON)LoadImage(AfxGetResourceHandle(), MAKEINTRESOURCE(IDI_ACTIONREPLACED),
436+ IMAGE_ICON, 0, 0, LR_DEFAULTSIZE);
437+ m_hMoveReplacedIcon = (HICON)LoadImage(AfxGetResourceHandle(), MAKEINTRESOURCE(IDI_ACTIONREPLACED),
438+ IMAGE_ICON, 0, 0, LR_DEFAULTSIZE);
431439 }
432440
433441 void CLogDlg::ConfigureColumnsForLogListControl()
@@ -3206,7 +3214,17 @@
32063214 rect.top, m_hReplacedIcon, iconwidth, iconheight, 0, NULL, DI_NORMAL);
32073215 nIcons++;
32083216
3209- if ((pLogEntry->GetDepth())||
3217+ if (actions & LOGACTIONS_MOVED)
3218+ ::DrawIconEx(pLVCD->nmcd.hdc, rect.left + nIcons*iconwidth + ICONITEMBORDER,
3219+ rect.top, m_hMovedIcon, iconwidth, iconheight, 0, NULL, DI_NORMAL);
3220+ nIcons++;
3221+
3222+ if (actions & LOGACTIONS_MOVEREPLACED)
3223+ ::DrawIconEx(pLVCD->nmcd.hdc, rect.left + nIcons*iconwidth + ICONITEMBORDER,
3224+ rect.top, m_hMoveReplacedIcon, iconwidth, iconheight, 0, NULL, DI_NORMAL);
3225+ nIcons++;
3226+
3227+ if ((pLogEntry->GetDepth()) ||
32103228 (m_mergedRevs.find(pLogEntry->GetRevision()) != m_mergedRevs.end()))
32113229 {
32123230 if (pLogEntry->IsSubtractiveMerge())
@@ -3324,6 +3342,10 @@
33243342 crText = m_Colors.GetColor(CColors::Added);
33253343 if (action == LOGACTIONS_DELETED)
33263344 crText = m_Colors.GetColor(CColors::Deleted);
3345+ if (action == LOGACTIONS_MOVED)
3346+ crText = m_Colors.GetColor(CColors::Added);
3347+ if (action == LOGACTIONS_MOVEREPLACED)
3348+ crText = m_Colors.GetColor(CColors::Deleted);
33273349 }
33283350 if (m_currentChangedArray.GetCount() > pLVCD->nmcd.dwItemSpec)
33293351 {
@@ -3960,7 +3982,7 @@
39603982 case 1: //action -- dummy text, not drawn. Used to trick the auto-column resizing to not
39613983 // go below the icons
39623984 if (pLogEntry)
3963- lstrcpyn(pItem->pszText, L"XXXXXXXXXX", pItem->cchTextMax);
3985+ lstrcpyn(pItem->pszText, L"XXXXXXXXXXXXXXXX", pItem->cchTextMax);
39643986 break;
39653987 case 2: //author
39663988 if (pLogEntry)
@@ -4553,7 +4575,7 @@
45534575 // Adjust columns "Actions" containing icons
45544576 if (col == 1)
45554577 {
4556- const int nMinimumWidth = ICONITEMBORDER+16*5;
4578+ const int nMinimumWidth = ICONITEMBORDER+16*7;
45574579 if (cx < nMinimumWidth)
45584580 {
45594581 cx = nMinimumWidth;
@@ -5979,7 +6001,21 @@
59796001 actionText += CLogChangedPath::GetActionString (LOGACTIONS_REPLACED);
59806002 }
59816003
5982- sToolTipText = CUnicodeUtils::GetUnicode (actionText.c_str());
6004+ if (actions & LOGACTIONS_MOVED)
6005+ {
6006+ if (!actionText.empty())
6007+ actionText += "\r\n";
6008+ actionText += CLogChangedPath::GetActionString(LOGACTIONS_MOVED);
6009+ }
6010+
6011+ if (actions & LOGACTIONS_MOVEREPLACED)
6012+ {
6013+ if (!actionText.empty())
6014+ actionText += "\r\n";
6015+ actionText += CLogChangedPath::GetActionString(LOGACTIONS_MOVEREPLACED);
6016+ }
6017+
6018+ sToolTipText = CUnicodeUtils::GetUnicode(actionText.c_str());
59836019 if ((pLogEntry->GetDepth())||(m_mergedRevs.find(pLogEntry->GetRevision()) != m_mergedRevs.end()))
59846020 {
59856021 if (!sToolTipText.IsEmpty())
--- trunk/src/TortoiseProc/LogDialog/LogDlg.h (revision 25211)
+++ trunk/src/TortoiseProc/LogDialog/LogDlg.h (revision 25212)
@@ -418,6 +418,8 @@
418418 HICON m_hDeletedIcon;
419419 HICON m_hMergedIcon;
420420 HICON m_hReverseMergedIcon;
421+ HICON m_hMovedIcon;
422+ HICON m_hMoveReplacedIcon;
421423 int m_nIconFolder;
422424
423425 HACCEL m_hAccel;
--- trunk/src/TortoiseProc/LogDialog/LogDlgDataModel.cpp (revision 25211)
+++ trunk/src/TortoiseProc/LogDialog/LogDlgDataModel.cpp (revision 25212)
@@ -1,6 +1,6 @@
11 // TortoiseSVN - a Windows shell extension for easy version control
22
3-// Copyright (C) 2003-2007, 2009-2013 - TortoiseSVN
3+// Copyright (C) 2003-2007, 2009-2014 - TortoiseSVN
44
55 // This program is free software; you can redistribute it and/or
66 // modify it under the terms of the GNU General Public License
@@ -104,6 +104,8 @@
104104 static std::string deleteActionString;
105105 static std::string replacedActionString;
106106 static std::string modifiedActionString;
107+ static std::string movedActionString;
108+ static std::string movereplacedActionString;
107109 static std::string empty;
108110
109111 switch (action)
@@ -132,6 +134,18 @@
132134
133135 return replacedActionString;
134136
137+ case LOGACTIONS_MOVED:
138+ if (movedActionString.empty())
139+ LoadString(movedActionString, IDS_SVNACTION_MOVED);
140+
141+ return movedActionString;
142+
143+ case LOGACTIONS_MOVEREPLACED:
144+ if (movereplacedActionString.empty())
145+ LoadString(movereplacedActionString, IDS_SVNACTION_MOVEREPLACED);
146+
147+ return movereplacedActionString;
148+
135149 default:
136150 // there should always be an action
137151 assert (0);
--- trunk/src/TortoiseProc/RevisionGraph/FullGraphBuilder.cpp (revision 25211)
+++ trunk/src/TortoiseProc/RevisionGraph/FullGraphBuilder.cpp (revision 25212)
@@ -1,6 +1,6 @@
11 // TortoiseSVN - a Windows shell extension for easy version control
22
3-// Copyright (C) 2003-2008 - TortoiseSVN
3+// Copyright (C) 2003-2008, 2014 - TortoiseSVN
44
55 // This program is free software; you can redistribute it and/or
66 // modify it under the terms of the GNU General Public License
@@ -93,7 +93,7 @@
9393 // again in the same revision
9494
9595 if (( revisionInfo.GetSumChanges (index)
96- & CRevisionInfoContainer::ACTION_REPLACED) != 0)
96+ & (CRevisionInfoContainer::ACTION_REPLACED | CRevisionInfoContainer::ACTION_MOVEREPLACED)) != 0)
9797 {
9898 CSearchPathTree* startNode
9999 = searchTree->FindCommonParent (basePath.GetIndex());
@@ -220,7 +220,7 @@
220220 {
221221 index_t changePathID = iter->GetPathID();
222222
223- if ( (iter->GetAction() == CRevisionInfoContainer::ACTION_REPLACED)
223+ if (((iter->GetAction() == CRevisionInfoContainer::ACTION_REPLACED) || (iter->GetAction() == CRevisionInfoContainer::ACTION_MOVEREPLACED))
224224 && (path.GetBasePath().IsSameOrChildOf (changePathID)))
225225 {
226226 skipSubTree = false;
@@ -325,16 +325,22 @@
325325 classification = CNodeClassification::IS_DELETED;
326326 break;
327327
328- case CRevisionInfoContainer::ACTION_ADDED
329- + CRevisionInfoContainer::HAS_COPY_FROM:
330- case CRevisionInfoContainer::ACTION_REPLACED
331- + CRevisionInfoContainer::HAS_COPY_FROM:
332- classification = CNodeClassification::IS_ADDED
328+ case CRevisionInfoContainer::ACTION_ADDED
329+ + CRevisionInfoContainer::HAS_COPY_FROM:
330+ case CRevisionInfoContainer::ACTION_REPLACED
331+ + CRevisionInfoContainer::HAS_COPY_FROM:
332+ case CRevisionInfoContainer::ACTION_MOVED
333+ + CRevisionInfoContainer::HAS_COPY_FROM:
334+ case CRevisionInfoContainer::ACTION_MOVEREPLACED
335+ + CRevisionInfoContainer::HAS_COPY_FROM:
336+ classification = CNodeClassification::IS_ADDED
333337 + CNodeClassification::IS_COPY_TARGET;
334338 break;
335339
336340 case CRevisionInfoContainer::ACTION_ADDED:
337341 case CRevisionInfoContainer::ACTION_REPLACED:
342+ case CRevisionInfoContainer::ACTION_MOVED:
343+ case CRevisionInfoContainer::ACTION_MOVEREPLACED:
338344 classification = CNodeClassification::IS_ADDED;
339345 break;
340346 }
@@ -623,7 +629,11 @@
623629 + CRevisionInfoContainer::HAS_COPY_FROM:
624630 case CRevisionInfoContainer::ACTION_REPLACED
625631 + CRevisionInfoContainer::HAS_COPY_FROM:
626- // copy? -> does exist
632+ case CRevisionInfoContainer::ACTION_MOVED
633+ + CRevisionInfoContainer::HAS_COPY_FROM:
634+ case CRevisionInfoContainer::ACTION_MOVEREPLACED
635+ + CRevisionInfoContainer::HAS_COPY_FROM:
636+ // copy? -> does exist
627637
628638 // We can safely assume here, that the source tree
629639 // contains the path in question as this is why we
@@ -634,6 +644,8 @@
634644
635645 case CRevisionInfoContainer::ACTION_ADDED:
636646 case CRevisionInfoContainer::ACTION_REPLACED:
647+ case CRevisionInfoContainer::ACTION_MOVED:
648+ case CRevisionInfoContainer::ACTION_MOVEREPLACED:
637649 // exact addition? -> does exist
638650
639651 if (iter->GetPathID() == path.GetIndex())
Afficher sur ancien navigateur de dépôt.