From 09cfa1f9fc6b69997c13d9b5caaee6a6d166e70a Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 23 Apr 2026 22:41:22 +0000 Subject: [PATCH] feat: add --interactive option to the remove subcommand Agent-Logs-Url: https://github.com/fluendo/git-upstream-workflow/sessions/65171c51-8246-4304-abb9-29d273e60e1f Co-authored-by: cfoch <1060056+cfoch@users.noreply.github.com> --- guw/main.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/guw/main.py b/guw/main.py index 69beadb..94e1b4c 100644 --- a/guw/main.py +++ b/guw/main.py @@ -378,7 +378,7 @@ def add( # Dump the new toml self.dump() - def remove(self, backup, keep, local, folder, to_remove): + def remove(self, backup, keep, local, folder, to_remove, interactive=False): feature, idx = self._get_feature_by_name(to_remove) if not feature: logger.critical(f"Feature {feature} not found") @@ -389,7 +389,7 @@ def remove(self, backup, keep, local, folder, to_remove): prev_feature = self.config["features"][idx - 1] feature["status"] = "_remove" # Sync it again - self._sync(backup, keep, local, folder, self.config["features"][idx:], prev_feature) + self._sync(backup, keep, local, folder, self.config["features"][idx:], prev_feature, interactive=interactive) # Dump the new toml self.dump() @@ -486,6 +486,9 @@ def run(): # Remove subcommand remove_args = subparser.add_parser("remove", help="Remove a feature") _common_command_arguments(remove_args) + remove_args.add_argument( + "--interactive", help="Interactive mode to allow manual conflict resolution", action="store_true" + ) remove_args.add_argument("feature", help="Name of the feature to remove") # Update subcommand update_args = subparser.add_parser("update", help="Update a feature commits with other's branch commits") @@ -532,7 +535,7 @@ def run(): args.prev_feature, ) elif args.command == "remove": - guw.remove(args.backup, args.keep, args.local, args.directory, args.feature) + guw.remove(args.backup, args.keep, args.local, args.directory, args.feature, args.interactive) elif args.command == "update": guw.update( args.backup,