<pre style='margin:0'>
Joshua Root (jmroot) pushed a commit to branch master
in repository macports-base.
</pre>
<p><a href="https://github.com/macports/macports-base/commit/3c33b94f4d2d7ea2e318f96957dc38c3a905ae18">https://github.com/macports/macports-base/commit/3c33b94f4d2d7ea2e318f96957dc38c3a905ae18</a></p>
<pre style="white-space: pre; background: #F8F8F8">The following commit(s) were added to refs/heads/master by this push:
<span style='display:block; white-space:pre;color:#404040;'> new 3c33b94f4 snapshot: handle unknown args better
</span>3c33b94f4 is described below
<span style='display:block; white-space:pre;color:#808000;'>commit 3c33b94f4d2d7ea2e318f96957dc38c3a905ae18
</span>Author: Joshua Root <jmr@macports.org>
AuthorDate: Mon Jul 22 11:11:07 2024 +1000
<span style='display:block; white-space:pre;color:#404040;'> snapshot: handle unknown args better
</span>---
src/macports1.0/snapshot.tcl | 18 +++++++++++++-----
1 file changed, 13 insertions(+), 5 deletions(-)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/src/macports1.0/snapshot.tcl b/src/macports1.0/snapshot.tcl
</span><span style='display:block; white-space:pre;color:#808080;'>index ef119b6b7..53ff52626 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/src/macports1.0/snapshot.tcl
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/src/macports1.0/snapshot.tcl
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -34,6 +34,14 @@ package require macports 1.0
</span> package require registry 1.0
namespace eval snapshot {
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ proc print_usage {} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_msg "Usage: One of:"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_msg " port snapshot \[--create\] \[--note '<message>'\]"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_msg " port snapshot --list"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_msg " port snapshot --diff <snapshot-id> \[--all\]"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_msg " port snapshot --delete <snapshot-id>"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> proc main {opts} {
# Function to create a snapshot of the current state of ports.
#
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -60,11 +68,7 @@ namespace eval snapshot {
</span> }
if {[dict exists $opts ports_snapshot_help]} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- ui_msg "Usage: One of:"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ui_msg " port snapshot \[--create\] \[--note '<message>'\]"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ui_msg " port snapshot --list"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ui_msg " port snapshot --diff <snapshot-id> \[--all\]"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ui_msg " port snapshot --delete <snapshot-id>"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ print_usage
</span> return 0
}
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -171,6 +175,10 @@ namespace eval snapshot {
</span> "delete" {
return [delete_snapshot $opts]
}
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ default {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ print_usage
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return 1
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span> }
}
</pre><pre style='margin:0'>
</pre>