Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions guw/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand All @@ -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()

Expand Down Expand Up @@ -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")
Expand Down Expand Up @@ -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,
Expand Down
Loading