git-well 0.2.0__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 (53) hide show
  1. git_well-0.2.3/PKG-INFO +338 -0
  2. git_well-0.2.3/README.rst +148 -0
  3. {git_well-0.2.0 → git_well-0.2.3}/git_well/__init__.py +1 -1
  4. git_well-0.2.3/git_well/__main__.pyi +1 -0
  5. git_well-0.2.3/git_well/_utils.py +115 -0
  6. git_well-0.2.3/git_well/_utils.pyi +18 -0
  7. git_well-0.2.0/git_well/demo.py → git_well-0.2.3/git_well/demo/__init__.py +42 -0
  8. git_well-0.2.3/git_well/git_autoconf_gpgsign.py +284 -0
  9. git_well-0.2.3/git_well/git_autoconf_gpgsign.pyi +33 -0
  10. {git_well-0.2.0 → git_well-0.2.3}/git_well/git_branch_cleanup.py +23 -14
  11. git_well-0.2.3/git_well/git_branch_cleanup.pyi +18 -0
  12. {git_well-0.2.0 → git_well-0.2.3}/git_well/git_branch_upgrade.py +78 -6
  13. git_well-0.2.3/git_well/git_branch_upgrade.pyi +19 -0
  14. {git_well-0.2.0 → git_well-0.2.3}/git_well/git_discover_remote.py +35 -11
  15. git_well-0.2.3/git_well/git_discover_remote.pyi +25 -0
  16. git_well-0.2.3/git_well/git_rebase_add_continue.py +208 -0
  17. git_well-0.2.3/git_well/git_rebase_add_continue.pyi +20 -0
  18. git_well-0.2.3/git_well/git_remote_protocol.py +245 -0
  19. git_well-0.2.3/git_well/git_remote_protocol.pyi +38 -0
  20. {git_well-0.2.0 → git_well-0.2.3}/git_well/git_squash_streaks.py +17 -14
  21. git_well-0.2.3/git_well/git_squash_streaks.pyi +134 -0
  22. git_well-0.2.3/git_well/git_stats.py +78 -0
  23. git_well-0.2.3/git_well/git_stats.pyi +22 -0
  24. git_well-0.2.3/git_well/git_sync.pyi +38 -0
  25. git_well-0.2.3/git_well/git_track_upstream.py +115 -0
  26. git_well-0.2.3/git_well/git_track_upstream.pyi +20 -0
  27. {git_well-0.2.0 → git_well-0.2.3}/git_well/main.py +3 -1
  28. git_well-0.2.3/git_well/main.pyi +9 -0
  29. git_well-0.2.3/git_well/py.typed +0 -0
  30. git_well-0.2.3/git_well/repo.py +95 -0
  31. git_well-0.2.3/git_well/repo.pyi +31 -0
  32. git_well-0.2.3/git_well.egg-info/PKG-INFO +338 -0
  33. git_well-0.2.3/git_well.egg-info/SOURCES.txt +42 -0
  34. {git_well-0.2.0 → git_well-0.2.3}/git_well.egg-info/entry_points.txt +0 -1
  35. {git_well-0.2.0 → git_well-0.2.3}/git_well.egg-info/requires.txt +76 -28
  36. {git_well-0.2.0 → git_well-0.2.3}/setup.py +5 -2
  37. git_well-0.2.3/tests/test_cli.py +19 -0
  38. git_well-0.2.3/tests/test_import.py +2 -0
  39. git_well-0.2.0/PKG-INFO +0 -102
  40. git_well-0.2.0/README.rst +0 -71
  41. git_well-0.2.0/git_well/_repo_ext.py +0 -18
  42. git_well-0.2.0/git_well/_utils.py +0 -85
  43. git_well-0.2.0/git_well/git_rebase_add_continue.py +0 -157
  44. git_well-0.2.0/git_well/git_remote_protocol.py +0 -115
  45. git_well-0.2.0/git_well/git_track_upstream.py +0 -92
  46. git_well-0.2.0/git_well.egg-info/PKG-INFO +0 -102
  47. git_well-0.2.0/git_well.egg-info/SOURCES.txt +0 -23
  48. {git_well-0.2.0 → git_well-0.2.3}/git_well/__main__.py +0 -0
  49. {git_well-0.2.0 → git_well-0.2.3}/git_well/git_sync.py +0 -0
  50. {git_well-0.2.0 → git_well-0.2.3}/git_well.egg-info/dependency_links.txt +0 -0
  51. {git_well-0.2.0 → git_well-0.2.3}/git_well.egg-info/top_level.txt +0 -0
  52. {git_well-0.2.0 → git_well-0.2.3}/pyproject.toml +0 -0
  53. {git_well-0.2.0 → git_well-0.2.3}/setup.cfg +0 -0
