DManager.DManagerRepository

Undocumented in source.

Constructors

this
this()
Undocumented in source.

Members

Functions

log
void log(string s)
Undocumented in source. Be warned that the author may not have intended to support it.

Inherited Members

From ManagedRepository

git
Repository git;

Git repository we manage.

offline
bool offline;

Should we fetch the latest stuff?

verify
bool verify;

Verify working tree state to make sure we don't clobber user changes?

needRepo
void needRepo()

Ensure we have a repository.

name
string name [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
needHead
void needHead(string hash)

Ensure the repository's HEAD is as indicated.

getRef
string getRef(string name)

Returns the SHA1 of the given named ref.

getHead
string getHead()

Return the commit the repository HEAD is pointing at. Cache the result.

performCheckout
void performCheckout(string hash)
Undocumented in source. Be warned that the author may not have intended to support it.
needCommit
void needCommit(string hash)

Ensure that the specified commit is fetched.

update
void update()

Update the remote.

clean
bool clean;
Undocumented in source.
needClean
void needClean()

Ensure the repository's working copy is clean.

getMerge
string getMerge(string base, string branch)

Returns the hash of the merge between the base and branch commits. Performs the merge if necessary. Caches the result.

getRevert
string getRevert(string base, string branch, int mainline)

Returns the resulting hash when reverting the branch from the base commit. Performs the revert if necessary. Caches the result. mainline is the 1-based mainline index (as per man git-revert), or 0 if commit is not a merge commit.

getMergeInfo
MergeInfo getMergeInfo(string merge)

Finds and returns the merge parents of the given merge commit. Queries the git repository if necessary. Caches the result.

getUnMerge
string getUnMerge(string head, string branch)

Follows the string of merges starting from the given head commit, up till the merge with the given branch. Then, reapplies all merges in order, except for that with the given branch.

getRemoteRef
string getRemoteRef(string remote, string remoteRef, string localRef)

Return SHA1 of the given remote ref. Fetches the remote first, unless offline mode is on.

getPull
string getPull(int pull)

Return SHA1 of the given pull request #. Fetches the pull request first, unless offline mode is on.

getFork
string getFork(string user, string branch)

Return SHA1 of the given GitHub fork. Fetches the fork first, unless offline mode is on. (This is a thin wrapper around getRemoteBranch.)

getChild
void getChild(string branch, string commit, string child, int mainline)

Find the child of a commit, and, if the commit was a merge, the mainline index of said commit for the child.

FileState
struct FileState
Undocumented in source.
getFileState
FileState getFileState(string file)
Undocumented in source. Be warned that the author may not have intended to support it.
RepositoryState
alias RepositoryState = FileState[string]
Undocumented in source.
getState
RepositoryState getState()

Return the working tree "state". This returns a file list, along with size and modification time.

saveState
void saveState()

Save the state of the working tree for versioned files to a .json file, which can later be verified with checkState. This should be called after any git command which mutates the git state.

saveFileState
void saveFileState(string file)

Save the state of just one file. This should be called after automatic edits to repository files during a build. The file parameter should be relative to the directory root, and use forward slashes.

checkState
void checkState()

Verify that the state of the working tree matches the one when saveState was last called. Throw an exception otherwise. This and clearState should be called before any git command which destroys working directory changes.

clearState
void clearState()

Delete the saved working tree state, if any.

reset
void reset()

Reset internal state.

log
void log(string line)

Override to add logging.

Meta