Version Control System Utilities (rever.vcsutils)¶
Some version control utilities for rever
Returns a set of (author, email) tuples
-
rever.vcsutils.checkout(*args, **kwargs)¶ Checks out a revision.
-
rever.vcsutils.commit(*args, **kwargs)¶ Commits a revision to the repo.
Returns a dictionary mapping author names to commits
-
rever.vcsutils.commits_per_email(*args, **kwargs)¶ Returns a dictionary mapping emails to commits
-
rever.vcsutils.current_branch(*args, **kwargs)¶ Returns the current branch for the user’s version control system.
-
rever.vcsutils.current_rev(*args, **kwargs)¶ Returns the current revision for the user’s version control system.
-
rever.vcsutils.del_remote_tag(*args, **kwargs)¶ Deletes a tag from the remote repository.
-
rever.vcsutils.del_tag(*args, **kwargs)¶ Deletes a tag from the local repository.
-
rever.vcsutils.first_commit_per_email(*args, **kwargs)¶ Returns a dictionary mapping emails to the datetime of its first commit
Returns a set of (author, email) tuples
-
rever.vcsutils.git_checkout(rev)¶ Checks out a branch name, tag, or other revision.
-
rever.vcsutils.git_commit(message='Rever commit')¶ Commits to the repo.
Returns a dictionary mapping author names to commits
-
rever.vcsutils.git_commits_per_email(since=None)¶ Returns a dictionary mapping emails to commits. Accepts a “since” argument, which specifies the lower boundary.
-
rever.vcsutils.git_current_branch()¶ Returns the current branch for git
-
rever.vcsutils.git_current_rev()¶ Obtains the current git revison hash for storage and rewinding purposes.
-
rever.vcsutils.git_del_remote_tag(tag, remote)¶ Deletes a tag from a remote repo
-
rever.vcsutils.git_del_tag(tag)¶ Deletes a tag from the local repo
-
rever.vcsutils.git_first_commit_per_email()¶ Returns a dictionary mapping emails to the datetime of its first commit
-
rever.vcsutils.git_have_push_permissions(remote)¶ Checks that we have push permission to a remote repository.
-
rever.vcsutils.git_latest_tag()¶ Returns the most recent tag in the repo.
-
rever.vcsutils.git_merge(src, into)¶ Merges commits from a src branch into another branch.
-
rever.vcsutils.git_push(remote, target)¶ Pushes up to a remote and target branch
Pushes up tags to a remote
-
rever.vcsutils.git_reset_hard(rev)¶ Performs a git reset –hard to a revision.
-
rever.vcsutils.git_root()¶ Returns the root repository directory from git
-
rever.vcsutils.git_tag(tag)¶ Tags the current head, forcibly.
-
rever.vcsutils.git_track(files)¶ Adds a list of files to the repo.
-
rever.vcsutils.have_push_permissions(*args, **kwargs)¶ Checks that we have push permission to a remote repository.
-
rever.vcsutils.latest_tag(*args, **kwargs)¶ Returns the most recent tag in the repo.
-
rever.vcsutils.make_vcs_dispatcher(vcsfuncs, name='vcs_dispatcher', doc='dispatches to a version control function', err='no func for handling the version contol system !{r}')¶ Creates a function that dispatches to different version control systems, depending on the users setting for $REVER_VCS.
- Parameters
- vcsfuncsdict
Maps the string names of version control systems (e.g. ‘git’ or ‘hg’) to a function for handling that particular action.
- namestr, optional
Dispatcher funtion name.
- docstr, optional
Doctring for the dispatcher.
- errstr, optional
Error message if the version control system name is not found in vcsfuncs. This is formatted with the value of $REVER_VCS.
- Returns
- vcs_dispatcherfunction
-
rever.vcsutils.merge(*args, **kwargs)¶ Merges one revision into another.
-
rever.vcsutils.push(*args, **kwargs)¶ Pushes up to a remote URL a target branch or revision.
Pushes up tags to a remote URL.
-
rever.vcsutils.rewind(*args, **kwargs)¶ Returns the version control system to a previous state.
-
rever.vcsutils.root(*args, **kwargs)¶ Returns the root repository directory.
-
rever.vcsutils.tag(*args, **kwargs)¶ Tags the current head.
-
rever.vcsutils.track(*args, **kwargs)¶ Specify files to track in the repo.