• Home
  • Raw
  • Download

Lines Matching full:git

18     """Exceptions raised for general git errors."""
22 """Exceptions raised for git clone errors."""
26 """Exception raised for git fetch errors."""
30 """Exception raised for git pull errors."""
34 """Exception raised for git reset errors."""
38 """Exception raised for git commit errors."""
42 """Exception raised for git push errors."""
47 This class represents a git repo.
49 It is used to pull down a local copy of a git repo, check if the local
59 @param giturl: master repo git url.
61 @param abs_work_tree: work tree of the git repo. In the
62 absence of a work tree git manipulations will occur
64 In such repos the -git-dir option should point to
65 the .git directory and -work-tree should point to
69 (.git) in the same directory. This class assumes non-bare
74 'git repository')
79 "a web URL for your git repos", DeprecationWarning)
81 # path to .git dir
82 self.gitpath = utils.sh_escape(os.path.join(self.repodir,'.git'))
84 # Find git base command. If not found, this will throw an exception
85 self.git_base_cmd = os_dep.command('git')
100 'constructed with a git URL.')
106 The command we use to run git cannot be set. It is reconstructed
109 # base git command , pointing to gitpath git dir
110 gitcmdbase = '%s --git-dir=%s' % (self.git_base_cmd,
133 Wrapper for a git command.
135 @param cmd: Git subcommand (ex 'clone').
152 logging.error('git command failed: %s: %s',
175 logging.info('Cloning git repo %s', self.giturl)
187 raise GitCloneError('Failed to clone git url', rv)
198 @param rebase: If true forces git pull to perform a rebase instead of a
202 logging.info('Updating git repo %s', self.giturl)
211 e_msg = 'Failed to pull git repo data'
232 @param remote: The git remote to upload the CL.
238 @return: Git command result stderr.
249 @param remote: The git remote to push the CL.
254 @return: Git command result stderr.
273 Reset repo to the given branch or git sha.
275 @param branch_or_sha: Name of a local or remote branch or git sha.
286 Reset repo to HEAD@{0} by running git reset --hard HEAD.
330 # stale. (e.g., you just untarred the whole git folder that you got from
362 This method overrides baseclass get so we can do proper git
364 this method will leave an up-to-date version of git repo at
385 Get the top commit hash of the current local git branch.
387 @return: Top commit hash of local git branch
396 Get the top commit hash of the current remote git branch.
398 @return: Top commit hash of remote git branch
425 Return whether the git repo was already initialized.
427 Counts objects in .git directory, since these will exist even if the
482 raise error.CmdError('Failed to find git sha1 revision', gitlog)
489 Check out the git commit id, branch, or tag given by remote.
495 @note: For git checkout tag git version >= 1.5.0 is required
508 raise error.CmdError('Failed to checkout git branch', gitlog)
533 raise error.CmdError('Failed to get git branch', gitlog)
544 Return the current status of the git repo.
556 raise error.CmdError('Failed to get git status', gitlog)
563 Return the git config value for the given option name.
565 @option_name: The name of the git option to get.
572 raise error.CmdError('Failed to get git config %', option_name)
579 Return repository git remote name.
585 raise error.CmdError('Failed to run git remote.')