• R/O
  • SSH

execsql: Commit

Default repository for execsql.py


Commit MetaInfo

Révision81a513e457322e114844b09cf793d0baca0ca1e7 (tree)
l'heure2021-12-03 20:22:03
Auteurrdnielsen
Commiterrdnielsen

Message de Log

Modified log message created by SYSTEM_CMD

Change Summary

Modification

diff -r 5427910c74aa -r 81a513e45732 CHANGELOG.rst
--- a/CHANGELOG.rst Thu Dec 02 22:33:55 2021 -0800
+++ b/CHANGELOG.rst Fri Dec 03 03:22:03 2021 -0800
@@ -1,7 +1,7 @@
11 ========== ========== =================================================================================
22 Version Date Features
33 ========== ========== =================================================================================
4-1.95.0 2021-12-02 The SYSTEM_CMD metacommand now logs the command to execsql.log.
4+1.95.0 2021-12-03 The SYSTEM_CMD metacommand now logs the command to execsql.log.
55 1.94.0 2021-10-19 Modified the INCLUDE and IMPORT metacommands to recognize leading tildes on the filename, and added the $PATHSEP system variable.
66 1.93.0 2021-10-02 Added the USER variant of the CONNECT metacommand.
77 1.92.0 2021-09-19 Added the TRIM_STRINGS and REPLACE_NEWLINES settings.
diff -r 5427910c74aa -r 81a513e45732 doc/source/conf.py
--- a/doc/source/conf.py Thu Dec 02 22:33:55 2021 -0800
+++ b/doc/source/conf.py Fri Dec 03 03:22:03 2021 -0800
@@ -58,9 +58,9 @@
5858 # built documents.
5959 #
6060 # The short X.Y version.
61-version = u'1.94'
61+version = u'1.95'
6262 # The full version, including alpha/beta/rc tags.
63-release = u'1.94'
63+release = u'1.95'
6464
6565 # A string of reStructuredText that will be included at the beginning of
6666 # every source file that is read.
diff -r 5427910c74aa -r 81a513e45732 doc/source/metacommands.rst
--- a/doc/source/metacommands.rst Thu Dec 02 22:33:55 2021 -0800
+++ b/doc/source/metacommands.rst Fri Dec 03 03:22:03 2021 -0800
@@ -4660,8 +4660,8 @@
46604660 listed here: https://ss64.com/nt/syntax-internal.html.
46614661
46624662 Because commands are not processed by the shell, the system path is not
4663-searched for executable
4664-commands, so full path names must be used for executable files.
4663+searched for executable commands, so full path names must be used for
4664+executable files.
46654665
46664666 Execution of the SQL script does not ordinarily continue until the operating
46674667 system command has completed. Conditions under which *execsql* will
@@ -4680,6 +4680,9 @@
46804680 command line is meant to eliminate the need to double backslashes in
46814681 path specifications on Windows.
46824682
4683+The command line that is run will be automatically
4684+:ref:`logged <logging>` in ``execsql.log``.
4685+
46834686 The exit status of the command that is invoked will be stored in the
46844687 :ref:`system variable <system_vars>` $SYSTEM_CMD_EXIT_STATUS if the
46854688 CONTINUE keyword has not been used.
diff -r 5427910c74aa -r 81a513e45732 execsql/execsql.py
--- a/execsql/execsql.py Thu Dec 02 22:33:55 2021 -0800
+++ b/execsql/execsql.py Fri Dec 03 03:22:03 2021 -0800
@@ -28,7 +28,7 @@
2828 # ===============================================================================
2929
3030 __version__ = "1.95.0"
31-__vdate = "2021-11-05"
31+__vdate = "2021-12-03"
3232
3333 primary_vno = 1
3434 secondary_vno = 95
@@ -10835,7 +10835,8 @@
1083510835 def x_system_cmd(**kwargs):
1083610836 syscmd = kwargs['command']
1083710837 cont = kwargs['continue']
10838- exec_log.log_user_msg(syscmd)
10838+ script, lno = current_script_line()
10839+ exec_log.log_user_msg(u"System command on line %s of script %s: %s" % (lno, script, syscmd))
1083910840 if os.name != 'posix':
1084010841 syscmd = syscmd.replace("\\", "\\\\")
1084110842 cmdlist = shlex.split(syscmd)
Afficher sur ancien navigateur de dépôt.