@@ -0,0 +1,338 @@
1
+ Metadata-Version: 2.1
2
+ Name: git_well
3
+ Version: 0.2.3
4
+ Summary: The git_well module
5
+ Home-page: https://github.com/Erotemic/git_well
6
+ Author: Jon Crall
7
+ Author-email: erotemic@gmail.com
8
+ License: Apache 2
9
+ Classifier: Development Status :: 1 - Planning
10
+ Classifier: Intended Audience :: Developers
11
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
12
+ Classifier: Topic :: Utilities
13
+ Classifier: License :: OSI Approved :: Apache Software License
14
+ Classifier: Programming Language :: Python :: 3.7
15
+ Classifier: Programming Language :: Python :: 3.8
16
+ Classifier: Programming Language :: Python :: 3.9
17
+ Classifier: Programming Language :: Python :: 3.10
18
+ Classifier: Programming Language :: Python :: 3.11
19
+ Classifier: Programming Language :: Python :: 3.12
20
+ Requires-Python: >=3.7
21
+ Description-Content-Type: text/x-rst
22
+ Requires-Dist: ubelt>=1.3.3
23
+ Requires-Dist: scriptconfig>=0.7.10; python_version >= "3.6"
24
+ Requires-Dist: rich>=12.4.4; python_version >= "3.8"
25
+ Requires-Dist: rich>=11.2.0; python_version < "3.8" and python_version >= "3.6"
26
+ Requires-Dist: git-python>=1.0.0; python_version >= "2.7"
27
+ Requires-Dist: packaging>=21.3
28
+ Requires-Dist: networkx>=2.8; python_version < "4.0" and python_version >= "3.11"
29
+ Requires-Dist: networkx>=2.7; python_version < "3.11" and python_version >= "3.8"
30
+ Requires-Dist: networkx>=2.6.2; python_version < "3.8" and python_version >= "3.7"
31
+ Requires-Dist: networkx<=2.5.1,>=2.2.0; python_version < "3.7.0" and python_version >= "3.6.0"
32
+ Provides-Extra: all
33
+ Requires-Dist: ubelt>=1.3.3; extra == "all"
34
+ Requires-Dist: scriptconfig>=0.7.10; python_version >= "3.6" and extra == "all"
35
+ Requires-Dist: rich>=12.4.4; python_version >= "3.8" and extra == "all"
36
+ Requires-Dist: rich>=11.2.0; (python_version < "3.8" and python_version >= "3.6") and extra == "all"
37
+ Requires-Dist: git-python>=1.0.0; python_version >= "2.7" and extra == "all"
38
+ Requires-Dist: packaging>=21.3; extra == "all"
39
+ Requires-Dist: networkx>=2.8; (python_version < "4.0" and python_version >= "3.11") and extra == "all"
40
+ Requires-Dist: networkx>=2.7; (python_version < "3.11" and python_version >= "3.8") and extra == "all"
41
+ Requires-Dist: networkx>=2.6.2; (python_version < "3.8" and python_version >= "3.7") and extra == "all"
42
+ Requires-Dist: networkx<=2.5.1,>=2.2.0; (python_version < "3.7.0" and python_version >= "3.6.0") and extra == "all"
43
+ Requires-Dist: xdoctest>=1.1.3; extra == "all"
44
+ Requires-Dist: pytest>=6.2.5; python_version >= "3.10.0" and extra == "all"
45
+ Requires-Dist: pytest>=4.6.0; (python_version < "3.10.0" and python_version >= "3.7.0") and extra == "all"
46
+ Requires-Dist: pytest>=4.6.0; (python_version < "3.7.0" and python_version >= "3.6.0") and extra == "all"
47
+ Requires-Dist: pytest<=6.1.2,>=4.6.0; (python_version < "3.6.0" and python_version >= "3.5.0") and extra == "all"
48
+ Requires-Dist: pytest<=4.6.11,>=4.6.0; (python_version < "3.5.0" and python_version >= "3.4.0") and extra == "all"
49
+ Requires-Dist: pytest<=4.6.11,>=4.6.0; (python_version < "2.8.0" and python_version >= "2.7.0") and extra == "all"
50
+ Requires-Dist: pytest-cov>=3.0.0; python_version >= "3.6.0" and extra == "all"
51
+ Requires-Dist: pytest-cov>=2.9.0; (python_version < "3.6.0" and python_version >= "3.5.0") and extra == "all"
52
+ Requires-Dist: pytest-cov>=2.8.1; (python_version < "3.5.0" and python_version >= "3.4.0") and extra == "all"
53
+ Requires-Dist: pytest-cov>=2.8.1; (python_version < "2.8.0" and python_version >= "2.7.0") and extra == "all"
54
+ Requires-Dist: pytest-timeout>=1.4.2; extra == "all"
55
+ Requires-Dist: coverage>=6.1.1; python_version >= "3.10" and extra == "all"
56
+ Requires-Dist: coverage>=5.3.1; (python_version < "3.10" and python_version >= "3.9") and extra == "all"
57
+ Requires-Dist: coverage>=6.1.1; (python_version < "3.9" and python_version >= "3.8") and extra == "all"
58
+ Requires-Dist: coverage>=6.1.1; (python_version < "3.8" and python_version >= "3.7") and extra == "all"
59
+ Requires-Dist: coverage>=6.1.1; (python_version < "3.7" and python_version >= "3.6") and extra == "all"
60
+ Requires-Dist: coverage>=5.3.1; (python_version < "3.6" and python_version >= "3.5") and extra == "all"
61
+ Requires-Dist: coverage>=4.3.4; (python_version < "3.5" and python_version >= "3.4") and extra == "all"
62
+ Requires-Dist: coverage>=5.3.1; (python_version < "3.4" and python_version >= "2.7") and extra == "all"
63
+ Requires-Dist: coverage>=4.5; (python_version < "2.7" and python_version >= "2.6") and extra == "all"
64
+ Requires-Dist: argcomplete>=1.0; extra == "all"
65
+ Requires-Dist: rich_argparse>=1.1.0; python_version >= "3.7" and extra == "all"
66
+ Provides-Extra: runtime
67
+ Requires-Dist: ubelt>=1.3.3; extra == "runtime"
68
+ Requires-Dist: scriptconfig>=0.7.10; python_version >= "3.6" and extra == "runtime"
69
+ Requires-Dist: rich>=12.4.4; python_version >= "3.8" and extra == "runtime"
70
+ Requires-Dist: rich>=11.2.0; (python_version < "3.8" and python_version >= "3.6") and extra == "runtime"
71
+ Requires-Dist: git-python>=1.0.0; python_version >= "2.7" and extra == "runtime"
72
+ Requires-Dist: packaging>=21.3; extra == "runtime"
73
+ Requires-Dist: networkx>=2.8; (python_version < "4.0" and python_version >= "3.11") and extra == "runtime"
74
+ Requires-Dist: networkx>=2.7; (python_version < "3.11" and python_version >= "3.8") and extra == "runtime"
75
+ Requires-Dist: networkx>=2.6.2; (python_version < "3.8" and python_version >= "3.7") and extra == "runtime"
76
+ Requires-Dist: networkx<=2.5.1,>=2.2.0; (python_version < "3.7.0" and python_version >= "3.6.0") and extra == "runtime"
77
+ Provides-Extra: tests
78
+ Requires-Dist: xdoctest>=1.1.3; extra == "tests"
79
+ Requires-Dist: pytest>=6.2.5; python_version >= "3.10.0" and extra == "tests"
80
+ Requires-Dist: pytest>=4.6.0; (python_version < "3.10.0" and python_version >= "3.7.0") and extra == "tests"
81
+ Requires-Dist: pytest>=4.6.0; (python_version < "3.7.0" and python_version >= "3.6.0") and extra == "tests"
82
+ Requires-Dist: pytest<=6.1.2,>=4.6.0; (python_version < "3.6.0" and python_version >= "3.5.0") and extra == "tests"
83
+ Requires-Dist: pytest<=4.6.11,>=4.6.0; (python_version < "3.5.0" and python_version >= "3.4.0") and extra == "tests"
84
+ Requires-Dist: pytest<=4.6.11,>=4.6.0; (python_version < "2.8.0" and python_version >= "2.7.0") and extra == "tests"
85
+ Requires-Dist: pytest-cov>=3.0.0; python_version >= "3.6.0" and extra == "tests"
86
+ Requires-Dist: pytest-cov>=2.9.0; (python_version < "3.6.0" and python_version >= "3.5.0") and extra == "tests"
87
+ Requires-Dist: pytest-cov>=2.8.1; (python_version < "3.5.0" and python_version >= "3.4.0") and extra == "tests"
88
+ Requires-Dist: pytest-cov>=2.8.1; (python_version < "2.8.0" and python_version >= "2.7.0") and extra == "tests"
89
+ Requires-Dist: pytest-timeout>=1.4.2; extra == "tests"
90
+ Requires-Dist: coverage>=6.1.1; python_version >= "3.10" and extra == "tests"
91
+ Requires-Dist: coverage>=5.3.1; (python_version < "3.10" and python_version >= "3.9") and extra == "tests"
92
+ Requires-Dist: coverage>=6.1.1; (python_version < "3.9" and python_version >= "3.8") and extra == "tests"
93
+ Requires-Dist: coverage>=6.1.1; (python_version < "3.8" and python_version >= "3.7") and extra == "tests"
94
+ Requires-Dist: coverage>=6.1.1; (python_version < "3.7" and python_version >= "3.6") and extra == "tests"
95
+ Requires-Dist: coverage>=5.3.1; (python_version < "3.6" and python_version >= "3.5") and extra == "tests"
96
+ Requires-Dist: coverage>=4.3.4; (python_version < "3.5" and python_version >= "3.4") and extra == "tests"
97
+ Requires-Dist: coverage>=5.3.1; (python_version < "3.4" and python_version >= "2.7") and extra == "tests"
98
+ Requires-Dist: coverage>=4.5; (python_version < "2.7" and python_version >= "2.6") and extra == "tests"
99
+ Provides-Extra: optional
100
+ Requires-Dist: argcomplete>=1.0; extra == "optional"
101
+ Requires-Dist: rich_argparse>=1.1.0; python_version >= "3.7" and extra == "optional"
102
+ Provides-Extra: docs
103
+ Requires-Dist: sphinx>=5.0.1; extra == "docs"
104
+ Requires-Dist: sphinx-autobuild>=2021.3.14; extra == "docs"
105
+ Requires-Dist: sphinx_rtd_theme>=1.0.0; extra == "docs"
106
+ Requires-Dist: sphinxcontrib-napoleon>=0.7; extra == "docs"
107
+ Requires-Dist: sphinx-autoapi>=1.8.4; extra == "docs"
108
+ Requires-Dist: Pygments>=2.9.0; extra == "docs"
109
+ Requires-Dist: myst_parser>=0.18.0; extra == "docs"
110
+ Requires-Dist: sphinx-reredirects>=0.0.1; extra == "docs"
111
+ Provides-Extra: all-strict
112
+ Requires-Dist: ubelt==1.3.3; extra == "all-strict"
113
+ Requires-Dist: scriptconfig==0.7.10; python_version >= "3.6" and extra == "all-strict"
114
+ Requires-Dist: rich==12.4.4; python_version >= "3.8" and extra == "all-strict"
115
+ Requires-Dist: rich==11.2.0; (python_version < "3.8" and python_version >= "3.6") and extra == "all-strict"
116
+ Requires-Dist: git-python==1.0.0; python_version >= "2.7" and extra == "all-strict"
117
+ Requires-Dist: packaging==21.3; extra == "all-strict"
118
+ Requires-Dist: networkx==2.8; (python_version < "4.0" and python_version >= "3.11") and extra == "all-strict"
119
+ Requires-Dist: networkx==2.7; (python_version < "3.11" and python_version >= "3.8") and extra == "all-strict"
120
+ Requires-Dist: networkx==2.6.2; (python_version < "3.8" and python_version >= "3.7") and extra == "all-strict"
121
+ Requires-Dist: networkx<=2.5.1,==2.2.0; (python_version < "3.7.0" and python_version >= "3.6.0") and extra == "all-strict"
122
+ Requires-Dist: xdoctest==1.1.3; extra == "all-strict"
123
+ Requires-Dist: pytest==6.2.5; python_version >= "3.10.0" and extra == "all-strict"
124
+ Requires-Dist: pytest==4.6.0; (python_version < "3.10.0" and python_version >= "3.7.0") and extra == "all-strict"
125
+ Requires-Dist: pytest==4.6.0; (python_version < "3.7.0" and python_version >= "3.6.0") and extra == "all-strict"
126
+ Requires-Dist: pytest<=6.1.2,==4.6.0; (python_version < "3.6.0" and python_version >= "3.5.0") and extra == "all-strict"
127
+ Requires-Dist: pytest<=4.6.11,==4.6.0; (python_version < "3.5.0" and python_version >= "3.4.0") and extra == "all-strict"
128
+ Requires-Dist: pytest<=4.6.11,==4.6.0; (python_version < "2.8.0" and python_version >= "2.7.0") and extra == "all-strict"
129
+ Requires-Dist: pytest-cov==3.0.0; python_version >= "3.6.0" and extra == "all-strict"
130
+ Requires-Dist: pytest-cov==2.9.0; (python_version < "3.6.0" and python_version >= "3.5.0") and extra == "all-strict"
131
+ Requires-Dist: pytest-cov==2.8.1; (python_version < "3.5.0" and python_version >= "3.4.0") and extra == "all-strict"
132
+ Requires-Dist: pytest-cov==2.8.1; (python_version < "2.8.0" and python_version >= "2.7.0") and extra == "all-strict"
133
+ Requires-Dist: pytest-timeout==1.4.2; extra == "all-strict"
134
+ Requires-Dist: coverage==6.1.1; python_version >= "3.10" and extra == "all-strict"
135
+ Requires-Dist: coverage==5.3.1; (python_version < "3.10" and python_version >= "3.9") and extra == "all-strict"
136
+ Requires-Dist: coverage==6.1.1; (python_version < "3.9" and python_version >= "3.8") and extra == "all-strict"
137
+ Requires-Dist: coverage==6.1.1; (python_version < "3.8" and python_version >= "3.7") and extra == "all-strict"
138
+ Requires-Dist: coverage==6.1.1; (python_version < "3.7" and python_version >= "3.6") and extra == "all-strict"
139
+ Requires-Dist: coverage==5.3.1; (python_version < "3.6" and python_version >= "3.5") and extra == "all-strict"
140
+ Requires-Dist: coverage==4.3.4; (python_version < "3.5" and python_version >= "3.4") and extra == "all-strict"
141
+ Requires-Dist: coverage==5.3.1; (python_version < "3.4" and python_version >= "2.7") and extra == "all-strict"
142
+ Requires-Dist: coverage==4.5; (python_version < "2.7" and python_version >= "2.6") and extra == "all-strict"
143
+ Requires-Dist: argcomplete==1.0; extra == "all-strict"
144
+ Requires-Dist: rich_argparse==1.1.0; python_version >= "3.7" and extra == "all-strict"
145
+ Provides-Extra: runtime-strict
146
+ Requires-Dist: ubelt==1.3.3; extra == "runtime-strict"
147
+ Requires-Dist: scriptconfig==0.7.10; python_version >= "3.6" and extra == "runtime-strict"
148
+ Requires-Dist: rich==12.4.4; python_version >= "3.8" and extra == "runtime-strict"
149
+ Requires-Dist: rich==11.2.0; (python_version < "3.8" and python_version >= "3.6") and extra == "runtime-strict"
150
+ Requires-Dist: git-python==1.0.0; python_version >= "2.7" and extra == "runtime-strict"
151
+ Requires-Dist: packaging==21.3; extra == "runtime-strict"
152
+ Requires-Dist: networkx==2.8; (python_version < "4.0" and python_version >= "3.11") and extra == "runtime-strict"
153
+ Requires-Dist: networkx==2.7; (python_version < "3.11" and python_version >= "3.8") and extra == "runtime-strict"
154
+ Requires-Dist: networkx==2.6.2; (python_version < "3.8" and python_version >= "3.7") and extra == "runtime-strict"
155
+ Requires-Dist: networkx<=2.5.1,==2.2.0; (python_version < "3.7.0" and python_version >= "3.6.0") and extra == "runtime-strict"
156
+ Provides-Extra: tests-strict
157
+ Requires-Dist: xdoctest==1.1.3; extra == "tests-strict"
158
+ Requires-Dist: pytest==6.2.5; python_version >= "3.10.0" and extra == "tests-strict"
159
+ Requires-Dist: pytest==4.6.0; (python_version < "3.10.0" and python_version >= "3.7.0") and extra == "tests-strict"
160
+ Requires-Dist: pytest==4.6.0; (python_version < "3.7.0" and python_version >= "3.6.0") and extra == "tests-strict"
161
+ Requires-Dist: pytest<=6.1.2,==4.6.0; (python_version < "3.6.0" and python_version >= "3.5.0") and extra == "tests-strict"
162
+ Requires-Dist: pytest<=4.6.11,==4.6.0; (python_version < "3.5.0" and python_version >= "3.4.0") and extra == "tests-strict"
163
+ Requires-Dist: pytest<=4.6.11,==4.6.0; (python_version < "2.8.0" and python_version >= "2.7.0") and extra == "tests-strict"
164
+ Requires-Dist: pytest-cov==3.0.0; python_version >= "3.6.0" and extra == "tests-strict"
165
+ Requires-Dist: pytest-cov==2.9.0; (python_version < "3.6.0" and python_version >= "3.5.0") and extra == "tests-strict"
166
+ Requires-Dist: pytest-cov==2.8.1; (python_version < "3.5.0" and python_version >= "3.4.0") and extra == "tests-strict"
167
+ Requires-Dist: pytest-cov==2.8.1; (python_version < "2.8.0" and python_version >= "2.7.0") and extra == "tests-strict"
168
+ Requires-Dist: pytest-timeout==1.4.2; extra == "tests-strict"
169
+ Requires-Dist: coverage==6.1.1; python_version >= "3.10" and extra == "tests-strict"
170
+ Requires-Dist: coverage==5.3.1; (python_version < "3.10" and python_version >= "3.9") and extra == "tests-strict"
171
+ Requires-Dist: coverage==6.1.1; (python_version < "3.9" and python_version >= "3.8") and extra == "tests-strict"
172
+ Requires-Dist: coverage==6.1.1; (python_version < "3.8" and python_version >= "3.7") and extra == "tests-strict"
173
+ Requires-Dist: coverage==6.1.1; (python_version < "3.7" and python_version >= "3.6") and extra == "tests-strict"
174
+ Requires-Dist: coverage==5.3.1; (python_version < "3.6" and python_version >= "3.5") and extra == "tests-strict"
175
+ Requires-Dist: coverage==4.3.4; (python_version < "3.5" and python_version >= "3.4") and extra == "tests-strict"
176
+ Requires-Dist: coverage==5.3.1; (python_version < "3.4" and python_version >= "2.7") and extra == "tests-strict"
177
+ Requires-Dist: coverage==4.5; (python_version < "2.7" and python_version >= "2.6") and extra == "tests-strict"
178
+ Provides-Extra: optional-strict
179
+ Requires-Dist: argcomplete==1.0; extra == "optional-strict"
180
+ Requires-Dist: rich_argparse==1.1.0; python_version >= "3.7" and extra == "optional-strict"
181
+ Provides-Extra: docs-strict
182
+ Requires-Dist: sphinx==5.0.1; extra == "docs-strict"
183
+ Requires-Dist: sphinx-autobuild==2021.3.14; extra == "docs-strict"
184
+ Requires-Dist: sphinx_rtd_theme==1.0.0; extra == "docs-strict"
185
+ Requires-Dist: sphinxcontrib-napoleon==0.7; extra == "docs-strict"
186
+ Requires-Dist: sphinx-autoapi==1.8.4; extra == "docs-strict"
187
+ Requires-Dist: Pygments==2.9.0; extra == "docs-strict"
188
+ Requires-Dist: myst_parser==0.18.0; extra == "docs-strict"
189
+ Requires-Dist: sphinx-reredirects==0.0.1; extra == "docs-strict"
190
+
191
+ The git_well Module
192
+ ===================
193
+
194
+
195
+ |Pypi| |PypiDownloads| |GithubActions| |Codecov| |ReadTheDocs|
196
+
197
+ +------------------+----------------------------------------------+
198
+ | Read the docs | https://python-git-well.readthedocs.io |
199
+ +------------------+----------------------------------------------+
200
+ | Github | https://github.com/Erotemic/git_well |
201
+ +------------------+----------------------------------------------+
202
+ | Pypi | https://pypi.org/project/git_well |
203
+ +------------------+----------------------------------------------+
204
+
205
+ Git Well is a collection of git command line tools and is also a Python
206
+ module.
207
+
208
+ Installing this module installs the ``git-well`` command, which is a modal CLI
209
+ into several new git commands. These git commands are also exposed as
210
+ standalone "git" executables.
211
+
212
+ In other words after you:
213
+
214
+ .. code:: bash
215
+
216
+ pip install git-well
217
+
218
+ To get CLI argument completion install `autocomplete
219
+ <https://pypi.org/project/argcomplete/>`_, and you can enable global
220
+ auto-completion
221
+
222
+ .. code:: bash
223
+
224
+ pip install argcomplete
225
+ mkdir -p ~/.bash_completion.d
226
+ activate-global-python-argcomplete --dest ~/.bash_completion.d
227
+ source ~/.bash_completion.d/python-argcomplete
228
+
229
+ And add this to your .bashrc
230
+
231
+ .. code:: bash
232
+
233
+ if [ -f "$HOME/.bash_completion.d/python-argcomplete" ]; then
234
+ # shellcheck disable=SC1091
235
+ source "$HOME"/.bash_completion.d/python-argcomplete
236
+ fi
237
+
238
+
239
+ NOTE: if you know of a way to make this easier please let me know!
240
+
241
+
242
+ Then you can run
243
+
244
+ .. code:: bash
245
+
246
+ # Show all the commands exposed by this repo.
247
+ git well --help
248
+
249
+ git well sync --help
250
+
251
+ # OR
252
+
253
+ git sync
254
+
255
+
256
+ Top Level CLI:
257
+
258
+ .. code::
259
+
260
+ usage: git-well [-h] {squash_streaks,branch_upgrade,sync,branch_cleanup,track_upstream,rebase_add_continue,remote_protocol,discover_remote} ...
261
+
262
+ options:
263
+ -h, --help show this help message and exit
264
+
265
+ commands:
266
+ {squash_streaks,branch_upgrade,sync,branch_cleanup,track_upstream,rebase_add_continue,remote_protocol,discover_remote}
267
+ specify a command to run
268
+ squash_streaks Squashes consecutive commits that meet a specified criteiron.
269
+ branch_upgrade Upgrade to the latest "dev" branch. I.e. search for the branch
270
+ sync Sync a git repo with a remote server via ssh
271
+ branch_cleanup Cleanup branches that have been merged into main.
272
+ track_upstream Set the branch upstream with sensible defaults if possible.
273
+ rebase_add_continue
274
+ A single step to make rebasing easier.
275
+ remote_protocol Helper to change a remote from https to ssh / git for a specific user /
276
+ discover_remote Attempt to discover a ssh remote based on an ssh host.
277
+
278
+
279
+
280
+
281
+ The tools in this module are derived from:
282
+
283
+ * https://github.com/Erotemic/git-sync
284
+ * https://github.com/Erotemic/local/tree/main/git_tools
285
+
286
+
287
+
288
+ Use Cases
289
+ ---------
290
+
291
+ Have you ever run into this error when you run ``git pull``?
292
+
293
+ .. code::
294
+
295
+ There is no tracking information for the current branch.
296
+ Please specify which branch you want to merge with.
297
+ See git-pull(1) for details.
298
+
299
+ git pull <remote> <branch>
300
+
301
+ If you wish to set tracking information for this branch you can do so with:
302
+
303
+ git branch --set-upstream-to=origin/<branch> the_current_branch
304
+
305
+ I find this a huge pain because it can't even be bothered to fill in `<branch>` so you have to munge the command to type:
306
+
307
+ .. code::
308
+
309
+ git branch --set-upstream-to=origin/the_current_branch the_current_branch
310
+
311
+
312
+ I get why they did this, the branch on the remote might have a different name.
313
+ But... it usually doesn't. That's why I implemented ``git-well track-upstream``.
314
+
315
+
316
+ Running this instead will detect if you are in the simple case and just do it
317
+ for you. Otherwise it will enumerate your options and ask you to pick one.
318
+
319
+ I've found this command to prevent so much disruption that instaling git-well
320
+ install ``git track-upstream`` as its own command.
321
+
322
+
323
+
324
+
325
+ .. |Pypi| image:: https://img.shields.io/pypi/v/git_well.svg
326
+ :target: https://pypi.python.org/pypi/git_well
327
+
328
+ .. |PypiDownloads| image:: https://img.shields.io/pypi/dm/git_well.svg
329
+ :target: https://pypistats.org/packages/git_well
330
+
331
+ .. |GithubActions| image:: https://github.com/Erotemic/git_well/actions/workflows/tests.yml/badge.svg?branch=main
332
+ :target: https://github.com/Erotemic/git_well/actions?query=branch%3Amain
333
+
334
+ .. |Codecov| image:: https://codecov.io/github/Erotemic/git_well/badge.svg?branch=main&service=github
335
+ :target: https://codecov.io/github/Erotemic/git_well?branch=main
336
+
337
+ .. |ReadTheDocs| image:: https://readthedocs.org/projects/python-git_well/badge/?version=latest
338
+ :target: http://python-git-well.readthedocs.io/en/latest/
@@ -0,0 +1,148 @@
1
+ The git_well Module
2
+ ===================
3
+
4
+
5
+ |Pypi| |PypiDownloads| |GithubActions| |Codecov| |ReadTheDocs|
6
+
7
+ +------------------+----------------------------------------------+
8
+ | Read the docs | https://python-git-well.readthedocs.io |
9
+ +------------------+----------------------------------------------+
10
+ | Github | https://github.com/Erotemic/git_well |
11
+ +------------------+----------------------------------------------+
12
+ | Pypi | https://pypi.org/project/git_well |
13
+ +------------------+----------------------------------------------+
14
+
15
+ Git Well is a collection of git command line tools and is also a Python
16
+ module.
17
+
18
+ Installing this module installs the ``git-well`` command, which is a modal CLI
19
+ into several new git commands. These git commands are also exposed as
20
+ standalone "git" executables.
21
+
22
+ In other words after you:
23
+
24
+ .. code:: bash
25
+
26
+ pip install git-well
27
+
28
+ To get CLI argument completion install `autocomplete
29
+ <https://pypi.org/project/argcomplete/>`_, and you can enable global
30
+ auto-completion
31
+
32
+ .. code:: bash
33
+
34
+ pip install argcomplete
35
+ mkdir -p ~/.bash_completion.d
36
+ activate-global-python-argcomplete --dest ~/.bash_completion.d
37
+ source ~/.bash_completion.d/python-argcomplete
38
+
39
+ And add this to your .bashrc
40
+
41
+ .. code:: bash
42
+
43
+ if [ -f "$HOME/.bash_completion.d/python-argcomplete" ]; then
44
+ # shellcheck disable=SC1091
45
+ source "$HOME"/.bash_completion.d/python-argcomplete
46
+ fi
47
+
48
+
49
+ NOTE: if you know of a way to make this easier please let me know!
50
+
51
+
52
+ Then you can run
53
+
54
+ .. code:: bash
55
+
56
+ # Show all the commands exposed by this repo.
57
+ git well --help
58
+
59
+ git well sync --help
60
+
61
+ # OR
62
+
63
+ git sync
64
+
65
+
66
+ Top Level CLI:
67
+
68
+ .. code::
69
+
70
+ usage: git-well [-h] {squash_streaks,branch_upgrade,sync,branch_cleanup,track_upstream,rebase_add_continue,remote_protocol,discover_remote} ...
71
+
72
+ options:
73
+ -h, --help show this help message and exit
74
+
75
+ commands:
76
+ {squash_streaks,branch_upgrade,sync,branch_cleanup,track_upstream,rebase_add_continue,remote_protocol,discover_remote}
77
+ specify a command to run
78
+ squash_streaks Squashes consecutive commits that meet a specified criteiron.
79
+ branch_upgrade Upgrade to the latest "dev" branch. I.e. search for the branch
80
+ sync Sync a git repo with a remote server via ssh
81
+ branch_cleanup Cleanup branches that have been merged into main.
82
+ track_upstream Set the branch upstream with sensible defaults if possible.
83
+ rebase_add_continue
84
+ A single step to make rebasing easier.
85
+ remote_protocol Helper to change a remote from https to ssh / git for a specific user /
86
+ discover_remote Attempt to discover a ssh remote based on an ssh host.
87
+
88
+
89
+
90
+
91
+ The tools in this module are derived from:
92
+
93
+ * https://github.com/Erotemic/git-sync
94
+ * https://github.com/Erotemic/local/tree/main/git_tools
95
+
96
+
97
+
98
+ Use Cases
99
+ ---------
100
+
101
+ Have you ever run into this error when you run ``git pull``?
102
+
103
+ .. code::
104
+
105
+ There is no tracking information for the current branch.
106
+ Please specify which branch you want to merge with.
107
+ See git-pull(1) for details.
108
+
109
+ git pull <remote> <branch>
110
+
111
+ If you wish to set tracking information for this branch you can do so with:
112
+
113
+ git branch --set-upstream-to=origin/<branch> the_current_branch
114
+
115
+ I find this a huge pain because it can't even be bothered to fill in `<branch>` so you have to munge the command to type:
116
+
117
+ .. code::
118
+
119
+ git branch --set-upstream-to=origin/the_current_branch the_current_branch
120
+
121
+
122
+ I get why they did this, the branch on the remote might have a different name.
123
+ But... it usually doesn't. That's why I implemented ``git-well track-upstream``.
124
+
125
+
126
+ Running this instead will detect if you are in the simple case and just do it
127
+ for you. Otherwise it will enumerate your options and ask you to pick one.
128
+
129
+ I've found this command to prevent so much disruption that instaling git-well
130
+ install ``git track-upstream`` as its own command.
131
+
132
+
133
+
134
+
135
+ .. |Pypi| image:: https://img.shields.io/pypi/v/git_well.svg
136
+ :target: https://pypi.python.org/pypi/git_well
137
+
138
+ .. |PypiDownloads| image:: https://img.shields.io/pypi/dm/git_well.svg
139
+ :target: https://pypistats.org/packages/git_well
140
+
141
+ .. |GithubActions| image:: https://github.com/Erotemic/git_well/actions/workflows/tests.yml/badge.svg?branch=main
142
+ :target: https://github.com/Erotemic/git_well/actions?query=branch%3Amain
143
+
144
+ .. |Codecov| image:: https://codecov.io/github/Erotemic/git_well/badge.svg?branch=main&service=github
145
+ :target: https://codecov.io/github/Erotemic/git_well?branch=main
146
+
147
+ .. |ReadTheDocs| image:: https://readthedocs.org/projects/python-git_well/badge/?version=latest
148
+ :target: http://python-git-well.readthedocs.io/en/latest/
@@ -1,7 +1,7 @@
1
1
  """
2
2
  Basic
3
3
  """
