Versioning
Commit a script or a whole group of scripts, compare the current code with the last commit and read the history. You can list the commits, the scripts of a commit and their full code. Typical uses: keep a trace of changes before a deployment, get back an older version of a script.
version check_groupversion commit_groupversion commit_scriptversion show_commitsversion show_scriptnamesversion show_scriptsversion show_scriptversion historyversion historyversion getversion diffversion diffversion diffversion restore_groupversion restore_groupversion restore
version check_group <group>
Description
Check the version differences
Check the version differences
Parameters
group: The group name - string - required
group: The group name - string - required
admin
version check_group "admin";
mentdb
STATE : SCRIPT I : addition.post I : app.100.template.index_ai.actions.MENTDB.se_city.delete.exe I : app.100.template.index_ai.actions.MENTDB.se_city.delete_confirm.exe
Used in use cases (7 recipes)
Versioning & deployment › First commit of a group of scripts
Application developer › Version the scripts of a group
Versioning & deployment › Change a script, see it as U, commit again and read the history
Versioning & deployment › Hotfix: commit a single script, not the whole group
Versioning & deployment › Rollback: restore the previous version of a script
Versioning & deployment › Retire a web service: D in versioning
and 1 more in the Use cases
Versioning & deployment › First commit of a group of scripts
Application developer › Version the scripts of a group
Versioning & deployment › Change a script, see it as U, commit again and read the history
Versioning & deployment › Hotfix: commit a single script, not the whole group
Versioning & deployment › Rollback: restore the previous version of a script
Versioning & deployment › Retire a web service: D in versioning
and 1 more in the Use cases
Often used with
group grant script · script delete · version commit_group · bd* · file delete · group add · group remove · script create
group grant script · script delete · version commit_group · bd* · file delete · group add · group remove · script create
version commit_group <group> <msg>
Description
Commit a group
Commit a group
Parameters
group: The group name - string - required
msg: The message - string - required
group: The group name - string - required
msg: The message - string - required
admin
version commit_group "admin" "first commit";
mentdb
20201223144918_sFIEJm_1Qxb5x
Used in use cases (9 recipes)
Versioning & deployment › First commit of a group of scripts
Application developer › Version the scripts of a group
Versioning & deployment › Change a script, see it as U, commit again and read the history
Versioning & deployment › Hotfix: commit a single script, not the whole group
Versioning & deployment › Review: what changed between two commits
Versioning & deployment › Rollback: restore the previous version of a script
and 3 more in the Use cases
Versioning & deployment › First commit of a group of scripts
Application developer › Version the scripts of a group
Versioning & deployment › Change a script, see it as U, commit again and read the history
Versioning & deployment › Hotfix: commit a single script, not the whole group
Versioning & deployment › Review: what changed between two commits
Versioning & deployment › Rollback: restore the previous version of a script
and 3 more in the Use cases
Often used with
group grant script · script delete · bd* · file delete · group add · group remove · script create · type is_double
group grant script · script delete · bd* · file delete · group add · group remove · script create · type is_double
version commit_script <group> <filterScritname> <msg>
Description
Commit a script
Commit a script
Parameters
group: The group name - string - required
filterScritname: The script name filter - string - required
msg: The message - string - required
group: The group name - string - required
filterScritname: The script name filter - string - required
msg: The message - string - required
admin
version commit_script "admin" "addition.post" "first commit";
mentdb
20201223144918_sFIEJm_1Qxb5x
Used in use cases (2 recipes)
Versioning & deployment › Hotfix: commit a single script, not the whole group
Application developer › Version the scripts of a group
Versioning & deployment › Hotfix: commit a single script, not the whole group
Application developer › Version the scripts of a group
Often used with
group grant script · script delete · version check_group · version commit_group · version show_scriptnames · bd* · file delete · group add
group grant script · script delete · version check_group · version commit_group · version show_scriptnames · bd* · file delete · group add
version show_commits <group> <filter> <nb_row>
Description
Show the last commits of a group whose message matches a regex filter
Show the last commits of a group whose message matches a regex filter
Parameters
group: The group name - string - required
filter: A regex on the commit message (.* for all) - string - required
nb_row: The maximum number of commits - number - required
group: The group name - string - required
filter: A regex on the commit message (.* for all) - string - required
nb_row: The maximum number of commits - number - required
admin
version show_commits "admin" ".*" 10;
mentdb
COMMITS <20201223163207_6XCUl3_rgqaUo_CMT> admin - first message version show_scriptnames admin 20201223163207_6XCUl3_rgqaUo_CMT; version show_scripts admin 20201223163207_6XCUl3_rgqaUo_CMT; <20201223163254_UvZtRg_EKuRlR_CMT> admin - addition a été changer version show_scriptnames admin 20201223163254_UvZtRg_EKuRlR_CMT; version show_scripts admin 20201223163254_UvZtRg_EKuRlR_CMT;
Used in use cases (3 recipes)
Versioning & deployment › Change a script, see it as U, commit again and read the history
Application developer › Version the scripts of a group
Versioning & deployment › Rollback: restore the previous version of a script
Versioning & deployment › Change a script, see it as U, commit again and read the history
Application developer › Version the scripts of a group
Versioning & deployment › Rollback: restore the previous version of a script
Often used with
group grant script · script delete · version check_group · version commit_group · bd* · file delete · group add · group remove
group grant script · script delete · version check_group · version commit_group · bd* · file delete · group add · group remove
version show_scriptnames <group> <commit_id>
Description
Show all the script names of a commit
Show all the script names of a commit
Parameters
group: The group name - string - required
commit_id: The commit id - string - required
group: The group name - string - required
commit_id: The commit id - string - required
admin
version show_scriptnames "admin" "20201223144918_sFIEJm_1Qxb5x";
mentdb
<20201223163254_UvZtRg_EKuRlR_CMT> version show_script admin 20201223163254_UvZtRg_EKuRlR_CMT addition.post.mql;
Used in use cases (3 recipes)
Versioning & deployment › Hotfix: commit a single script, not the whole group
Application developer › Version the scripts of a group
Versioning & deployment › Retire a web service: D in versioning
Versioning & deployment › Hotfix: commit a single script, not the whole group
Application developer › Version the scripts of a group
Versioning & deployment › Retire a web service: D in versioning
Often used with
group grant script · script delete · version check_group · version commit_group · bd* · file delete · group add · group remove
group grant script · script delete · version check_group · version commit_group · bd* · file delete · group add · group remove
version show_scripts <group> <commit_id>
Description
Show the full code (script merge ...) of all the scripts of a commit
Show the full code (script merge ...) of all the scripts of a commit
Parameters
group: The group name - string - required
commit_id: The commit id - string - required
group: The group name - string - required
commit_id: The commit id - string - required
admin
version show_scripts "admin" "20201223144918_sFIEJm_1Qxb5x";
mentdb
script merge "addition.post" false 1 (param (var "[v1]" {type is_double [v1]} "description ..." is_null:true is_empty:true "example ...") (var "[v2]" {type is_double [v2]} "description ..." is_null:true is_empty:true "example ...") ;) "description2 ..." { + [v1] [v2]; } "Return ..."; script set delay "addition.post" 0 day {1};
Used in use cases (2 recipes)
Versioning & deployment › Review: what changed between two commits
Versioning & deployment › Roll a whole group back to a release
Versioning & deployment › Review: what changed between two commits
Versioning & deployment › Roll a whole group back to a release
Often used with
bd* · file delete · group add · group grant script · group remove · script create · script delete · string regexp_count
bd* · file delete · group add · group grant script · group remove · script create · script delete · string regexp_count
version show_script <group> <commit_id> <scriptname>
Description
Show a specific script of a commit
Show a specific script of a commit
Parameters
group: The group name - string - required
commit_id: The commit id - string - required
scriptname: The script name - string - required
group: The group name - string - required
commit_id: The commit id - string - required
scriptname: The script name - string - required
admin
version show_script "admin" "20201223144918_sFIEJm_1Qxb5x" "addition.post";
mentdb
script merge "addition.post" false 1 (param (var "[v1]" {type is_double [v1]} "description ..." is_null:true is_empty:true "example ...") (var "[v2]" {type is_double [v2]} "description ..." is_null:true is_empty:true "example ...") ;) "description2 ..." { + [v1] [v2]; } "Return ..."; script set delay "addition.post" 0 day {1};
Used in use cases (3 recipes)
Versioning & deployment › Review: what changed between two commits
Application developer › Version the scripts of a group
Versioning & deployment › Rollback: restore the previous version of a script
Versioning & deployment › Review: what changed between two commits
Application developer › Version the scripts of a group
Versioning & deployment › Rollback: restore the previous version of a script
Often used with
group grant script · script delete · version commit_group · bd* · file delete · group add · group remove · script create
group grant script · script delete · version commit_group · bd* · file delete · group add · group remove · script create
version history <script>
Description
The versions of a script, newest first: its saves and the commits that created, changed or deleted it. JSON rows {version, kind (save | commit), date, user, message, group and state for a commit}
The versions of a script, newest first: its saves and the commits that created, changed or deleted it. JSON rows {version, kind (save | commit), date, user, message, group and state for a commit}
Parameters
script: The script name - String - required
script: The script name - String - required
admin
version history "shop.vat.exe"
mentdb
[{"version": "save:2026-11-18 11:10:23", "kind": "save", "date": "2026-11-18 11:10:23", "user": "admin", "message": "saved from localhost"}, {"version": "commit:shop_dev:20261118111020_wzrtwN_7J02H9_CMT", "kind": "commit", "date": "2026-11-18 11:10:20", "user": "admin", "message": "VAT 20 %", "group": "shop_dev", "state": "created"}, {"version": "save:2026-11-18 11:10:18", "kind": "save", "date": "2026-11-18 11:10:18", "user": "admin", "message": "saved from localhost"}, {"version": "save:2026-11-18 11:09:54", "kind": "save", "date": "2026-11-18 11:09:54", "user": "admin", "message": "saved from localhost"}, {"version": "save:2026-11-18 11:09:16", "kind": "save", "date": "2026-11-18 11:09:16", "user": "admin", "message": "saved from localhost"}, {"version": "save:2026-11-18 11:09:15", "kind": "save", "date": "2026-11-18 11:09:15", "user": "admin", "message": "saved from localhost"}]
version history <script> <options>
Description
The versions with options: limit (100, 10000 at most), kind (all, save or commit)
The versions with options: limit (100, 10000 at most), kind (all, save or commit)
Parameters
script: The script name - String - required
options: JSON options - String - required
script: The script name - String - required
options: JSON options - String - required
admin
version history "shop.vat.exe" "{\"kind\": \"commit\", \"limit\": 10}"
mentdb
[{"version": "commit:shop_dev:20261118111020_wzrtwN_7J02H9_CMT", "kind": "commit", "date": "2026-11-18 11:10:20", "user": "admin", "message": "VAT 20 %", "group": "shop_dev", "state": "created"}]
version get <script> <version>
Description
The MQL of a version (script merge, and for a commit the delay and stack settings too)
The MQL of a version (script merge, and for a commit the delay and stack settings too)
Parameters
script: The script name - String - required
version: A version: current, save: (a save of the table history; #<6 hexadecimal characters> after the date when several saves share the same second) or commit:: - String - required
script: The script name - String - required
version: A version: current, save:
admin
version get "shop.vat.exe" "commit:shop_dev:20261118111020_wzrtwN_7J02H9_CMT"
mentdb
script merge "shop.vat.exe" false 1 (param (var "[amount]" {true} "amount without tax" is_null:false is_empty:false "100") ;) "Amount with VAT" {* [amount] 1.2;} "120"; script set delay "shop.vat.exe" 0 day {1};
version diff <script> <from>
Description
The changes of the code of a script from a version to the current one, as a unified diff (empty when identical)
The changes of the code of a script from a version to the current one, as a unified diff (empty when identical)
Parameters
script: The script name - String - required
from: The version to compare - String - required
script: The script name - String - required
from: The version to compare - String - required
admin
version diff "shop.vat.exe" "commit:shop_dev:20261118111020_wzrtwN_7J02H9_CMT"
mentdb
--- commit:shop_dev:20261118111020_wzrtwN_7J02H9_CMT +++ current @@ -1,4 +1,4 @@ script merge "shop.vat.exe" false 1 (param (var "[amount]" {true} "amount without tax" is_null:false is_empty:false "100") ;) "Amount with VAT" -{* [amount] 1.2;} "120"; +{* [amount] 1.085;} "108.5";
version diff <script> <from> <to>
Description
The changes from a version to another one
The changes from a version to another one
Parameters
script: The script name - String - required
from: The first version - String - required
to: The second version (current by default) - String - required
script: The script name - String - required
from: The first version - String - required
to: The second version (current by default) - String - required
admin
version diff "shop.vat.exe" "commit:shop_dev:20261118111020_wzrtwN_7J02H9_CMT" "current"
mentdb
--- commit:shop_dev:20261118111020_wzrtwN_7J02H9_CMT +++ current @@ -1,4 +1,4 @@ script merge "shop.vat.exe" false 1 (param (var "[amount]" {true} "amount without tax" is_null:false is_empty:false "100") ;) "Amount with VAT" -{* [amount] 1.2;} "120"; +{* [amount] 1.085;} "108.5";
version diff <script> <from> <to> <options>
Description
The changes with options: format (unified, json or html), context (lines around a change), full (true: also the delay and stack settings), ignore_whitespace (none, trailing or all)
The changes with options: format (unified, json or html), context (lines around a change), full (true: also the delay and stack settings), ignore_whitespace (none, trailing or all)
Parameters
script: The script name - String - required
from: The first version - String - required
to: The second version - String - required
options: JSON options - String - required
script: The script name - String - required
from: The first version - String - required
to: The second version - String - required
options: JSON options - String - required
admin
version diff "shop.vat.exe" "commit:shop_dev:20261118111020_wzrtwN_7J02H9_CMT" "current" "{\"format\": \"json\", \"context\": 1}"
mentdb
{"mode": "lines", "identical": false, "added": 1, "removed": 1, "minimal": true, "unified": "--- commit:shop_dev:20261118111020_wzrtwN_7J02H9_CMT\ +++ current\ @@ -3,2 +3,2 @@\ \"Amount with VAT\" \ -{* [amount] 1.2;} \"120\";\ +{* [amount] 1.085;} \"108.5\";\ ", "hunks": [{"header": "@@ -3,2 +3,2 @@", "old_start": 3, "old_lines": 2, "new_start": 3, "new_lines": 2, "changes": [{"op": "context", "old_line": 3, "new_line": 3, "text": " \"Amount with VAT\" "}, {"op": "delete", "old_line": 4, "new_line": null, "text": "{* [amount] 1.2;} \"120\";"}, {"op": "insert", "old_line": null, "new_line": 4, "text": "{* [amount] 1.085;} \"108.5\";"}]}]}
version restore_group <group> <commit_id>
Description
Put every script of a group back to its state at a commit. The current state is committed first (Before restoring), so it can be undone. A script created after the commit is kept. JSON {group, commit, dry_run, before_commit, scripts: rows {script, action}}
Put every script of a group back to its state at a commit. The current state is committed first (Before restoring
Parameters
group: The group - String - required
commit_id: The commit id (version show_commits) - String - required
group: The group - String - required
commit_id: The commit id (version show_commits) - String - required
admin
version restore_group "shop_dev" "20261118111020_wzrtwN_7J02H9_CMT" "{\"dry_run\": true}"
mentdb
{"before_commit":null,"commit":"20261118111020_wzrtwN_7J02H9_CMT","dry_run":true,"scripts":[{"action":"restored","script":"shop.vat.exe"}],"group":"shop_dev"}
version restore_group <group> <commit_id> <options>
Description
Restore a group with options: dry_run (true: only the plan), delete_new (true: delete the scripts created after the commit)
Restore a group with options: dry_run (true: only the plan), delete_new (true: delete the scripts created after the commit)
Parameters
group: The group - String - required
commit_id: The commit id (version show_commits) - String - required
options: JSON options - String - required
group: The group - String - required
commit_id: The commit id (version show_commits) - String - required
options: JSON options - String - required
admin
version restore_group "shop_dev" "20261118111020_wzrtwN_7J02H9_CMT" "{\"dry_run\": true, \"delete_new\": true}"
mentdb
{"before_commit":null,"commit":"20261118111020_wzrtwN_7J02H9_CMT","dry_run":true,"scripts":[{"action":"restored","script":"shop.vat.exe"}],"group":"shop_dev"}
version restore <script> <version>
Description
Put a version of a script back. The current version stays in the saves (version history), so a restore can be undone by restoring it. JSON {script, version, changed}
Put a version of a script back. The current version stays in the saves (version history), so a restore can be undone by restoring it. JSON {script, version, changed}
Parameters
script: The script name - String - required
version: A version: current, save: (a save of the table history; #<6 hexadecimal characters> after the date when several saves share the same second) or commit:: - String - required
script: The script name - String - required
version: A version: current, save:
admin
version restore "shop.vat.exe" "commit:shop_dev:20261118111020_wzrtwN_7J02H9_CMT"
mentdb
{"version":"commit:shop_dev:20261118111020_wzrtwN_7J02H9_CMT","script":"shop.vat.exe","changed":true}
