git-well 0.2.1__tar.gz → 0.2.3__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. {git_well-0.2.1 → git_well-0.2.3}/PKG-INFO +1 -1
  2. {git_well-0.2.1 → git_well-0.2.3}/git_well/__init__.py +1 -1
  3. {git_well-0.2.1 → git_well-0.2.3}/git_well/git_autoconf_gpgsign.py +22 -12
  4. {git_well-0.2.1 → git_well-0.2.3}/git_well/git_remote_protocol.py +1 -1
  5. {git_well-0.2.1 → git_well-0.2.3}/git_well.egg-info/PKG-INFO +1 -1
  6. {git_well-0.2.1 → git_well-0.2.3}/README.rst +0 -0
  7. {git_well-0.2.1 → git_well-0.2.3}/git_well/__main__.py +0 -0
  8. {git_well-0.2.1 → git_well-0.2.3}/git_well/__main__.pyi +0 -0
  9. {git_well-0.2.1 → git_well-0.2.3}/git_well/_utils.py +0 -0
  10. {git_well-0.2.1 → git_well-0.2.3}/git_well/_utils.pyi +0 -0
  11. {git_well-0.2.1 → git_well-0.2.3}/git_well/demo/__init__.py +0 -0
  12. {git_well-0.2.1 → git_well-0.2.3}/git_well/git_autoconf_gpgsign.pyi +0 -0
  13. {git_well-0.2.1 → git_well-0.2.3}/git_well/git_branch_cleanup.py +0 -0
  14. {git_well-0.2.1 → git_well-0.2.3}/git_well/git_branch_cleanup.pyi +0 -0
  15. {git_well-0.2.1 → git_well-0.2.3}/git_well/git_branch_upgrade.py +0 -0
  16. {git_well-0.2.1 → git_well-0.2.3}/git_well/git_branch_upgrade.pyi +0 -0
  17. {git_well-0.2.1 → git_well-0.2.3}/git_well/git_discover_remote.py +0 -0
  18. {git_well-0.2.1 → git_well-0.2.3}/git_well/git_discover_remote.pyi +0 -0
  19. {git_well-0.2.1 → git_well-0.2.3}/git_well/git_rebase_add_continue.py +0 -0
  20. {git_well-0.2.1 → git_well-0.2.3}/git_well/git_rebase_add_continue.pyi +0 -0
  21. {git_well-0.2.1 → git_well-0.2.3}/git_well/git_remote_protocol.pyi +0 -0
  22. {git_well-0.2.1 → git_well-0.2.3}/git_well/git_squash_streaks.py +0 -0
  23. {git_well-0.2.1 → git_well-0.2.3}/git_well/git_squash_streaks.pyi +0 -0
  24. {git_well-0.2.1 → git_well-0.2.3}/git_well/git_stats.py +0 -0
  25. {git_well-0.2.1 → git_well-0.2.3}/git_well/git_stats.pyi +0 -0
  26. {git_well-0.2.1 → git_well-0.2.3}/git_well/git_sync.py +0 -0
  27. {git_well-0.2.1 → git_well-0.2.3}/git_well/git_sync.pyi +0 -0
  28. {git_well-0.2.1 → git_well-0.2.3}/git_well/git_track_upstream.py +0 -0
  29. {git_well-0.2.1 → git_well-0.2.3}/git_well/git_track_upstream.pyi +0 -0
  30. {git_well-0.2.1 → git_well-0.2.3}/git_well/main.py +0 -0
  31. {git_well-0.2.1 → git_well-0.2.3}/git_well/main.pyi +0 -0
  32. {git_well-0.2.1 → git_well-0.2.3}/git_well/py.typed +0 -0
  33. {git_well-0.2.1 → git_well-0.2.3}/git_well/repo.py +0 -0
  34. {git_well-0.2.1 → git_well-0.2.3}/git_well/repo.pyi +0 -0
  35. {git_well-0.2.1 → git_well-0.2.3}/git_well.egg-info/SOURCES.txt +0 -0
  36. {git_well-0.2.1 → git_well-0.2.3}/git_well.egg-info/dependency_links.txt +0 -0
  37. {git_well-0.2.1 → git_well-0.2.3}/git_well.egg-info/entry_points.txt +0 -0
  38. {git_well-0.2.1 → git_well-0.2.3}/git_well.egg-info/requires.txt +0 -0
  39. {git_well-0.2.1 → git_well-0.2.3}/git_well.egg-info/top_level.txt +0 -0
  40. {git_well-0.2.1 → git_well-0.2.3}/pyproject.toml +0 -0
  41. {git_well-0.2.1 → git_well-0.2.3}/setup.cfg +0 -0
  42. {git_well-0.2.1 → git_well-0.2.3}/setup.py +0 -0
  43. {git_well-0.2.1 → git_well-0.2.3}/tests/test_cli.py +0 -0
  44. {git_well-0.2.1 → git_well-0.2.3}/tests/test_import.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: git_well
3
- Version: 0.2.1
3
+ Version: 0.2.3
4
4
  Summary: The git_well module
5
5
  Home-page: https://github.com/Erotemic/git_well