4
- __version__ = '0.2.0'
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/'
@@ -0,0 +1 @@
1
+
@@ -0,0 +1,115 @@
1
+ import ubelt as ub
2
+
3
+
4
+ def rich_print(*args, **kwargs):
5
+ try:
6
+ from rich import print as print_
7
+ except Exception:
8
+ print_ = print
9
+ return print_(*args, **kwargs)
10
+
11
+
12
+ def find_merged_branches(repo, main_branch='main'):
13
+ # git branch --merged main
14
+ # main_branch = 'main'
15
+ merged_branches = [p.replace('*', '').strip() for p in repo.git.branch(merged=main_branch).split('\n') if p.strip()]
16
+ merged_branches = ub.oset(merged_branches) - {main_branch}
17
+ return merged_branches
18
+
19
+
20
+ def confirm(msg):
21
+ try:
22
+ from rich import prompt
23
+ ret = prompt.Confirm.ask(msg)
24
+ except ImportError:
25
+ while True:
26
+ ans = input(msg + ' [y/n]')
27
+ if ans in {'y', 'yes'}:
28
+ ret = True
29
+ break
30
+ elif ans in {'n', 'no'}:
31
+ ret = False
32
+ break
33
+ else:
34
+ print('invalid response')
35
+ return ret
36
+
37
+
38
+ def choice_prompt(msg, choices):
39
+ """
40
+ Ignore:
41
+ choice_prompt('which one?', choices=['a', 'b', 'c'])
42
+ """
43
+ try:
44
+ from rich.prompt import Prompt, InvalidResponse
45
+ except ImportError:
46
+ print('Rich is required here')
47
+ raise
48
+
49
+ class ChoiceWithIntPrompt(Prompt):
50
+ """
51
+ Assigns an integer to each choice.
52
+ """
53
+ def make_prompt(self, default):
54
+ prompt = self.prompt.copy()
55
+ prompt.end = ""
56
+
57
+ if self.show_choices and self.choices:
58
+ prompt.append('\n')
59
+ for idx, choice in enumerate(self.choices, start=1):
60
+ try:
61
+ int(choice)
62
+ except ValueError:
63
+ ...
64
+ else:
65
+ raise AssertionError('choices cannot be integers')
66
+
67
+ prompt.append(f'{idx}. ', style='json.number')
68
+ prompt.append(f'{choice}\n', style="prompt")
69
+ if (
70
+ default != ...
71
+ and self.show_default
72
+ and isinstance(default, (str, self.response_type))
73
+ ):
74
+ prompt.append(" ")
75
+ _default = self.render_default(default)
76
+ prompt.append(_default)
77
+
78
+ prompt.append(self.prompt_suffix)
79
+ return prompt
80
+
81
+ def process_response(self, value: str):
82
+ value = value.strip()
83
+ assert self.choices is not None
84
+ try:
85
+ return_value = self.response_type(value)
86
+ except ValueError:
87
+ raise InvalidResponse(self.validate_error_message)
88
+
89
+ try:
90
+ idx = int(return_value) - 1
91
+ return_value = self.choices[idx]
92
+ except Exception:
93
+ ...
94
+
95
+ if return_value not in self.choices:
96
+ raise InvalidResponse(self.illegal_choice_message)
97
+
98
+ return return_value
99
+
100
+ return ChoiceWithIntPrompt.ask(msg, choices=choices)
101
+
102
+
103
+ def find_git_root(dpath):
104
+ cwd = ub.Path(dpath).absolute()
105
+ parts = cwd.parts
106
+ found = None
107
+ for i in reversed(range(0, len(parts) + 1)):
108
+ p = ub.Path(*parts[0:i])
109
+ cand = p / '.git'
110
+ if cand.exists():
111
+ found = p
112
+ break
113
+ if found is None:
114
+ raise Exception('cannot find git root')
115
+ return found
@@ -0,0 +1,18 @@
1
+ def rich_print(*args, **kwargs):
2
+ ...
3
+
4
+
5
+ def find_merged_branches(repo, main_branch: str = ...):
6
+ ...
7
+
8
+
9
+ def confirm(msg):
10
+ ...
11
+
12
+
13
+ def choice_prompt(msg, choices):
14
+ ...
15
+
16
+
17
+ def find_git_root(dpath):
18
+ ...