• Home
  • Raw
  • Download

Lines Matching +full:import +full:- +full:local

3 # Use of this source code is governed by a BSD-style license that can be
8 import os
9 import re
10 import shutil
11 import subprocess
12 import tempfile
14 import utils
18 """Class to manage local git configs."""
27 'git', 'config', '--local', k]).decode('utf-8').rstrip()
33 subprocess.check_call(['git', 'config', '--local', k, v])
39 ['git', 'config', '--local', k, self._previous_values[k]])
41 subprocess.check_call(['git', 'config', '--local', '--unset', k])
62 subprocess.check_call(['git', 'reset', '--hard', 'HEAD'])
65 'git', 'branch']).decode('utf-8').split():
66 subprocess.check_call(['git', 'branch', '-D', self._branch_name])
67 subprocess.check_call(['git', 'checkout', '-b', self._branch_name,
68 '-t', 'origin/main'])
73 subprocess.check_call(['git', 'commit', '-a', '-m', self._commit_msg])
74 upload_cmd = ['git', 'cl', 'upload', '-f', '--bypass-hooks',
75 '--bypass-watchlists']
78 upload_cmd.extend(['-t', 'Patch set %d' % self._patch_set])
80 upload_cmd.append('--use-commit-queue')
81 # Need the --send-mail flag to publish the CL and remove WIP bit.
82 upload_cmd.append('--send-mail')
84 upload_cmd.extend(['--cc=%s' % ','.join(self._cc_list)])
87 'git', 'cl', 'issue']).decode('utf-8').rstrip()
100 subprocess.check_call(['git', 'branch', '-D', self._branch_name])
104 """Creates a new local checkout of a Git repository."""
106 def __init__(self, repository, local=None): argument
107 """Set parameters for this local copy of a Git repository.
121 'https://skia.googlesource.com/common') or path to a local repository
123 local: optional path to an existing copy of the remote repo on local disk.
124 If provided, the initial clone is performed with the local copy as the
131 self._local = local
139 """Returns the root directory containing the checked-out files."""
143 """Check out a new local copy of the repository.
152 repo_name = remote.split('/')[-1]
154 repo_name = repo_name[:-len('.git')]
159 'git', 'remote', 'set-url', 'origin', self._repository])
162 subprocess.check_call(['git', 'reset', '--hard', 'origin/main'])