[issue1500] hg diff found dubious deltas

AlexRayne mercurial-bugs at selenic.com
Thu Feb 5 07:36:24 CST 2009


New submission from AlexRayne <AlexRainPE196 at newmail.ru>:

Hallow all! 
i try to generate a patch, and thouse containing such a deltas

@@ -4988,13 +5009,159 @@
                               ) : integer;
 var
   Self : FBRBICompareContext absolute context;
-begin
-  with self do begin
-    result := CompareTextPrefix(@(ValA.Data[FieldOffset]),
@(ValB.Data[FieldOffset]){, DataHigh +1});
-    if Descending then
-      Result := - Result;
-  end;
-end;
+  SA,SB: PAnsiString;
+begin
+  with self do begin
+    SA := @(ValA.Data[FieldOffset]);
+    SB := @(ValB.Data[FieldOffset]);
+    result := CompareTextPrefix(SA^, SB^{, DataHigh +1});
+    if Descending then
+      Result := - Result;
+  end;
+end;
+
and next a big inserted code here...... 

here is text:
-    if Descending then
-      Result := - Result;
-  end;
-end;

will be deleted and replaced with the exact same. 
as i understand this is do due to next delta is very close, 
so this deltas are combine in one. 
but this is not a very good idea - because i cant replace this deltas in 
different patches or delete one of them separetely from other.

----------
files: fix-index-ansi_comparators
messages: 8555
nosy: AlexRayne
priority: bug
status: unread
title: hg diff found dubious deltas
topic: diff, mq

____________________________________________________
Mercurial issue tracker <mercurial-bugs at selenic.com>
<http://www.selenic.com/mercurial/bts/issue1500>
____________________________________________________
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fix-index-ansi_comparators
Type: application/octet-stream
Size: 20910 bytes
Desc: not available
Url : http://selenic.com/pipermail/mercurial-devel/attachments/20090205/a476c23b/attachment.obj 


More information about the Mercurial-devel mailing list