commit
7a616ceaab
|
@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
|
||||
## Unreleased
|
||||
|
||||
### Removed
|
||||
|
||||
- Remove support for the SVK CVS (@MightyCreak)
|
||||
|
||||
## 0.8.2 - 2023-04-16
|
||||
|
||||
### Added
|
||||
|
|
|
@ -36,8 +36,7 @@ Some key features of Diffuse:
|
|||
* Ability to directly edit files
|
||||
* Syntax highlighting
|
||||
* Supports several VCS: [Bazaar][bzr], [CVS][cvs], [Darcs][darcs], [Git][git],
|
||||
[Mercurial][hg], [Monotone][mtn], [RCS][rcs], [Subversion][svn] and
|
||||
[SVK][svk]
|
||||
[Mercurial][hg], [Monotone][mtn], [RCS][rcs] and [Subversion][svn]
|
||||
* Unicode support
|
||||
* Unlimited undo
|
||||
* Easy keyboard navigation
|
||||
|
@ -50,7 +49,6 @@ Some key features of Diffuse:
|
|||
[mtn]: https://www.monotone.ca
|
||||
[rcs]: https://www.gnu.org/software/rcs/
|
||||
[svn]: https://subversion.apache.org
|
||||
[svk]: https://metacpan.org/dist/SVK
|
||||
|
||||
## Documentation
|
||||
|
||||
|
|
|
@ -5,7 +5,8 @@
|
|||
<summary>Graphical tool for merging and comparing text files</summary>
|
||||
<description>
|
||||
<p>
|
||||
Diffuse is a graphical tool for comparing and merging text files. It can retrieve files for comparison from Bazaar, CVS, Darcs, Git, Mercurial, Monotone, RCS, Subversion, and SVK repositories.
|
||||
Diffuse is a graphical tool for comparing and merging text files. It can retrieve files for comparison from
|
||||
Bazaar, CVS, Darcs, Git, Mercurial, Monotone, RCS, and Subversion repositories.
|
||||
</p>
|
||||
</description>
|
||||
<supports>
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
is able to compare an arbitrary number of files side-by-side and gives
|
||||
users the ability to manually adjust line matching and directly edit
|
||||
files. <application>&app;</application> can also retrieve revisions of files from Bazaar, CVS,
|
||||
Darcs, Git, Mercurial, Monotone, RCS, Subversion, and SVK repositories
|
||||
Darcs, Git, Mercurial, Monotone, RCS, and Subversion repositories
|
||||
for comparison and merging.
|
||||
</para>
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
<title>Úvod</title>
|
||||
|
||||
<para>
|
||||
<application>&app;</application> je grafický nástroj pro slučování a porovnávání textových souborů. <application>&app;</application> dokáže porovnat libovolný počet souborů a nabízí uživatelům možnost ručně upravit zarovnání řádků a přímo upravovat porovnávané soubory. <application>&app;</application> také umí načíst k porovnání a slučování revize souborů přímo z repozitářů Bazaar, CVS, Darcs, Git, Mercurial, Monotone, RCS, Subversion a SVK.</para>
|
||||
<application>&app;</application> je grafický nástroj pro slučování a porovnávání textových souborů. <application>&app;</application> dokáže porovnat libovolný počet souborů a nabízí uživatelům možnost ručně upravit zarovnání řádků a přímo upravovat porovnávané soubory. <application>&app;</application> také umí načíst k porovnání a slučování revize souborů přímo z repozitářů Bazaar, CVS, Darcs, Git, Mercurial, Monotone, RCS a Subversion.</para>
|
||||
|
||||
<sect1 id="introduction-about">
|
||||
<title>O programu</title>
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
<chapter id="introduction">
|
||||
<title>Introduzione</title>
|
||||
|
||||
<para><application>&app;</application> è uno strumento grafico per l'unione e il confronto di file di testo. <application>&app;</application> è in grado di confrontare uno a fianco all'altro un qualsiasi numero di file e fornisce all'utente la possibilità di correggere manualmente la corrispondenza fra le righe e di modificare i file. <application>&app;</application> è anche in grado di recuperare le revisioni dei file dai repository Bazaar, CVS, Darcs, Git, Mercurial, Monotone, RCS, Subversion e SVK per confrontarle e unirle.</para>
|
||||
<para><application>&app;</application> è uno strumento grafico per l'unione e il confronto di file di testo. <application>&app;</application> è in grado di confrontare uno a fianco all'altro un qualsiasi numero di file e fornisce all'utente la possibilità di correggere manualmente la corrispondenza fra le righe e di modificare i file. <application>&app;</application> è anche in grado di recuperare le revisioni dei file dai repository Bazaar, CVS, Darcs, Git, Mercurial, Monotone, RCS e Subversion per confrontarle e unirle.</para>
|
||||
|
||||
<sect1 id="introduction-about">
|
||||
<title>Informazioni</title>
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
представлении бок о бок, предоставляет пользователям возможность вручную
|
||||
корректировать соответствие строк и редактировать файлы напрямую. <application>&app;</application>
|
||||
может также извлекать ревизии файлов из Bazaar, CVS, Darcs, Git,
|
||||
Mercurial, Monotone, RCS, Subversion и SVK репозиториев для их сравнения
|
||||
Mercurial, Monotone, RCS и Subversion репозиториев для их сравнения
|
||||
и слияния.
|
||||
</para>
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@ je grafický nástroj pro slučování a porovnávání textových souborů\&.
|
|||
Diffuse
|
||||
dokáže porovnat libovolný počet souborů a nabízí uživatelům možnost ručně upravit zarovnání řádků a přímo upravovat porovnávané soubory\&.
|
||||
Diffuse
|
||||
také umí načíst k porovnání a slučování revize souborů přímo z repozitářů Bazaar, CVS, Darcs, Git, Mercurial, Monotone, RCS, Subversion a SVK\&.
|
||||
také umí načíst k porovnání a slučování revize souborů přímo z repozitářů Bazaar, CVS, Darcs, Git, Mercurial, Monotone, RCS a Subversion\&.
|
||||
.SH "MOŽNOSTI"
|
||||
.SS "Možnosti nápovědy"
|
||||
.PP
|
||||
|
|
|
@ -18,7 +18,7 @@ Diffuse
|
|||
Diffuse
|
||||
è in grado di confrontare uno a fianco all\*(Aqaltro un qualsiasi numero di file e fornisce all\*(Aqutente la possibilità di correggere manualmente la corrispondenza fra le righe e di modificare i file\&.
|
||||
Diffuse
|
||||
è anche in grado di recuperare le revisioni dei file dai repository Bazaar, CVS, Darcs, Git, Mercurial, Monotone, RCS, Subversion e SVK per confrontarle e unirle\&.
|
||||
è anche in grado di recuperare le revisioni dei file dai repository Bazaar, CVS, Darcs, Git, Mercurial, Monotone, RCS e Subversion per confrontarle e unirle\&.
|
||||
.SH "OPZIONI"
|
||||
.SS "Opzioni di aiuto"
|
||||
.PP
|
||||
|
|
|
@ -18,7 +18,7 @@ is a graphical tool for merging and comparing text files\&.
|
|||
Diffuse
|
||||
is able to compare an arbitrary number of files side\-by\-side and gives users the ability to manually adjust line matching and directly edit files\&.
|
||||
Diffuse
|
||||
can also retrieve revisions of files from Bazaar, CVS, Darcs, Git, Mercurial, Monotone, RCS, Subversion, and SVK repositories for comparison and merging\&.
|
||||
can also retrieve revisions of files from Bazaar, CVS, Darcs, Git, Mercurial, Monotone, RCS and Subversion repositories for comparison and merging\&.
|
||||
.SH "OPTIONS"
|
||||
.SS "Help Options"
|
||||
.PP
|
||||
|
|
|
@ -17,7 +17,7 @@ diffuse \- графический инструмент для слияния и
|
|||
Diffuse
|
||||
является графическим инструментом для слияния и сравнения текстовых файлов\&. Она может сравнить произвольное число файлов в представлении бок о бок, предоставляет пользователям возможность вручную корректировать соответствие строк и редактировать файлы напрямую\&.
|
||||
Diffuse
|
||||
может также извлекать ревизии файлов из Bazaar, CVS, Darcs, Git, Mercurial, Monotone, RCS, Subversion и SVK репозиториев для их сравнения и слияния\&.
|
||||
может также извлекать ревизии файлов из Bazaar, CVS, Darcs, Git, Mercurial, Monotone, RCS и Subversion репозиториев для их сравнения и слияния\&.
|
||||
.SH "ОПЦИИ"
|
||||
.SS "Параметры Справки"
|
||||
.PP
|
||||
|
|
|
@ -25,7 +25,7 @@ few manual steps.
|
|||
## Create new release on GitHub
|
||||
|
||||
1. Create a new release on GitHub's [new release page](https://github.com/MightyCreak/diffuse/releases/new):
|
||||
- Release tag: Enter `v` followed with the new version (e.g. `v1.2.3`) and
|
||||
- Choose a tag: Enter `v` followed with the new version (e.g. `v1.2.3`) and
|
||||
create the tag
|
||||
- Release title: the tag (e.g. `v1.2.3`)
|
||||
- Description:
|
||||
|
|
|
@ -18,8 +18,8 @@ src/diffuse/vcs/git.py
|
|||
src/diffuse/vcs/hg.py
|
||||
src/diffuse/vcs/mtn.py
|
||||
src/diffuse/vcs/rcs.py
|
||||
src/diffuse/vcs/svk.py
|
||||
src/diffuse/vcs/svn.py
|
||||
src/diffuse/vcs/vcs_interface.py
|
||||
src/diffuse/vcs/vcs_registry.py
|
||||
src/diffuse/widgets.py
|
||||
src/diffuse/window.py
|
||||
|
|
1253
po/diffuse.pot
1253
po/diffuse.pot
File diff suppressed because it is too large
Load Diff
1466
po/pt_BR.po
1466
po/pt_BR.po
File diff suppressed because it is too large
Load Diff
1439
po/zh_CN.po
1439
po/zh_CN.po
File diff suppressed because it is too large
Load Diff
1442
po/zh_TW.po
1442
po/zh_TW.po
File diff suppressed because it is too large
Load Diff
|
@ -47,11 +47,6 @@ class Preferences:
|
|||
# find available encodings
|
||||
self.encodings: List[Optional[str]] = sorted(set(encodings.aliases.aliases.values()))
|
||||
|
||||
if utils.isWindows():
|
||||
svk_bin = 'svk.bat'
|
||||
else:
|
||||
svk_bin = 'svk'
|
||||
|
||||
auto_detect_codecs = ['utf_8', 'utf_16', 'latin_1']
|
||||
e = utils.norm_encoding(sys.getfilesystemencoding())
|
||||
if e is not None and e not in auto_detect_codecs:
|
||||
|
@ -154,14 +149,13 @@ class Preferences:
|
|||
('hg', 'Mercurial', 'hg'),
|
||||
('mtn', 'Monotone', 'mtn'),
|
||||
('rcs', 'RCS', None),
|
||||
('svn', 'Subversion', 'svn'),
|
||||
('svk', 'SVK', svk_bin)]
|
||||
('svn', 'Subversion', 'svn')]
|
||||
|
||||
vcs_template = [
|
||||
'List', [
|
||||
'String',
|
||||
'vcs_search_order',
|
||||
'bzr cvs darcs git hg mtn rcs svn svk',
|
||||
'bzr cvs darcs git hg mtn rcs svn',
|
||||
_('Version control system search order')
|
||||
]
|
||||
]
|
||||
|
|
|
@ -1,64 +0,0 @@
|
|||
# Diffuse: a graphical tool for merging and comparing text files.
|
||||
#
|
||||
# Copyright (C) 2019 Derrick Moser <derrick_moser@yahoo.com>
|
||||
# Copyright (C) 2021 Romain Failliot <romain.failliot@foolstep.com>
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License along
|
||||
# with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
import os
|
||||
|
||||
from typing import Optional, Tuple
|
||||
|
||||
from diffuse import utils
|
||||
from diffuse.preferences import Preferences
|
||||
from diffuse.vcs.svn import Svn
|
||||
|
||||
|
||||
class Svk(Svn):
|
||||
@staticmethod
|
||||
def _getVcs() -> str:
|
||||
return 'svk'
|
||||
|
||||
@staticmethod
|
||||
def _getURLPrefix() -> str:
|
||||
return 'Depot Path: '
|
||||
|
||||
@staticmethod
|
||||
def _parseStatusLine(s: str) -> Tuple[str, str]:
|
||||
if len(s) < 4 or s[0] not in 'ACDMR':
|
||||
return '', ''
|
||||
return s[0], s[4:]
|
||||
|
||||
@staticmethod
|
||||
def _getPreviousRevision(rev: Optional[str]) -> str:
|
||||
if rev is None:
|
||||
return 'HEAD'
|
||||
if rev.endswith('@'):
|
||||
return str(int(rev[:-1]) - 1) + '@'
|
||||
return str(int(rev) - 1)
|
||||
|
||||
def getRevision(self, prefs: Preferences, name: str, rev: str) -> bytes:
|
||||
relpath = utils.relpath(self.root, os.path.abspath(name)).replace(os.sep, '/')
|
||||
return utils.popenRead(
|
||||
self.root,
|
||||
[
|
||||
prefs.getString('svk_bin'),
|
||||
'cat',
|
||||
'-r',
|
||||
rev,
|
||||
f'{self._getURL(prefs)}/{relpath}'
|
||||
],
|
||||
prefs,
|
||||
'svk_bash')
|
|
@ -30,7 +30,6 @@ from diffuse.vcs.vcs_interface import VcsInterface
|
|||
|
||||
|
||||
# Subversion support
|
||||
# SVK support subclasses from this
|
||||
class Svn(VcsInterface):
|
||||
def __init__(self, root: str):
|
||||
super().__init__(root)
|
||||
|
|
|
@ -19,12 +19,10 @@
|
|||
|
||||
import os
|
||||
|
||||
from gettext import gettext as _
|
||||
from typing import List, Optional
|
||||
|
||||
from diffuse import utils
|
||||
from diffuse.preferences import Preferences
|
||||
from diffuse.vcs.folder_set import FolderSet
|
||||
from diffuse.vcs.vcs_interface import VcsInterface
|
||||
from diffuse.vcs.bzr import Bzr
|
||||
from diffuse.vcs.cvs import Cvs
|
||||
|
@ -33,7 +31,6 @@ from diffuse.vcs.git import Git
|
|||
from diffuse.vcs.hg import Hg
|
||||
from diffuse.vcs.mtn import Mtn
|
||||
from diffuse.vcs.rcs import Rcs
|
||||
from diffuse.vcs.svk import Svk
|
||||
from diffuse.vcs.svn import Svn
|
||||
|
||||
|
||||
|
@ -48,7 +45,6 @@ class VcsRegistry:
|
|||
'hg': _get_hg_repo,
|
||||
'mtn': _get_mtn_repo,
|
||||
'rcs': _get_rcs_repo,
|
||||
'svk': _get_svk_repo,
|
||||
'svn': _get_svn_repo
|
||||
}
|
||||
|
||||
|
@ -169,71 +165,3 @@ def _get_rcs_repo(path: str, prefs: Preferences) -> Optional[VcsInterface]:
|
|||
def _get_svn_repo(path: str, prefs: Preferences) -> Optional[VcsInterface]:
|
||||
p = _find_parent_dir_with(path, '.svn')
|
||||
return Svn(p) if p else None
|
||||
|
||||
|
||||
def _get_svk_repo(path: str, prefs: Preferences) -> Optional[VcsInterface]:
|
||||
name = path
|
||||
# parse the ~/.svk/config file to discover which directories are part of
|
||||
# SVK repositories
|
||||
if utils.isWindows():
|
||||
name = name.upper()
|
||||
svkroot = os.environ.get('SVKROOT', None)
|
||||
if svkroot is None:
|
||||
svkroot = os.path.expanduser('~/.svk')
|
||||
svkconfig = os.path.join(svkroot, 'config')
|
||||
if os.path.isfile(svkconfig):
|
||||
try:
|
||||
# find working copies by parsing the config file
|
||||
with open(svkconfig, 'r', encoding='utf-8') as f:
|
||||
ss: List[str] = utils.readlines(f)
|
||||
projs: List[str] = []
|
||||
sep = os.sep
|
||||
# find the separator character
|
||||
for s in ss:
|
||||
if s.startswith(' sep: ') and len(s) > 7:
|
||||
sep = s[7]
|
||||
# find the project directories
|
||||
i = 0
|
||||
while i < len(ss):
|
||||
s = ss[i]
|
||||
i += 1
|
||||
if s.startswith(' hash: '):
|
||||
while i < len(ss) and ss[i].startswith(' '):
|
||||
s = ss[i]
|
||||
i += 1
|
||||
if (
|
||||
s.endswith(': ') and
|
||||
i < len(ss) and
|
||||
ss[i].startswith(' depotpath: ')
|
||||
):
|
||||
key = s[4:-2].replace(sep, os.sep)
|
||||
# parse directory path
|
||||
j, n, tt = 0, len(key), []
|
||||
while j < n:
|
||||
if key[j] == '"':
|
||||
# quoted string
|
||||
j += 1
|
||||
while j < n:
|
||||
if key[j] == '"':
|
||||
j += 1
|
||||
break
|
||||
if key[j] == '\\':
|
||||
# escaped character
|
||||
j += 1
|
||||
if j < n:
|
||||
tt.append(key[j])
|
||||
j += 1
|
||||
else:
|
||||
tt.append(key[j])
|
||||
j += 1
|
||||
key = ''.join(tt).replace(sep, os.sep)
|
||||
if utils.isWindows():
|
||||
key = key.upper()
|
||||
projs.append(key)
|
||||
break
|
||||
# check if the file belongs to one of the project directories
|
||||
if FolderSet(projs).contains(name):
|
||||
return Svk(path)
|
||||
except IOError:
|
||||
utils.logError(_('Error parsing %s.') % (svkconfig, ))
|
||||
return None
|
||||
|
|
Loading…
Reference in New Issue