Skip to content

Commit

Permalink
Merge tag '0.16.5'
Browse files Browse the repository at this point in the history
Update version to 0.16.5

* tag '0.16.5':
  [skip ci] Update RST changelog
  Update CHANGELOG.md [skip ci]
  BF: github push - remove datalad-push-default-first config only in non-dry run
  RF: just make 'configured' into the simple cmd:ssh
  ENH: do report both system (default) ssh and configured ssh versions
  BF: fix 'parsing' of ssh version to work for OpenSSH_for_Windows_8.1p1
  • Loading branch information
yarikoptic committed Jun 9, 2022
2 parents 4d53077 + 98eb875 commit 029f839
Show file tree
Hide file tree
Showing 5 changed files with 76 additions and 19 deletions.
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
# 0.16.5 (Wed Jun 08 2022)

#### 🐛 Bug Fix

- BF: push to github - remove datalad-push-default-first config only in non-dry run to ensure we push default branch separately in next step [#6750](https://github.com/datalad/datalad/pull/6750) ([@yarikoptic](https://github.com/yarikoptic))
- In addition to default (system) ssh version, report configured ssh; fix ssh version parsing on Windows [#6729](https://github.com/datalad/datalad/pull/6729) ([@yarikoptic](https://github.com/yarikoptic))

#### Authors: 1

- Yaroslav Halchenko ([@yarikoptic](https://github.com/yarikoptic))

---

# 0.16.4 (Thu Jun 02 2022)

#### 🐛 Bug Fix
Expand Down
29 changes: 22 additions & 7 deletions datalad/support/external_versions.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,21 +97,35 @@ def _get_bundled_git_version():
return out.split()[2]


def _get_system_ssh_version():
"""Return version of ssh available system-wide
Annex prior 20170302 was using bundled version, but now would use system one
if installed
def _get_ssh_version(exe=None):
"""Return version of ssh
Annex prior 20170302 was using bundled version, then across all systems
we used system one if installed, and then switched to the one defined in
configuration, with system-wide (not default in PATH e.g. from conda)
"forced" on Windows. If no specific executable provided in `exe`, we will
use the one in configuration
"""
if exe is None:
from datalad import cfg
exe = cfg.obtain("datalad.ssh.executable")
out = _runner.run(
'ssh -V'.split(),
[exe, '-V'],
protocol=StdOutErrCapture)
# apparently spits out to err but I wouldn't trust it blindly
stdout = out['stdout']
if out['stderr'].startswith('OpenSSH'):
stdout = out['stderr']
assert stdout.startswith('OpenSSH') # that is the only one we care about atm
return stdout.split(' ', 1)[0].rstrip(',.').split('_')[1]
# The last item in _-separated list in the first word which could be separated
# from the rest by , or yet have another word after space
return stdout.split(',', 1)[0].split(' ')[0].rstrip('.').split('_')[-1]


def _get_system_ssh_version():
"""Return version of the default on the system (in the PATH) ssh
"""
return _get_ssh_version("ssh")


def _get_system_7z_version():
Expand Down Expand Up @@ -151,6 +165,7 @@ class ExternalVersions(object):
'cmd:git': _get_git_version,
'cmd:bundled-git': _get_bundled_git_version,
'cmd:system-git': _get_system_git_version,
'cmd:ssh': _get_ssh_version,
'cmd:system-ssh': _get_system_ssh_version,
'cmd:7z': _get_system_7z_version,
}
Expand Down
3 changes: 2 additions & 1 deletion datalad/support/gitrepo.py
Original file line number Diff line number Diff line change
Expand Up @@ -1983,7 +1983,8 @@ def push(self, remote=None, refspec=None, all_remotes=False,
)
)
# note: above push_ should raise exception if errors out
if cfg.get_from_source('local', cfg_push_var) is not None:
if '--dry-run' not in git_options \
and cfg.get_from_source('local', cfg_push_var) is not None:
lgr.debug("Removing %s variable from local git config after successful push", cfg_push_var)
cfg.unset(cfg_push_var, 'local')
return push_res
Expand Down
2 changes: 2 additions & 0 deletions datalad/support/tests/test_external_versions.py
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,8 @@ def test_system_ssh_version():

for s, v in [
('OpenSSH_7.4p1 Debian-6, OpenSSL 1.0.2k 26 Jan 2017', '7.4p1'),
('OpenSSH_8.1p1, LibreSSL 2.7.3', '8.1p1'),
('OpenSSH_for_Windows_8.1p1, LibreSSL 3.0.2', '8.1p1'),
]:
ev = ExternalVersions()
# TODO: figure out leaner way
Expand Down
48 changes: 37 additions & 11 deletions docs/source/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,33 @@
Change log
**********
0.16.5 (Wed Jun 08 2022)
========================

Bug Fix
-------

- BF: push to github - remove datalad-push-default-first config only in
non-dry run to ensure we push default branch separately in next step
`#6750 <https://github.com/datalad/datalad/pull/6750>`__
(`@yarikoptic <https://github.com/yarikoptic>`__)
- In addition to default (system) ssh version, report configured ssh;
fix ssh version parsing on Windows
`#6729 <https://github.com/datalad/datalad/pull/6729>`__
(`@yarikoptic <https://github.com/yarikoptic>`__)

Authors: 1
----------

- Yaroslav Halchenko (`@yarikoptic <https://github.com/yarikoptic>`__)

--------------

0.16.4 (Thu Jun 02 2022)
========================

.. _bug-fix-1:

Bug Fix
-------

Expand Down Expand Up @@ -44,7 +68,7 @@ Authors: 3
0.16.3 (Thu May 12 2022)
========================

.. _bug-fix-1:
.. _bug-fix-2:

Bug Fix
-------
Expand Down Expand Up @@ -95,7 +119,7 @@ Authors: 4
0.16.2 (Thu Apr 21 2022)
========================

.. _bug-fix-2:
.. _bug-fix-3:

Bug Fix
-------
Expand Down Expand Up @@ -824,7 +848,7 @@ Authors: 11
0.15.6 (Sun Feb 27 2022)
========================

.. _bug-fix-3:
.. _bug-fix-4:

Bug Fix
-------
Expand All @@ -842,6 +866,8 @@ Bug Fix
`#6459 <https://github.com/datalad/datalad/pull/6459>`__
(`@yarikoptic <https://github.com/yarikoptic>`__)

.. _authors-1-1:

Authors: 1
----------

Expand All @@ -859,7 +885,7 @@ Enhancement
`#6364 <https://github.com/datalad/datalad/pull/6364>`__
(`@adswa <https://github.com/adswa>`__)

.. _bug-fix-4:
.. _bug-fix-5:

Bug Fix
-------
Expand Down Expand Up @@ -910,7 +936,7 @@ Authors: 5
0.15.4 (Thu Dec 16 2021)
========================

.. _bug-fix-5:
.. _bug-fix-6:

Bug Fix
-------
Expand Down Expand Up @@ -995,7 +1021,7 @@ Authors: 6
0.15.3 (Sat Oct 30 2021)
========================

.. _bug-fix-6:
.. _bug-fix-7:

Bug Fix
-------
Expand Down Expand Up @@ -1099,7 +1125,7 @@ Authors: 7
0.15.2 (Wed Oct 06 2021)
========================

.. _bug-fix-7:
.. _bug-fix-8:

Bug Fix
-------
Expand Down Expand Up @@ -1166,7 +1192,7 @@ Authors: 5
0.15.1 (Fri Sep 24 2021)
========================

.. _bug-fix-8:
.. _bug-fix-9:

Bug Fix
-------
Expand Down Expand Up @@ -1581,7 +1607,7 @@ Tests
0.14.8 (Sun Sep 12 2021)
========================

.. _bug-fix-9:
.. _bug-fix-10:

Bug Fix
-------
Expand Down Expand Up @@ -1689,7 +1715,7 @@ Authors: 4
0.14.7 (Tue Aug 03 2021)
========================

.. _bug-fix-10:
.. _bug-fix-11:

Bug Fix
-------
Expand Down Expand Up @@ -1789,7 +1815,7 @@ Authors: 2
0.14.5 (Mon Jun 21 2021)
========================

.. _bug-fix-11:
.. _bug-fix-12:

Bug Fix
-------
Expand Down

0 comments on commit 029f839

Please sign in to comment.