Ticket #120 (closed enhancement: fixed)

Opened 15 years ago

Last modified 10 years ago

savannah: compare files command would be nice to have in mc

Reported by: mr_zbiggy Owned by: angel_il
Priority: minor Milestone: 4.7.2
Component: mc-core Version: master
Keywords: Cc: dborca@…
Blocked By: Blocking:
Branch state: merged Votes for changeset: committed-master

Description (last modified by ossi) (diff)

Original: http://savannah.gnu.org/bugs/?20739

Submitted by:Zbigniew Luszpinski <mr_zbiggy>Submitted on:Thu 09 Aug 2007 08:45:04 PM UTC
Category:CoreSeverity:3 - Normal
Status:NonePrivacy:Public
Assigned to:NoneOpen/Closed:Open
Release:4.6.1Operating System:GNU/Linux

Original submission:

compare files command would be nice to have in mc. Mc could use 
diff util as an engine by providing paths to files as diff 
arguments and parsing diff output.

This would be very helpful if someone in the future would like to 
add synchronize directories command to mc.

Comment 1 by Pavel Tsekov <ptsekov> at Thu 23 Aug 2007 01:49:25 PM UTC:

You may want to try/test the following patch:

[http://savannah.gnu.org/patch/?5893 patch #5893] - integrated side-by-side textmode diff viewer

Attachments

mc-4.6.2.ydiff_full.patch.gz (29.9 KB) - added by dborca 15 years ago.
file diff + dir diff against 4.6.2 release
mc-4.7.0-pre1.ydiff-full.patch.gz (29.6 KB) - added by dborca 15 years ago.
Quick fixes for 4.7.0-pre1
mc-4.7.0-pre1.ydiff-full.patch (121.3 KB) - added by angel_il 15 years ago.
xdiff.c.patch (25.1 KB) - added by dborca 14 years ago.

Change History

comment:1 Changed 15 years ago by metux

  • Priority changed from major to minor
  • Type changed from defect to enhancement

comment:2 Changed 15 years ago by styx

  • Milestone set to 4.7

Changed 15 years ago by dborca

file diff + dir diff against 4.6.2 release

comment:3 Changed 15 years ago by styx

  • Version 4.6.1 deleted
  • Milestone changed from 4.7 to future releases

Changed 15 years ago by dborca

Quick fixes for 4.7.0-pre1

comment:4 Changed 15 years ago by dborca

  • Cc dborca@… added
  • Component changed from mcedit to mc-core
  • severity set to no branch

Changed 15 years ago by angel_il

comment:5 Changed 15 years ago by angel_il

  • Milestone changed from future releases to 4.7.0-pre3

comment:6 Changed 14 years ago by angel_il

  • Milestone changed from 4.7.0-pre3 to 4.7.0-pre4

comment:7 Changed 14 years ago by slavazanko

  • Milestone changed from 4.7.0-pre4 to 4.7

comment:8 Changed 14 years ago by angel_il

  • severity changed from no branch to on rework
  • Milestone changed from 4.7 to 4.7.2

branch: 120_diff_view

comment:9 Changed 14 years ago by angel_il

  • severity changed from on rework to on review

initial changeset: 78ef198acae7d907ce876fda40bb705227492698

please review

comment:10 Changed 14 years ago by angel_il

  • Owner set to angel_il
  • Status changed from new to accepted

initial commit: 07d1eb0019950d70252789fd93c48ea5534485c4
branch: 120_diff_view

comment:11 Changed 14 years ago by slavazanko

  • Votes for changeset set to slavazanko

comment:12 Changed 14 years ago by angel_il

  • Votes for changeset changed from slavazanko to slavazanko angel_il

comment:13 Changed 14 years ago by andrew_b

  • Votes for changeset changed from slavazanko angel_il to slavazanko andrew_b
  • Version set to master
  • severity changed from on review to approved

comment:14 follow-up: ↓ 15 Changed 14 years ago by angel_il

  • Status changed from accepted to testing
  • Votes for changeset changed from slavazanko andrew_b to committed-master
  • Resolution set to fixed
  • severity changed from approved to merged

comment:15 in reply to: ↑ 14 ; follow-up: ↓ 18 Changed 14 years ago by dborca

Replying to angel_il:

merged: 8e33a5bef823fdfc272875ea42d4b21a2b6f07b5

There is a subtle bug in horizontal diff:

1126	                        if ((*p)[0] == off0)
1127	                        {
1128	                            break;
1129	                        }
1130	                        if ((*p)[1] == off1)
1131	                        {
1132	                            break;
1133	                        }

Because (*p)[0] dictates order and (*p)[1] must be monotonic with respect to that:

1126	                        if ((*p)[0] == off0)
1127	                        {
1128	                            break;
1129	                        }
1130	                        if ((*p)[1] >= off1)
1131	                        {
1132	                            break;
1133	                        }

Test case: abcdefghij <-> fghijabcde

Changed 14 years ago by dborca

comment:16 Changed 14 years ago by dborca

xdiff = Binary diff (ala vbindiff), just for the sake of it.

comment:17 Changed 14 years ago by andrew_b

#2159: fix of rpm spec.

comment:18 in reply to: ↑ 15 Changed 14 years ago by angel_il

  • Status changed from testing to closed

Replying to dborca:

Replying to angel_il:

merged: 8e33a5bef823fdfc272875ea42d4b21a2b6f07b5

There is a subtle bug in horizontal diff:

1126	                        if ((*p)[0] == off0)
1127	                        {
1128	                            break;
1129	                        }
1130	                        if ((*p)[1] == off1)
1131	                        {
1132	                            break;
1133	                        }

Because (*p)[0] dictates order and (*p)[1] must be monotonic with respect to that:

1126	                        if ((*p)[0] == off0)
1127	                        {
1128	                            break;
1129	                        }
1130	                        if ((*p)[1] >= off1)
1131	                        {
1132	                            break;
1133	                        }

Test case: abcdefghij <-> fghijabcde

fixed: bc0ad9446136f87aab30e02a02cb1cf564332779

about xdiff i think need new ticket...

comment:19 Changed 10 years ago by ossi

  • Description modified (diff)
  • Branch state set to no branch
  • Reporter changed from slavazanko to mr_zbiggy

comment:20 Changed 10 years ago by andrew_b

  • Branch state changed from no branch to merged
Note: See TracTickets for help on using tickets.