Skip to main content

Class: SvnVcsAdapter

Defined in: packages/core/src/infrastructure/svn/vcs-adapter.ts:10

Subversion CLI implementation of the VcsAdapter port.

Shells out to the svn binary for all queries. All methods operate relative to cwd, which defaults to process.cwd() when not specified.

Implements

Constructors

Constructor

new SvnVcsAdapter(cwd?): SvnVcsAdapter

Defined in: packages/core/src/infrastructure/svn/vcs-adapter.ts:18

Creates a new SvnVcsAdapter.

Parameters

cwd?

string = ...

Working directory for svn commands; defaults to process.cwd()

Returns

SvnVcsAdapter

Methods

branch()

branch(): Promise<string>

Defined in: packages/core/src/infrastructure/svn/vcs-adapter.ts:28

Returns the name of the currently checked-out branch.

Returns "HEAD" (git) or an equivalent in detached/unknown state.

Returns

Promise<string>

Current branch name

Throws

When the current working directory is not inside a VCS repository

Implementation of

VcsAdapter.branch


isClean()

isClean(): Promise<boolean>

Defined in: packages/core/src/infrastructure/svn/vcs-adapter.ts:41

Returns true when the working tree has no uncommitted changes.

Returns

Promise<boolean>

true if working tree is clean, false if there are uncommitted changes

Throws

When the current working directory is not inside a VCS repository

Implementation of

VcsAdapter.isClean


ref()

ref(): Promise<string | null>

Defined in: packages/core/src/infrastructure/svn/vcs-adapter.ts:47

Returns the short revision identifier for the current commit/changeset.

Returns null when VCS is unavailable or the repository has no commits.

Returns

Promise<string | null>

Short revision hash/id, or null

Implementation of

VcsAdapter.ref


rootDir()

rootDir(): Promise<string>

Defined in: packages/core/src/infrastructure/svn/vcs-adapter.ts:23

Returns the absolute path to the root of the current repository.

Useful for resolving all other project-relative paths (specs, changes, archive, schemas).

Returns

Promise<string>

Absolute path to the repository root

Throws

When the current working directory is not inside a VCS repository

Implementation of

VcsAdapter.rootDir


show()

show(ref, filePath): Promise<string | null>

Defined in: packages/core/src/infrastructure/svn/vcs-adapter.ts:56

Returns the content of a file at a given revision.

Returns null when the revision or file path does not exist.

Parameters

ref

string

Revision identifier (e.g. commit hash, branch name)

filePath

string

Repository-relative path to the file

Returns

Promise<string | null>

File content as a string, or null

Implementation of

VcsAdapter.show