omdev 0.0.0.dev115__py3-none-any.whl → 0.0.0.dev117__py3-none-any.whl

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.

Potentially problematic release.


This version of omdev might be problematic. Click here for more details.

omdev/.manifests.json CHANGED
@@ -243,7 +243,7 @@
243
243
  "module": ".tools.git",
244
244
  "attr": "_CLI_MODULE",
245
245
  "file": "omdev/tools/git.py",
246
- "line": 182,
246
+ "line": 196,
247
247
  "value": {
248
248
  "$.cli.types.CliModule": {
249
249
  "cmd_name": "git",
omdev/tools/git.py CHANGED
@@ -107,6 +107,7 @@ class Cli(ap.Cli):
107
107
  ap.arg('-d', '--diff', action='store_true'),
108
108
  ap.arg('-s', '--diff-stat', action='store_true'),
109
109
  ap.arg('-g', '--github', action='store_true'),
110
+ ap.arg('-o', '--open', action='store_true'),
110
111
  )
111
112
  def recap(self) -> None:
112
113
  rev = rev_parse(self.args.rev)
@@ -118,12 +119,25 @@ class Cli(ap.Cli):
118
119
 
119
120
  elif self.args.github:
120
121
  rm_url = subprocess.check_output(['git', 'remote', 'get-url', 'origin']).decode('utf-8').strip()
121
- pu = urllib.parse.urlparse(rm_url)
122
- check.equal(pu.scheme, 'https')
123
- check.equal(pu.hostname, 'github.com')
124
- _, user, repo, *_ = pu.path.split('/')
122
+
123
+ if rm_url.startswith(git_pfx := 'git@github.com:'):
124
+ s = rm_url[len(git_pfx):]
125
+ if s.endswith('.git'):
126
+ s = s[:-4]
127
+ user, repo = s.split('/')
128
+
129
+ else:
130
+ pu = urllib.parse.urlparse(rm_url)
131
+ check.equal(pu.scheme, 'https')
132
+ check.equal(pu.hostname, 'github.com')
133
+ _, user, repo, *_ = pu.path.split('/')
134
+
125
135
  gh_url = f'https://github.com/{user}/{repo}/compare/{base_rev}...{rev}#files_bucket'
126
- print(gh_url)
136
+
137
+ if self.args.open:
138
+ subprocess.check_call(['open', gh_url])
139
+ else:
140
+ print(gh_url)
127
141
 
128
142
  else:
129
143
  print(base_rev)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: omdev
3
- Version: 0.0.0.dev115
3
+ Version: 0.0.0.dev117
4
4
  Summary: omdev
5
5
  Author: wrmsr
6
6
  License: BSD-3-Clause
@@ -12,7 +12,7 @@ Classifier: Operating System :: OS Independent
12
12
  Classifier: Operating System :: POSIX
13
13
  Requires-Python: >=3.12
14
14
  License-File: LICENSE
15
- Requires-Dist: omlish ==0.0.0.dev115
15
+ Requires-Dist: omlish ==0.0.0.dev117
16
16
  Provides-Extra: all
17
17
  Requires-Dist: black ~=24.10 ; extra == 'all'
18
18
  Requires-Dist: pycparser ~=2.22 ; extra == 'all'
@@ -1,4 +1,4 @@
1
- omdev/.manifests.json,sha256=mSpMkoQh9IOKLSsixXby-ZC6cGmi6giOt5oZsd5w_AM,7479
1
+ omdev/.manifests.json,sha256=0dv5osU22uLMCGNjhlerEVCkkbATDTb3jyUgjasDwWE,7479
2
2
  omdev/__about__.py,sha256=n5x-SO70OgbDQFzQ1d7sZDVMsnkQc4PxQZPFaIQFa0E,1281
3
3
  omdev/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
4
  omdev/bracepy.py,sha256=I8EdqtDvxzAi3I8TuMEW-RBfwXfqKbwp06CfOdj3L1o,2743
@@ -132,7 +132,7 @@ omdev/toml/writer.py,sha256=lk3on3YXVbWuLJa-xsOzOhs1bBAT1vXqw4mBbluZl_w,3040
132
132
  omdev/tools/__init__.py,sha256=iVJAOQ0viGTQOm0DLX4uZLro-9jOioYJGLg9s0kDx1A,78
133
133
  omdev/tools/doc.py,sha256=mv9XfitzqXl3vFHSenv01xHCxWf8g03rUAb_sqoty98,2556
134
134
  omdev/tools/docker.py,sha256=k2BrVvFYwyGov064CPHd_HWo9aqR1zHc2UeEsVwPth4,6827
135
- omdev/tools/git.py,sha256=AXNZDM-VtpC0ePJKtkjxJi_X9hUyobKrX9WSBOocmzY,6027
135
+ omdev/tools/git.py,sha256=5UjJVAp0BrOM7x4a1HydoWGxDrCpnxJzMUmRBcXmVZ4,6445
136
136
  omdev/tools/importscan.py,sha256=QeGjR3UGcuuuDUiisFuAXWHlcKJScGxGEcU6tfOh2CM,4069
137
137
  omdev/tools/mkrelimp.py,sha256=wsJAjTIf3nqcSfnT9TkDpS1VUOoM9W2Az5tZdWuzyLM,4054
138
138
  omdev/tools/notebook.py,sha256=M8Xi_gfZdlahnyFLtp0RBgYZPSHWQStMMDYZc71Zync,3494
@@ -143,9 +143,9 @@ omdev/tools/sqlrepl.py,sha256=tmFZh80-xsGM62dyQ7_UGLebChrj7IHbIPYBWDJMgVk,5741
143
143
  omdev/tools/pawk/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
144
144
  omdev/tools/pawk/__main__.py,sha256=VCqeRVnqT1RPEoIrqHFSu4PXVMg4YEgF4qCQm90-eRI,66
145
145
  omdev/tools/pawk/pawk.py,sha256=Eckymn22GfychCQcQi96BFqRo_LmiJ-EPhC8TTUJdB4,11446
146
- omdev-0.0.0.dev115.dist-info/LICENSE,sha256=B_hVtavaA8zCYDW99DYdcpDLKz1n3BBRjZrcbv8uG8c,1451
147
- omdev-0.0.0.dev115.dist-info/METADATA,sha256=fgJ9LOYnfKey8bhvfz6se4nT582TnO8jD3p6zdXBtCg,1810
148
- omdev-0.0.0.dev115.dist-info/WHEEL,sha256=R06PA3UVYHThwHvxuRWMqaGcr-PuniXahwjmQRFMEkY,91
149
- omdev-0.0.0.dev115.dist-info/entry_points.txt,sha256=dHLXFmq5D9B8qUyhRtFqTGWGxlbx3t5ejedjrnXNYLU,33
150
- omdev-0.0.0.dev115.dist-info/top_level.txt,sha256=1nr7j30fEWgLYHW3lGR9pkdHkb7knv1U1ES1XRNVQ6k,6
151
- omdev-0.0.0.dev115.dist-info/RECORD,,
146
+ omdev-0.0.0.dev117.dist-info/LICENSE,sha256=B_hVtavaA8zCYDW99DYdcpDLKz1n3BBRjZrcbv8uG8c,1451
147
+ omdev-0.0.0.dev117.dist-info/METADATA,sha256=GLhStnZAhXwSVgEpxUTrz6tiFoxH2Ek9fvMQyKpMHqE,1810
148
+ omdev-0.0.0.dev117.dist-info/WHEEL,sha256=R06PA3UVYHThwHvxuRWMqaGcr-PuniXahwjmQRFMEkY,91
149
+ omdev-0.0.0.dev117.dist-info/entry_points.txt,sha256=dHLXFmq5D9B8qUyhRtFqTGWGxlbx3t5ejedjrnXNYLU,33
150
+ omdev-0.0.0.dev117.dist-info/top_level.txt,sha256=1nr7j30fEWgLYHW3lGR9pkdHkb7knv1U1ES1XRNVQ6k,6
151
+ omdev-0.0.0.dev117.dist-info/RECORD,,