From 8161553965e72728f18fbd8df7d9420b5588c3ae Mon Sep 17 00:00:00 2001 From: Romain Failliot Date: Mon, 22 Jun 2020 19:24:13 -0400 Subject: [PATCH 1/2] Fix indentation --- src/usr/bin/diffuse | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/usr/bin/diffuse b/src/usr/bin/diffuse index ab91ea1..9def91a 100755 --- a/src/usr/bin/diffuse +++ b/src/usr/bin/diffuse @@ -2263,11 +2263,11 @@ class _Rcs: if len(r): prev = '.'.join(r) for k in sorted(names): - if prev is None: - k0 = None - else: - k0 = k - result.append([ (k0, prev), (k, rev) ]) + if prev is None: + k0 = None + else: + k0 = k + result.append([ (k0, prev), (k, rev) ]) except ValueError: logError(_('Error parsing revision %s.') % (rev, )) return result From c5b0dc19a03999db56454dccfc5fb4227b17c458 Mon Sep 17 00:00:00 2001 From: Romain Failliot Date: Mon, 22 Jun 2020 19:24:24 -0400 Subject: [PATCH 2/2] fix: add search for the RCS directory Fixes #28 It is actually a bug in the original repo (subversion), introduced by revision 420 [1], thus introduced after the latest 0.4.8 release. The refactoring in r420 removed the search for an 'RCS' directory alongside the targeted file. [1] https://sourceforge.net/p/diffuse/code/420/tree/trunk/src/usr/bin/diffuse?diff=51a4cccb2718464e57aae5f1:419 --- src/usr/bin/diffuse | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/usr/bin/diffuse b/src/usr/bin/diffuse index 9def91a..87b4d7b 100755 --- a/src/usr/bin/diffuse +++ b/src/usr/bin/diffuse @@ -2337,6 +2337,12 @@ class _Rcs: return popenRead(self.root, [ prefs.getString('rcs_bin_co'), '-p', '-q', '-r' + rev, safeRelativePath(self.root, name, prefs, 'rcs_cygwin') ], prefs, 'rcs_bash') def _get_rcs_repo(path, prefs): + if os.path.isdir(os.path.join(path, 'RCS')): + return _Rcs(path) + + # [rfailliot] this code doesn't seem to work, but was in 0.4.8 too. + # I'm letting it here until further tests are done, but it is possible + # this code never actually worked. try: for s in os.listdir(path): if s.endswith(',v') and os.path.isfile(os.path.join(path, s)):