From ca6be3bd75eb6f54e00e245e93814db8b34aa724 Mon Sep 17 00:00:00 2001 From: Thomas Adam Date: Mon, 27 Jul 2020 09:30:55 +0100 Subject: [PATCH 1/2] copy: add slug_perm to output When using the copy command to copy packages between repositories, the unique ID (slug_perm) of the package wasn't being printed to stdout. As with other commands (such as 'push') which did, the output of this could then be parsed to further operate on the specific package. Therefore, make the output from 'copy' behave in the same way. --- cloudsmith_cli/cli/commands/copy.py | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/cloudsmith_cli/cli/commands/copy.py b/cloudsmith_cli/cli/commands/copy.py index ac953970..56950365 100644 --- a/cloudsmith_cli/cli/commands/copy.py +++ b/cloudsmith_cli/cli/commands/copy.py @@ -71,14 +71,26 @@ def copy( ), maybe_spinner(opts), ): - _, new_slug = copy_package( + slug_perm, new_slug = copy_package( owner=owner, repo=source, identifier=slug, destination=destination ) click.secho("OK", fg="green", err=use_stderr) + click.echo( + "Copied: {owner}/{repo}/{slug} ({slug_perm})".format( + owner=click.style(owner, fg="magenta"), + repo=click.style(destination, fg="magenta"), + slug=click.style(new_slug, fg="green"), + slug_perm=click.style(slug_perm, bold=True), + ), + err=use_stderr, + ) + if no_wait_for_sync: - utils.maybe_print_status_json(opts, {"slug": new_slug, "status": "OK"}) + utils.maybe_print_status_json( + opts, {"slug": new_slug, "slug_perm": slug_perm, "status": "OK"} + ) return wait_for_package_sync( @@ -92,4 +104,6 @@ def copy( attempts=sync_attempts, ) - utils.maybe_print_status_json(opts, {"slug": new_slug, "status": "OK"}) + utils.maybe_print_status_json( + opts, {"slug": new_slug, "slug_perm": slug_perm, "status": "OK"} + ) From c7ee1ac885fb1f511b82b7b40326d7081b281a71 Mon Sep 17 00:00:00 2001 From: Bartosz Blizniak Date: Wed, 26 Aug 2026 09:51:14 +0100 Subject: [PATCH 2/2] docs: record copy slug_perm output in changelog Co-authored-by: Cursor --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c08c2ba0..468d88c1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ## [Unreleased] +### Changed + +- `cloudsmith copy` now prints `Copied: owner/repo/slug (slug_perm)` after a successful copy and includes `slug_perm` in `-F json` output, matching `push`. + ## [1.25.0] - 2026-08-24 ### Added