}
else
{
- val = 0;
- //pCtx->AddDiff(name0, dir0, dir1, inf[0].stat.st_mtime, inf[1].stat.st_mtime, FILE_SAME);
- // if (gWriteLog) gLog.Write(_T("\tidentical.\r\n"));
+ // To not add as same file
+ // This should be done more cleanly in future
+ val = 1;
+ pCtx->AddDiff(name0, dir0, dir1, inf[0].stat.st_mtime, inf[1].stat.st_mtime, FILE_BINSAME);
+ gLog.Write(_T("\tsame binary.\r\n"));
}
}
else
BYTE code;
}DIFFITEM;
-#define FILE_LUNIQUE 0
-#define FILE_RUNIQUE 1
-#define FILE_DIFF 2
-#define FILE_SAME 3
-#define FILE_ERROR 4
-#define FILE_BINDIFF 5
-#define FILE_LDIRUNIQUE 6
-#define FILE_RDIRUNIQUE 7
+#define FILE_LUNIQUE 0
+#define FILE_RUNIQUE 1
+#define FILE_DIFF 2
+#define FILE_SAME 3
+#define FILE_ERROR 4
+#define FILE_BINSAME 5
+#define FILE_BINDIFF 6
+#define FILE_LDIRUNIQUE 7
+#define FILE_RDIRUNIQUE 8
class IDiffStatus
{
act.src = srFile;
act.dest = slFile;
act.idx = sel;
+ act.code = di.code;
act.dirflag = IsItemCodeDir(di.code);
actionList.actions.AddTail(act);
}
act.dest = srFile;
act.dirflag = IsItemCodeDir(di.code);
act.idx = sel;
+ act.code = di.code;
actionList.actions.AddTail(act);
}
++actionList.selcount;
act.src = slFile;
act.dirflag = IsItemCodeDir(di.code);
act.idx = sel;
+ act.code = di.code;
actionList.actions.AddTail(act);
}
++actionList.selcount;
act.src = srFile;
act.dirflag = IsItemCodeDir(di.code);
act.idx = sel;
+ act.code = di.code;
actionList.actions.AddTail(act);
}
++actionList.selcount;
act.dest = slFile;
act.dirflag = IsItemCodeDir(di.code);
act.idx = sel;
+ act.code = di.code;
actionList.actions.AddTail(act);
}
++actionList.selcount;
// copy single file, and update status immediately
if (mf->SyncFiles(act.src, act.dest, &s))
{
- mf->UpdateCurrentFileStatus(FILE_SAME, act.idx);
+ if (act.code == FILE_BINDIFF)
+ mf->UpdateCurrentFileStatus(FILE_BINSAME, act.idx);
+ else
+ mf->UpdateCurrentFileStatus(FILE_SAME, act.idx);
}
else
{
{
case FILE_LUNIQUE:
case FILE_DIFF:
+ case FILE_BINSAME:
case FILE_BINDIFF:
case FILE_SAME:
case FILE_LDIRUNIQUE:
{
case FILE_RUNIQUE:
case FILE_DIFF:
+ case FILE_BINSAME:
case FILE_BINDIFF:
case FILE_SAME:
case FILE_RDIRUNIQUE:
switch(code)
{
case FILE_DIFF:
+ case FILE_BINSAME:
case FILE_BINDIFF:
case FILE_SAME:
return TRUE;
{
case FILE_LUNIQUE:
case FILE_DIFF:
+ case FILE_BINSAME:
case FILE_BINDIFF:
case FILE_SAME:
return TRUE;
{
case FILE_RUNIQUE:
case FILE_DIFF:
+ case FILE_BINSAME:
case FILE_BINDIFF:
case FILE_SAME:
return TRUE;
p = _tcsninc(di.lpath, llen);
}
break;
+ case FILE_BINSAME:
case FILE_BINDIFF:
if (mf->m_bShowDiff
&& (!mf->m_bHideBak || !FileExtMatches(di.filename,BACKUP_FILE_EXT)))
VERIFY(s.LoadString(IDS_BIN_FILES_DIFF));
SetItemStatus(nIdx, s, FILE_BINDIFF, &di.ltime, &di.rtime);
break;
+ case FILE_BINSAME:
+ VERIFY(s.LoadString(IDS_BIN_FILES_SAME));
+ SetItemStatus(nIdx, s, FILE_BINSAME, &di.ltime, &di.rtime);
+ break;
case FILE_LUNIQUE:
case FILE_LDIRUNIQUE:
AfxFormatString1(s, IDS_ONLY_IN_FMT, di.lpath);
VERIFY (bm.LoadBitmap (IDB_UNKNOWN));
VERIFY (-1 != m_imageList.Add (&bm, RGB (255, 255, 255)));
bm.Detach();
- VERIFY (bm.LoadBitmap (IDB_BINARY));
+ VERIFY (bm.LoadBitmap (IDB_BINARYSAME));
+ VERIFY (-1 != m_imageList.Add (&bm, RGB (255, 255, 255)));
+ bm.Detach();
+ VERIFY (bm.LoadBitmap (IDB_BINARYDIFF));
VERIFY (-1 != m_imageList.Add (&bm, RGB (255, 255, 255)));
bm.Detach();
VERIFY (bm.LoadBitmap (IDB_LFOLDER));
}
break;
case FILE_BINDIFF:
+ case FILE_BINSAME:
{
CString s;
VERIFY(s.LoadString(IDS_FILEBINARY));
// Implementation types
private:
typedef enum { ACT_COPY=1, ACT_DEL_LEFT, ACT_DEL_RIGHT, ACT_DEL_BOTH } ACT_TYPE;
- struct action { CString src; CString dest; BOOL dirflag; int idx; };
+ struct action { CString src; CString dest; BOOL dirflag; int idx; BYTE code;};
typedef CList<int, int> DeletedItemList; // indices into display list control
struct ActionList
{
STRINGTABLE DISCARDABLE
BEGIN
ID_DIR_OPEN_RIGHT_WITH "Open right file with..."
+ IDS_BIN_FILES_SAME "Binary files are identical"
END
#endif // English (U.S.) resources
#define IDS_ERROR_BACKUP 188
#define IDS_CONFIRM_COPY_SINGLE 189
#define IDS_CONFIRM_DELETE_SINGLE 190
+#define IDS_BIN_FILES_SAME 191
#define IDB_EQUAL 213
#define IDB_NOTEQUAL 214
#define IDB_RFOLDER 215
#define IDB_UNKNOWN 216
-#define IDB_BINARY 217
+#define IDB_BINARYSAME 217
+
#define IDB_LFILE 218
#define IDB_RFILE 219
#define IDB_SPLASH 220
#define IDB_WINMERGE 221
#define IDB_OLDSPLASH 222
#define IDB_LFOLDER 223
+#define IDB_BINARYDIFF 224
#define IDC_LEFT_EDIT 1000
#define IDC_FILE_EDIT 1000
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_3D_CONTROLS 1
-#define _APS_NEXT_RESOURCE_VALUE 113
+#define _APS_NEXT_RESOURCE_VALUE 225
#define _APS_NEXT_COMMAND_VALUE 32817
#define _APS_NEXT_CONTROL_VALUE 1036
#define _APS_NEXT_SYMED_VALUE 108
#define IDS_ERROR_BACKUP 188
#define IDS_CONFIRM_COPY_SINGLE 189
#define IDS_CONFIRM_DELETE_SINGLE 190
+#define IDS_BIN_FILES_SAME 191
#define IDB_EQUAL 213
#define IDB_NOTEQUAL 214
#define IDB_RFOLDER 215
#define IDB_UNKNOWN 216
-#define IDB_BINARY 217
+#define IDB_BINARYSAME 217
+
#define IDB_LFILE 218
#define IDB_RFILE 219
#define IDB_SPLASH 220
#define IDB_WINMERGE 221
#define IDB_OLDSPLASH 222
#define IDB_LFOLDER 223
+#define IDB_BINARYDIFF 224
#define IDC_LEFT_EDIT 1000
#define IDC_FILE_EDIT 1000
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_3D_CONTROLS 1
-#define _APS_NEXT_RESOURCE_VALUE 113
+#define _APS_NEXT_RESOURCE_VALUE 225
#define _APS_NEXT_COMMAND_VALUE 32817
#define _APS_NEXT_CONTROL_VALUE 1036
#define _APS_NEXT_SYMED_VALUE 108
#define IDS_ERROR_BACKUP 188
#define IDS_CONFIRM_COPY_SINGLE 189
#define IDS_CONFIRM_DELETE_SINGLE 190
+#define IDS_BIN_FILES_SAME 191
#define IDB_EQUAL 213
#define IDB_NOTEQUAL 214
#define IDB_RFOLDER 215
#define IDB_UNKNOWN 216
-#define IDB_BINARY 217
+#define IDB_BINARYSAME 217
+
#define IDB_LFILE 218
#define IDB_RFILE 219
#define IDB_SPLASH 220
#define IDB_WINMERGE 221
#define IDB_OLDSPLASH 222
#define IDB_LFOLDER 223
+#define IDB_BINARYDIFF 224
#define IDC_LEFT_EDIT 1000
#define IDC_FILE_EDIT 1000
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_3D_CONTROLS 1
-#define _APS_NEXT_RESOURCE_VALUE 113
+#define _APS_NEXT_RESOURCE_VALUE 225
#define _APS_NEXT_COMMAND_VALUE 32817
#define _APS_NEXT_CONTROL_VALUE 1036
#define _APS_NEXT_SYMED_VALUE 108
#define IDS_ERROR_BACKUP 188
#define IDS_CONFIRM_COPY_SINGLE 189
#define IDS_CONFIRM_DELETE_SINGLE 190
+#define IDS_BIN_FILES_SAME 191
#define IDB_EQUAL 213
#define IDB_NOTEQUAL 214
#define IDB_RFOLDER 215
#define IDB_UNKNOWN 216
-#define IDB_BINARY 217
+#define IDB_BINARYSAME 217
+
#define IDB_LFILE 218
#define IDB_RFILE 219
#define IDB_SPLASH 220
#define IDB_WINMERGE 221
#define IDB_OLDSPLASH 222
#define IDB_LFOLDER 223
+#define IDB_BINARYDIFF 224
#define IDC_LEFT_EDIT 1000
#define IDC_FILE_EDIT 1000
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_3D_CONTROLS 1
-#define _APS_NEXT_RESOURCE_VALUE 113
+#define _APS_NEXT_RESOURCE_VALUE 225
#define _APS_NEXT_COMMAND_VALUE 32817
#define _APS_NEXT_CONTROL_VALUE 1036
#define _APS_NEXT_SYMED_VALUE 108
#define IDS_ERROR_BACKUP 188
#define IDS_CONFIRM_COPY_SINGLE 189
#define IDS_CONFIRM_DELETE_SINGLE 190
+#define IDS_BIN_FILES_SAME 191
#define IDB_EQUAL 213
#define IDB_NOTEQUAL 214
#define IDB_RFOLDER 215
#define IDB_UNKNOWN 216
-#define IDB_BINARY 217
+#define IDB_BINARYSAME 217
+
#define IDB_LFILE 218
#define IDB_RFILE 219
#define IDB_SPLASH 220
#define IDB_WINMERGE 221
#define IDB_OLDSPLASH 222
#define IDB_LFOLDER 223
+#define IDB_BINARYDIFF 224
#define IDC_LEFT_EDIT 1000
#define IDC_FILE_EDIT 1000
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_3D_CONTROLS 1
-#define _APS_NEXT_RESOURCE_VALUE 113
+#define _APS_NEXT_RESOURCE_VALUE 225
#define _APS_NEXT_COMMAND_VALUE 32817
#define _APS_NEXT_CONTROL_VALUE 1036
#define _APS_NEXT_SYMED_VALUE 108
#define IDS_ERROR_BACKUP 188
#define IDS_CONFIRM_COPY_SINGLE 189
#define IDS_CONFIRM_DELETE_SINGLE 190
+#define IDS_BIN_FILES_SAME 191
#define IDB_EQUAL 213
#define IDB_NOTEQUAL 214
#define IDB_RFOLDER 215
#define IDB_UNKNOWN 216
-#define IDB_BINARY 217
+#define IDB_BINARYSAME 217
+
#define IDB_LFILE 218
#define IDB_RFILE 219
#define IDB_SPLASH 220
#define IDB_WINMERGE 221
#define IDB_OLDSPLASH 222
#define IDB_LFOLDER 223
+#define IDB_BINARYDIFF 224
#define IDC_LEFT_EDIT 1000
#define IDC_FILE_EDIT 1000
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_3D_CONTROLS 1
-#define _APS_NEXT_RESOURCE_VALUE 113
+#define _APS_NEXT_RESOURCE_VALUE 225
#define _APS_NEXT_COMMAND_VALUE 32817
#define _APS_NEXT_CONTROL_VALUE 1036
#define _APS_NEXT_SYMED_VALUE 108
#define IDS_ERROR_BACKUP 188
#define IDS_CONFIRM_COPY_SINGLE 189
#define IDS_CONFIRM_DELETE_SINGLE 190
+#define IDS_BIN_FILES_SAME 191
#define IDB_EQUAL 213
#define IDB_NOTEQUAL 214
#define IDB_RFOLDER 215
#define IDB_UNKNOWN 216
-#define IDB_BINARY 217
+#define IDB_BINARYSAME 217
+
#define IDB_LFILE 218
#define IDB_RFILE 219
#define IDB_SPLASH 220
#define IDB_WINMERGE 221
#define IDB_OLDSPLASH 222
#define IDB_LFOLDER 223
+#define IDB_BINARYDIFF 224
#define IDC_LEFT_EDIT 1000
#define IDC_FILE_EDIT 1000
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_3D_CONTROLS 1
-#define _APS_NEXT_RESOURCE_VALUE 113
+#define _APS_NEXT_RESOURCE_VALUE 225
#define _APS_NEXT_COMMAND_VALUE 32817
#define _APS_NEXT_CONTROL_VALUE 1036
#define _APS_NEXT_SYMED_VALUE 108
IDB_NOTEQUAL BITMAP DISCARDABLE "res\\notequal.bmp"
IDB_RFOLDER BITMAP DISCARDABLE "res\\rfolder.bmp"
IDB_UNKNOWN BITMAP DISCARDABLE "res\\unknown.bmp"
-IDB_BINARY BITMAP DISCARDABLE "res\\binary.bmp"
+IDB_BINARYSAME BITMAP DISCARDABLE "res\\binary.bmp"
IDB_LFILE BITMAP DISCARDABLE "res\\lfile.bmp"
IDB_RFILE BITMAP DISCARDABLE "res\\rfile.bmp"
+IDB_BINARYDIFF BITMAP DISCARDABLE "res\\binarydiff.bmp"
/////////////////////////////////////////////////////////////////////////////
//
STRINGTABLE DISCARDABLE
BEGIN
ID_DIR_OPEN_RIGHT_WITH "Open right file with..."
+ IDS_BIN_FILES_SAME "Binary files are identical"
END
#endif // English (U.S.) resources
2003-02-11 Perry
Fixing recent SplitFilename & directory concat problems.
+ [ 683924 ] Same binaries for directory compare.
2003-02-10 Perry
Kimmo's fix for crash due to NULL doc pointer in MergeDoc::SaveHelper.
#define IDS_ERROR_BACKUP 188
#define IDS_CONFIRM_COPY_SINGLE 189
#define IDS_CONFIRM_DELETE_SINGLE 190
+#define IDS_BIN_FILES_SAME 191
#define IDB_EQUAL 213
#define IDB_NOTEQUAL 214
#define IDB_RFOLDER 215
#define IDB_UNKNOWN 216
-#define IDB_BINARY 217
+#define IDB_BINARYSAME 217
+
#define IDB_LFILE 218
#define IDB_RFILE 219
#define IDB_SPLASH 220
#define IDB_WINMERGE 221
#define IDB_OLDSPLASH 222
#define IDB_LFOLDER 223
+#define IDB_BINARYDIFF 224
#define IDC_LEFT_EDIT 1000
#define IDC_FILE_EDIT 1000
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_3D_CONTROLS 1
-#define _APS_NEXT_RESOURCE_VALUE 113
+#define _APS_NEXT_RESOURCE_VALUE 225
#define _APS_NEXT_COMMAND_VALUE 32817
#define _APS_NEXT_CONTROL_VALUE 1036
#define _APS_NEXT_SYMED_VALUE 108