• Home
  • Raw
  • Download

Lines Matching full:git

26     """Exceptions raised for general git errors."""
30 """Exceptions raised for git clone errors."""
34 """Exception raised for git fetch errors."""
38 """Exception raised for git pull errors."""
42 """Exception raised for git reset errors."""
46 """Exception raised for git commit errors."""
50 """Exception raised for git push errors."""
55 This class represents a git repo.
57 It is used to pull down a local copy of a git repo, check if the local
67 @param giturl: main repo git url.
69 @param abs_work_tree: work tree of the git repo. In the
70 absence of a work tree git manipulations will occur
72 In such repos the -git-dir option should point to
73 the .git directory and -work-tree should point to
77 (.git) in the same directory. This class assumes non-bare
82 'git repository')
87 "a web URL for your git repos", DeprecationWarning)
89 # path to .git dir
90 self.gitpath = utils.sh_escape(os.path.join(self.repodir,'.git'))
92 # Find git base command. If not found, this will throw an exception
93 self.git_base_cmd = os_dep.command('git')
108 'constructed with a git URL.')
114 The command we use to run git cannot be set. It is reconstructed
117 # base git command , pointing to gitpath git dir
118 gitcmdbase = '%s --git-dir=%s' % (self.git_base_cmd,
141 Wrapper for a git command.
143 @param cmd: Git subcommand (ex 'clone').
160 logging.error('git command failed: %s: %s',
183 logging.info('Cloning git repo %s', self.giturl)
195 raise GitCloneError('Failed to clone git url', rv)
206 @param rebase: If true forces git pull to perform a rebase instead of a
210 logging.info('Updating git repo %s', self.giturl)
219 e_msg = 'Failed to pull git repo data'
240 @param remote: The git remote to upload the CL.
246 @return: Git command result stderr.
257 @param remote: The git remote to push the CL.
262 @return: Git command result stderr.
281 Reset repo to the given branch or git sha.
283 @param branch_or_sha: Name of a local or remote branch or git sha.
294 Reset repo to HEAD@{0} by running git reset --hard HEAD.
338 # stale. (e.g., you just untarred the whole git folder that you got from
370 This method overrides baseclass get so we can do proper git
372 this method will leave an up-to-date version of git repo at
393 Get the top commit hash of the current local git branch.
395 @return: Top commit hash of local git branch
404 Get the top commit hash of the current remote git branch.
406 @return: Top commit hash of remote git branch
433 Return whether the git repo was already initialized.
435 Counts objects in .git directory, since these will exist even if the
490 raise error.CmdError('Failed to find git sha1 revision', gitlog)
497 Check out the git commit id, branch, or tag given by remote.
503 @note: For git checkout tag git version >= 1.5.0 is required
516 raise error.CmdError('Failed to checkout git branch', gitlog)
541 raise error.CmdError('Failed to get git branch', gitlog)
552 Return the current status of the git repo.
564 raise error.CmdError('Failed to get git status', gitlog)
571 Return the git config value for the given option name.
573 @option_name: The name of the git option to get.
580 raise error.CmdError('Failed to get git config %', option_name)
587 Return repository git remote name.
593 raise error.CmdError('Failed to run git remote.')