<pre style='margin:0'>
Umesh Singla (umeshksingla) pushed a commit to branch gsoc17-migrate
in repository macports-base.
</pre>
<p><a href="https://github.com/macports/macports-base/commit/389632cd52940d5561b67d7e0047a477ea1548c4">https://github.com/macports/macports-base/commit/389632cd52940d5561b67d7e0047a477ea1548c4</a></p>
<pre style="white-space: pre; background: #F8F8F8"><span style='display:block; white-space:pre;color:#808000;'>commit 389632cd52940d5561b67d7e0047a477ea1548c4
</span>Author: umeshksingla <umeshksingla@macports.org>
AuthorDate: Tue Oct 15 16:52:08 2019 +0200
<span style='display:block; white-space:pre;color:#404040;'> Add option to list snapshots
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> port snapshot --list
</span>---
src/port/port.tcl | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/src/port/port.tcl b/src/port/port.tcl
</span><span style='display:block; white-space:pre;color:#808080;'>index 9cce3bf..e2ff6b9 100755
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/src/port/port.tcl
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/src/port/port.tcl
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -2797,10 +2797,16 @@ proc action_reclaim { action portlist opts } {
</span> }
proc action_snapshot { action portlist opts } {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {[prefix_unwritable]} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- return 1
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ array set options $opts
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[info exists options(ports_snapshot_list)]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set snapshots [registry::snapshot get_all]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ puts $snapshots
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ foreach snapshot $snapshots {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ puts "[$snapshot note], created at [$snapshot created_at] (ID: [$snapshot id])"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return 0
</span> }
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {[catch {macports::snapshot_main $opts} result]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {![prefix_unwritable] && [catch {macports::snapshot_main $opts} result]} {
</span> ui_error $::errorInfo
return 1
}
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -4492,7 +4498,7 @@ array set cmd_opts_array {
</span> reclaim {enable-reminders disable-reminders}
fetch {no-mirrors}
bump {patch}
<span style='display:block; white-space:pre;background:#ffe0e0;'>- snapshot {{note 1}}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ snapshot {{note 1} list}
</span> restore {{snapshot-id 1} last}
migrate {continue}
}
</pre><pre style='margin:0'>
</pre>