Commit Graph

20 Commits

Author SHA1 Message Date
Durham Goode
769d2595c4 convert: move svn config initializer out of the module level
The svn_config_get_config config call was being called at the module level, but
had the potential to throw permission denied errors if ~/.subversion/servers was
not readable. This could happen in certain test environments where the user
permissions were very particular.

This prevented the remotenames extension from loading, since it imports
convert's hg module, which imports convert's subversion module, which calls
this. The config is only ever used from this one constructor, so let's just move
it in to there.
2016-08-01 17:38:01 -07:00
FUJIWARA Katsunori
08147e9705 convert: fix "stdlib import follows local import" problem in transport
Before this patch, import-checker reports error below for importing
subversion python binding libraries.

    stdlib import "svn.*" follows local import: mercurial
2016-03-11 21:55:44 +09:00
timeless
2ac9193926 convert: transport use absolute_import 2016-03-02 16:37:50 +00:00
Gregory Szorc
5380dea2a7 global: mass rewrite to use modern exception syntax
Python 2.6 introduced the "except type as instance" syntax, replacing
the "except type, instance" syntax that came before. Python 3 dropped
support for the latter syntax. Since we no longer support Python 2.4 or
2.5, we have no need to continue supporting the "except type, instance".

This patch mass rewrites the exception syntax to be Python 2.6+ and
Python 3 compatible.

This patch was produced by running `2to3 -f except -w -n .`.
2015-06-23 22:20:08 -07:00
timeless@mozdev.org
0dc2f07fe8 spelling: dependent 2012-08-17 13:58:18 -07:00
Martin Geisler
d8334151e6 Remove FSF mailing address from GPL headers
The GPLv3 FAQ suggests to upgrade by

  [...] replace all your existing v2 license notices (usually at the
  top of each file) with the new recommended text available on the GNU
  licenses howto. It's more future-proof because it no longer includes
  the FSF's postal mailing address.

This removes the postal address, but leaves the version number at 2+.
2012-01-06 16:27:13 +01:00
Patrick Mezard
1d6a6d6bd8 convert/svn: fix URL quoting issue with svn 1.7
As of svn 1.7, many svn calls expect "canonical" paths. In theory, we should
call svn.core.*canonicalize() on all paths before passing them to the API.
Instead, we assume the base url is canonical and copy the behaviour of svn URL
encoding function so we can extend it safely with new components.
2011-12-01 20:42:24 +01:00
Thomas Arendsen Hein
846f225a93 convert: add missing import of util, needed for svn < 1.6 2011-10-22 23:42:48 +02:00
Augie Fackler
3fddb45056 hgext: replace uses of hasattr with util.safehasattr 2011-07-25 20:37:12 -05:00
Renato Cunha
5766b997d7 convert: tuple parameter unpacking is deprecated in py3k 2010-07-01 19:27:02 -03:00
Matt Mackall
8d99be19f0 many, many trivial check-code fixups 2010-01-25 00:05:27 -06:00
Benoit Boissinot
125a85ec87 use new style classes 2009-06-10 15:10:21 +02:00
Patrick Mezard
e893f02e4f convert/svn: support more OS specific auth providers via svn 1.6 API 2009-04-22 23:13:39 +02:00
Joel Rosdahl
bd755ed723 convert: Remove unused clone method 2008-03-06 22:23:41 +01:00
Joel Rosdahl
4f8012378a Remove unused imports 2008-03-06 22:23:41 +01:00
Thomas Arendsen Hein
25277ca50a Replace _ with inst for catching exceptions to not shadow gettext.
And removed one _(...) because mercurial.i18n is not yet imported
in convert/subversion.py.
2007-08-07 09:56:21 +02:00
Patrick Mezard
17bfcef457 convert: support windows SVN simple auth provider 2007-08-02 23:38:32 +02:00
Thomas Arendsen Hein
d9d3256252 removed trailing whitespace 2007-07-21 10:30:51 +02:00
Bryan O'Sullivan
b5c4639e41 convert/subversion: get converter working against plain HTTP. 2007-07-18 17:44:52 -07:00
Daniel Holth
202219ddab convert extension: stripped-down svn transport module 2007-07-01 17:15:54 +02:00