6
6
  Author: Jon Crall
@@ -1,7 +1,7 @@
1
1
  """
2
2
  Basic
3
3
  """
4
- __version__ = '0.2.1'
4
+ __version__ = '0.2.3'
5
5
  __author__ = 'Jon Crall'
6
6
  __author_email__ = 'erotemic@gmail.com'
7
7
  __url__ = 'https://github.com/Erotemic/git_well/'
@@ -9,6 +9,7 @@ class GitAutoconfGpgsignCLI(scfg.DataConfig):
9
9
 
10
10
  remote = scfg.Value(None, help='param1')
11
11
  repo_dpath = scfg.Value('.', help='repo to set gpg for')
12
+ email = scfg.Value(None, help='The email the the signing GPG key is associated with. If unspecified attempt to infer via ssh credentials')
12
13
 
13
14
  @classmethod
14
15
  def main(cls, cmdline=1, **kwargs):
@@ -54,12 +55,15 @@ class GitAutoconfGpgsignCLI(scfg.DataConfig):
54
55
  if cand.exists():
55
56
  identify_file_cands.add(cand)
56
57
 
57
- email_candidates = ub.oset()
58
- for id_fpath in identify_file_cands:
59
- pub_key_fpath = id_fpath.augment(tail='.pub')
60
- if pub_key_fpath.exists():
61
- pub_email = pub_key_fpath.read_text().strip().split(' ')[-1]
62
- email_candidates.add(pub_email)
58
+ if config.email is None:
59
+ email_candidates = ub.oset()
60
+ for id_fpath in identify_file_cands:
61
+ pub_key_fpath = id_fpath.augment(tail='.pub')
62
+ if pub_key_fpath.exists():
63
+ pub_email = pub_key_fpath.read_text().strip().split(' ')[-1]
64
+ email_candidates.add(pub_email)
65
+ else:
66
+ email_candidates = [config.email]
63
67
 
64
68
  gpg_candidates = []
65
69
  for email in email_candidates:
@@ -73,7 +77,10 @@ class GitAutoconfGpgsignCLI(scfg.DataConfig):
73
77
 
74
78
  unique_fprs = {cand['fpr'] for cand in gpg_candidates}
75
79
 
76
- if len(unique_fprs) != 1:
80
+ if len(unique_fprs) == 0:
81
+ raise Exception('Unable to find any gpg candidates. '
82
+ 'Is the repo not using git/ssh credentials?')
83
+ elif len(unique_fprs) != 1:
77
84
  print(f'unique_fprs = {ub.urepr(unique_fprs, nl=1)}')
78
85
  print('gpg_candidates = {}'.format(ub.urepr(gpg_candidates, nl=1)))
79
86
  raise AssertionError('need to choose 1')
@@ -99,11 +106,14 @@ def lookup_gpg_keyinfos(identifier, verbose=0, capabilities=None,
99
106
  allow_subkey=True, allow_mainkey=True, full=True,
100
107
  filter_expired=True, mintrust=None):
101
108
  """
102
- python ~/local/scripts/xgpg.py lookup_keyid "Emmy"
103
- python ~/local/scripts/xgpg.py lookup_keyid "Crall" --allow_mainkey=False --capabilities=sign
104
- python ~/local/scripts/xgpg.py lookup_keyid "Crall" --allow_mainkey=False --capabilities=encrypt
105
- python ~/local/scripts/xgpg.py lookup_keyid "Crall" --allow_mainkey=False --capabilities=auth
106
- python ~/local/scripts/xgpg.py lookup_keyid "Jonathan Crall"
109
+ Creates a table of information about GPG key candidates that match a query.
110
+
111
+ Ignore:
112
+ python ~/local/scripts/xgpg.py lookup_keyid "Emmy"
113
+ python ~/local/scripts/xgpg.py lookup_keyid "Crall" --allow_mainkey=False --capabilities=sign
114
+ python ~/local/scripts/xgpg.py lookup_keyid "Crall" --allow_mainkey=False --capabilities=encrypt
115
+ python ~/local/scripts/xgpg.py lookup_keyid "Crall" --allow_mainkey=False --capabilities=auth
116
+ python ~/local/scripts/xgpg.py lookup_keyid "Jonathan Crall"
107
117
  """
108
118
  if capabilities is None:
109
119
  capabilities = {'certify'}
@@ -26,7 +26,7 @@ class GitRemoteProtocol(scfg.DataConfig):
26
26
  should be. (i.e. if there is only one, use that, otherwise ask).
27
27
  '''))
28
28
 
29
- protocol = scfg.Value('ssh', position=2, choices=VALID_PROTOCOLS, help=ub.paragraph(
29
+ protocol = scfg.Value('git', position=2, choices=VALID_PROTOCOLS, help=ub.paragraph(
30
30
  '''
31
31
  The protocol to change to.
32
32
  '''))
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: git_well
3
- Version: 0.2.1
3
+ Version: 0.2.3
4
4
  Summary: The git_well module
5
5
  Home-page: https://github.com/Erotemic/git_well
6
6
  Author: Jon Crall
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes