Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
mercurial
mercurial_keyring
Commits
0a10514f956c
Commit
4fd15b9d
authored
Oct 18, 2015
by
Marcin Kasperski
Browse files
Refactoring, monkeypatch_method moved to mercurial_extension_utils,
which is now required Some PEP
parent
b9b8b457bae2
Changes
2
Hide whitespace changes
Inline
Side-by-side
mercurial_keyring.py
View file @
0a10514f
...
...
@@ -46,6 +46,7 @@ except:
from
mercurial
import
mail
from
mercurial.mail
import
SMTPS
,
STARTTLS
from
mercurial
import
encoding
from
urlparse
import
urlparse
import
urllib2
import
smtplib
...
...
@@ -53,6 +54,7 @@ import socket
import
os
import
sys
from
mercurial_extension_utils
import
monkeypatch_method
def
import_keyring
():
"""
...
...
@@ -122,18 +124,6 @@ KEYRING_SERVICE = "Mercurial"
############################################################
def
monkeypatch_method
(
cls
,
fname
=
None
):
def
decorator
(
func
):
local_fname
=
fname
if
local_fname
is
None
:
local_fname
=
func
.
__name__
setattr
(
func
,
"orig"
,
getattr
(
cls
,
local_fname
,
None
))
setattr
(
cls
,
local_fname
,
func
)
return
func
return
decorator
############################################################
class
PasswordStore
(
object
):
"""
Helper object handling keyring usage (password save&restore,
...
...
setup.py
View file @
0a10514f
version
=
'0.7.1'
VERSION
=
'0.7.1'
# pylint: disable=unused-import
try
:
from
setuptools
import
setup
,
find_packages
...
...
@@ -8,20 +10,20 @@ except ImportError:
use_setuptools
()
from
setuptools
import
setup
,
find_packages
long_description
=
open
(
"README.txt"
).
read
()
LONG_DESCRIPTION
=
open
(
"README.txt"
).
read
()
setup
(
name
=
"mercurial_keyring"
,
version
=
version
,
author
=
'Marcin Kasperski'
,
author_email
=
'Marcin.Kasperski@mekk.waw.pl'
,
url
=
'http://bitbucket.org/Mekk/mercurial_keyring'
,
description
=
'Mercurial Keyring Extension'
,
long_description
=
long_description
,
license
=
'BSD'
,
py_modules
=
[
'mercurial_keyring'
],
keywords
=
"mercurial hg keyring password"
,
classifiers
=
[
name
=
"mercurial_keyring"
,
version
=
VERSION
,
author
=
'Marcin Kasperski'
,
author_email
=
'Marcin.Kasperski@mekk.waw.pl'
,
url
=
'http://bitbucket.org/Mekk/mercurial_keyring'
,
description
=
'Mercurial Keyring Extension'
,
long_description
=
LONG_DESCRIPTION
,
license
=
'BSD'
,
py_modules
=
[
'mercurial_keyring'
],
keywords
=
"mercurial hg keyring password"
,
classifiers
=
[
'Development Status :: 4 - Beta'
,
'Environment :: Console'
,
'Intended Audience :: Developers'
,
...
...
@@ -32,6 +34,9 @@ setup(
'Topic :: Software Development :: Libraries :: Python Modules'
,
'Topic :: Software Development :: Version Control'
],
install_requires
=
[
'keyring>=0.3'
],
zip_safe
=
True
,
install_requires
=
[
'keyring>=0.3'
,
'mercurial_extension_utils>=0.9.0'
,
],
zip_safe
=
True
,
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment