You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ObjectsTreeError::SerializationError(format!("Change '{change_id}' not found"))
96
+
})?;
97
+
98
+
// Check if the top change is local status
99
+
if change.status != ChangeStatus::Local{
100
+
info!(
101
+
"Top change '{}' is not local status (status: {:?}), returning error",
102
+
change.name, change.status
103
+
);
104
+
returnOk(v_error(
105
+
E_INVARG.msg("No local change on top of index - nothing to do"),
106
+
));
107
+
}
108
+
109
+
change
110
+
}else{
111
+
info!("No top change found, returning error");
68
112
returnOk(v_error(
69
-
E_INVARG.msg("No local change on top of index - nothing to do"),
113
+
E_INVARG.msg("No change on top of index - nothing to do"),
70
114
));
71
115
}
116
+
};
72
117
73
-
info!("Getting status for local change: {}", current_change.id);
118
+
info!("Getting status for change: {} ({})", current_change.name, current_change.id);
74
119
75
-
// Build the ObjectDiffModel by comparing local change against the compiled state below it
76
-
let diff_model = build_object_diff_from_change(&self.database,¤t_change)?;
120
+
// Build the ObjectDiffModel by comparing change against the compiled state
121
+
let diff_model = build_object_diff_from_change(&self.database,¤t_change)?;
77
122
78
-
// Convert to MOO Var and return
79
-
let status_map = diff_model.to_moo_var();
123
+
// Convert to MOO Var and return
124
+
let status_map = diff_model.to_moo_var();
80
125
81
-
info!(
82
-
"Successfully retrieved change status for '{}'",
83
-
current_change.name
84
-
);
85
-
Ok(status_map)
86
-
}else{
87
-
info!("No top change found, returning error");
88
-
Ok(v_error(
89
-
E_INVARG.msg("No change on top of index - nothing to do"),
90
-
))
91
-
}
126
+
info!(
127
+
"Successfully retrieved change status for '{}'",
128
+
current_change.name
129
+
);
130
+
Ok(status_map)
92
131
}
93
132
}
94
133
@@ -98,38 +137,62 @@ impl Operation for ChangeStatusOperation {
98
137
}
99
138
100
139
fndescription(&self) -> &'staticstr{
101
-
"Lists all objects that have been modified in the current change (added, modified, deleted, renamed)"
140
+
"Lists all objects that have been modified in a change (added, modified, deleted, renamed). Can query current change or a specific change by ID."
102
141
}
103
142
104
143
fnresponse_content_type(&self) -> &'staticstr{
105
144
"text/x-moo"
106
145
}
107
146
108
147
fnphilosophy(&self) -> &'staticstr{
109
-
"Provides a summary of all pending changes in your current local changelist. This is your primary\
110
-
tool for reviewing what you've done before submitting - it shows which objects have been added,\
111
-
modified, deleted, or renamed. The operation returns an ObjectDiffModel that categorizes all your\
112
-
changes, making it easy to verify your work is correct before submission. Use this regularly during\
113
-
development to track your progress and ensure you haven't accidentally modified objects you didn't\
114
-
intend to change."
148
+
"Provides a summary of all changes in a changelist. By default, it shows your current local changelist,\
149
+
which is your primary tool for reviewing what you've done before submitting. You can also query any\
150
+
specific change by ID to review historical changes, review submissions, or idle changes. The operation\
151
+
shows which objects have been added, modified, deleted, or renamed. The operation returns an ObjectDiffModel\
152
+
that categorizes all changes, making it easy to verify work is correct. Use this regularly during development\
153
+
to track your progress and ensure you haven't accidentally modified objects you didn't intend to change."
115
154
}
116
155
117
156
fnparameters(&self) -> Vec<OperationParameter>{
118
-
vec![]
157
+
vec![
158
+
OperationParameter{
159
+
name:"change_id".to_string(),
160
+
description:"Optional change ID (full 64-char hash or short 12-char prefix) to query. If not provided, queries the current top local change.".to_string(),
161
+
required:false,
162
+
},
163
+
]
119
164
}
120
165
121
166
fnexamples(&self) -> Vec<OperationExample>{
122
-
vec![OperationExample{
123
-
description:"Get status of current change".to_string(),
0 commit comments