New upstream version 3.1.11
TANIGUCHI Takaki
3 years ago
0 | 0 | Metadata-Version: 1.2 |
1 | 1 | Name: GitPython |
2 | Version: 3.1.9 | |
2 | Version: 3.1.11 | |
3 | 3 | Summary: Python Git Library |
4 | 4 | Home-page: https://github.com/gitpython-developers/GitPython |
5 | 5 | Author: Sebastian Thiel, Michael Trier |
0 | 0 | Metadata-Version: 1.2 |
1 | 1 | Name: GitPython |
2 | Version: 3.1.9 | |
2 | Version: 3.1.11 | |
3 | 3 | Summary: Python Git Library |
4 | 4 | Home-page: https://github.com/gitpython-developers/GitPython |
5 | 5 | Author: Sebastian Thiel, Michael Trier |
0 | 0 | ========= |
1 | 1 | Changelog |
2 | 2 | ========= |
3 | ||
4 | 3.1.11 | |
5 | ====== | |
6 | ||
7 | Fixes regression of 3.1.10. | |
8 | ||
9 | See the following for details: | |
10 | https://github.com/gitpython-developers/gitpython/milestone/43?closed=1* | |
11 | ||
12 | 3.1.10 | |
13 | ====== | |
14 | ||
15 | See the following for details: | |
16 | https://github.com/gitpython-developers/gitpython/milestone/42?closed=1* | |
17 | ||
3 | 18 | |
4 | 19 | 3.1.9 |
5 | 20 | ===== |
11 | 11 | import os.path as osp |
12 | 12 | |
13 | 13 | |
14 | __version__ = '3.1.9' | |
14 | __version__ = '3.1.11' | |
15 | 15 | |
16 | 16 | |
17 | 17 | #{ Initialization |
18 | 18 | def _init_externals(): |
19 | 19 | """Initialize external projects by putting them into the path""" |
20 | if __version__ == '3.1.9' and 'PYOXIDIZER' not in os.environ: | |
21 | sys.path.insert(0, osp.join(osp.dirname(__file__), 'ext', 'gitdb')) | |
20 | if __version__ == '3.1.11' and 'PYOXIDIZER' not in os.environ: | |
21 | sys.path.insert(1, osp.join(osp.dirname(__file__), 'ext', 'gitdb')) | |
22 | 22 | |
23 | 23 | try: |
24 | 24 | import gitdb |
581 | 581 | @classmethod |
582 | 582 | def _main_actor(cls, env_name, env_email, config_reader=None): |
583 | 583 | actor = Actor('', '') |
584 | default_email = get_user_id() | |
585 | default_name = default_email.split('@')[0] | |
584 | user_id = None # We use this to avoid multiple calls to getpass.getuser() | |
585 | ||
586 | def default_email(): | |
587 | nonlocal user_id | |
588 | if not user_id: | |
589 | user_id = get_user_id() | |
590 | return user_id | |
591 | ||
592 | def default_name(): | |
593 | return default_email().split('@')[0] | |
586 | 594 | |
587 | 595 | for attr, evar, cvar, default in (('name', env_name, cls.conf_name, default_name), |
588 | 596 | ('email', env_email, cls.conf_email, default_email)): |
591 | 599 | setattr(actor, attr, val) |
592 | 600 | except KeyError: |
593 | 601 | if config_reader is not None: |
594 | setattr(actor, attr, config_reader.get_value('user', cvar, default)) | |
602 | setattr(actor, attr, config_reader.get_value('user', cvar, default())) | |
595 | 603 | # END config-reader handling |
596 | 604 | if not getattr(actor, attr): |
597 | setattr(actor, attr, default) | |
605 | setattr(actor, attr, default()) | |
598 | 606 | # END handle name |
599 | 607 | # END for each item to retrieve |
600 | 608 | return actor |