SVCS - English Documentation
Loading...
Searching...
No Matches
RepoCommand.cxx File Reference

Implementation of the RepoCommand class for managing remote configurations. More...

#include "../include/RepoCommand.hxx"
#include "../../services/Event.hxx"
#include <iostream>

Namespaces

namespace  svcs::server
 Server-side components and administration commands.
namespace  svcs::server::cli
 Server administration command-line interface components.

Detailed Description

Implementation of the RepoCommand class for managing remote configurations.

This file implements the concrete logic for the "svcs repo" command. It primarily delegates its core functionality—adding, removing, renaming, and listing remotes— to the RemoteManager class. The implementation includes:

  1. Repository Context Check: Ensures the command is run inside an initialized SVCS repository.
  2. Subcommand Dispatch: Parses the first argument to determine which handler (handleAdd, handleRemove, etc.) to call.
  3. Argument Validation: Performs specific argument count checks for each subcommand.
  4. User Output: Directly prints confirmation messages (std::cout) or uses the ISubject event bus for errors and informational messages.