Compare commits

..

No commits in common. "60139a1874ee183d7d8a691268c8d67fb4801c32" and "31211516cbb924d5798e0cf28f30f5825471a54a" have entirely different histories.

3 changed files with 2 additions and 29 deletions

View file

@ -40,7 +40,6 @@ int main(string[] args)
) )
.add(new Command("status", "Checking the status of tracked files")) .add(new Command("status", "Checking the status of tracked files"))
.add(new Command("diff", "Show changed data")) .add(new Command("diff", "Show changed data"))
.add(new Command("size", "Size of snapshots"))
.add(new Command("import", "Import snapshot from a tar.gz archive") .add(new Command("import", "Import snapshot from a tar.gz archive")
.add(new Argument("archive", "The path to the tar.gz archive file").required) .add(new Argument("archive", "The path to the tar.gz archive file").required)
.add(new Option("c", "comment", "Specify comment") .add(new Option("c", "comment", "Specify comment")
@ -139,7 +138,7 @@ int main(string[] args)
.optional .optional
) )
) )
.add(new Option("c", "config", "Configuration file path") .add(new Option("c", "config", "Сonfiguration file path")
.optional .optional
.validateEachWith( .validateEachWith(
opt => opt.exists && opt.isFile, opt => opt.exists && opt.isFile,
@ -169,9 +168,6 @@ int main(string[] args)
.on("diff", diff => .on("diff", diff =>
snag.diff() snag.diff()
) )
.on("size", size =>
snag.size()
)
.on("status", status => .on("status", status =>
snag.status() snag.status()
) )
@ -235,12 +231,6 @@ int main(string[] args)
} catch (SnagException e) { } catch (SnagException e) {
e.print(); e.print();
return EXIT_FAILURE; return EXIT_FAILURE;
} catch (Exception e) {
writeln(
"AN UNEXPECTED ERROR HAS OCCURRED! PLEASE REPORT IT TO THE AUTHOR OF THE SNAG!\n\n",
e
);
return EXIT_FAILURE;
} }
return EXIT_SUCCESS; return EXIT_SUCCESS;

View file

@ -442,21 +442,4 @@ class Snag {
writeln("Import completed successfully: ", newSnapshot); writeln("Import completed successfully: ", newSnapshot);
} }
void size() {
try {
"Total size of the snapshots is: %.2f MB".writefln(
dirEntries(_config.git, SpanMode.depth)
.filter!(path => path.isFile)
.array
.map!(path => path.getSize)
.sum / (1024.0 * 1024.0)
);
} catch (Exception e) {
throw new SnagException(
"Error while checking the snapshots size:\n\t"
~ e.msg
);
}
}
} }

View file

@ -1,3 +1,3 @@
module snag.version_; module snag.version_;
enum snagVersion = "0.0.13"; enum snagVersion = "0.0.12";