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
This commit is contained in:
Romain Failliot 2020-06-22 19:24:24 -04:00
parent 8161553965
commit c5b0dc19a0
1 changed files with 6 additions and 0 deletions

View File

@ -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') 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): 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: try:
for s in os.listdir(path): for s in os.listdir(path):
if s.endswith(',v') and os.path.isfile(os.path.join(path, s)): if s.endswith(',v') and os.path.isfile(os.path.join(path, s)):