-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
READY : (willbe): Add "publish_diff" command and related functions #1230
Conversation
Created a new function called "publish_diff" in publish_diff.rs, registered it as a new command in mod.rs, and added related functions in package.rs. This "publish_diff" feature compares local and published versions of a specific package.
59530f5
to
2edeb1f
Compare
The publish_diff function in publish_diff.rs module has been updated to enhance the package publication capability. The underlying crate comparison logic in package.rs module has also been optimized for better performance. Now, instead of listing the differences byte by byte, files are being compared which makes the DiffReport response more readable and concise.
In the entity package, a sort function has been incorporated into the for loop to sort the diffs. This sort function is sorted by key, assisted by a match pattern which covers all types of diffs including Modified, Same, Rem, and Add.
The commit adds the capturing of the stderr output from a process in the process tools module. It includes error handling for cases when the output contains invalid UTF-8. If such an error is encountered, the function will now return an error report.
mod private | ||
{ | ||
use std::path::PathBuf; | ||
use crate::*; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
!
|
||
use wca::Args; | ||
use wtools::error::Result; | ||
use crate::_path::AbsolutePath; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
!
use std::path::PathBuf; | ||
use crate::*; | ||
|
||
use { wtools }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
!
@@ -34,6 +34,18 @@ pub( crate ) mod private | |||
.routine( command::publish ) | |||
.end() | |||
|
|||
// qqq : for Barsik : provide hints | |||
.command( "publish.diff" ) | |||
.hint( "---" ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
?
The commit introduces a new functionality to compare local and remote package versions and generate a detailed report of changes. The comparison looks at each file, stating whether it's been added, removed, or modified. Now, users can see how their local package version is different from the remote one. Command line hints were updated to guide users through this feature.
No description provided.