• Home
  • Raw
  • Download

Lines Matching full:remote

34 # remote: git remote name (e.g., 'origin',
36 # ref: git remote/local ref name (e.g., 'refs/heads/master').
39 '_RemoteRef', ('remote', 'ref', 'project_name'))
43 """Object representing a remote ref."""
45 def __new__(cls, remote, ref, project_name=None): argument
46 return super(RemoteRef, cls).__new__(cls, remote, ref, project_name)
68 def IsSubmoduleCheckoutRoot(path, remote, url): argument
73 remote: The remote to compare the |url| with.
74 url: The exact URL the |remote| needs to be pointed at.
78 ['git', '--git-dir', path, 'config', 'remote.%s.url' % remote],
245 def NormalizeRemoteRef(remote, ref): argument
246 """Convert git branch refs into fully qualified remote form."""
248 # Support changing local ref to remote ref, or changing the remote
249 # for a remote ref.
253 ref = 'refs/remotes/%s/%s' % (remote, ref)
275 remote = self['remote']
276 raise AssertionError('Remote %s is not pushable.' % (remote,))
294 if (self['remote'] not in site_params.CROS_REMOTES or
295 self['remote'] not in site_params.BRANCHABLE_PROJECTS):
297 return re.match(site_params.BRANCHABLE_PROJECTS[self['remote']],
338 remotes: A dictionary mapping <remote> tags to the associated attributes.
394 elif name == 'remote':
450 for key in ('remote', 'revision'):
453 remote = attrs['remote']
454 assert remote in self.remotes, ('%s: %s not in %s' %
455 (self.source, remote, self.remotes))
456 remote_name = attrs['remote_alias'] = self.remotes[remote]['alias']
479 attrs['pushable'] = remote in site_params.GIT_REMOTES
481 attrs['push_remote'] = remote
482 attrs['push_remote_url'] = site_params.GIT_REMOTES[remote]
784 added automatically. If you wished to run 'git remote update',
785 this would be ['remote', 'update'] for example.
820 branch: Branch to use for the initial HEAD. Defaults to the remote's HEAD.
847 RunGit(git_repo, ['remote', 'add', 'origin', git_url])
893 output = RunGit(git_repo, ['ls-remote', git_repo, namespace + '*']).output
933 """Pull the remote and upstream branch of a local branch
938 for_checkout: Whether to return localized refspecs, or the remote's
945 remote=. (aka locals). This is enabled by default, and is what allows
958 r'branch\.%s\.(remote|merge)' % re.escape(branch)]
970 elif 'remote' not in vals:
971 # Repo v1.9.4 and up occasionally invalidly leave the remote out.
973 vals['remote'] = 'origin'
974 remote, rev = vals['remote'], vals['merge']
979 return RemoteRef(remote, rev)
989 elif remote == '.':
999 rev = 'refs/remotes/%s/%s' % (remote, StripRefsHeads(rev))
1000 return RemoteRef(remote, rev)
1014 for_checkout: Whether to return localized refspecs, or the remote's
1015 view of it. Note that depending on the remote, the remote may differ
1017 for_push: Controls whether the remote and refspec returned is explicitly
1039 remote = checkout['push_remote']
1041 remote = checkout['remote']
1052 return RemoteRef(remote, revision, project_name=project_name)
1077 fallback: If true and no remote/branch could be discerned, return
1079 Note that depending on the remote, the remote may differ
1081 for_push: Controls whether the remote and refspec returned is explicitly
1308 def UploadCL(git_repo, remote, branch, local_branch='HEAD', draft=False, argument
1314 remote: The remote to upload the CL to.
1326 remote_ref = RemoteRef(remote, ref)
1338 refspec: The local ref to push to the remote.
1339 push_to: A RemoteRef object representing the remote ref to push to.
1341 dry_run: If True, do everything except actually push the remote ref.
1344 avoids e.g. remote access checks that still apply to |dry_run|.
1346 cmd = ['push', push_to.remote, '%s:%s' % (refspec, push_to.ref)]
1367 sync: Update remote before creating push branch.
1377 cmd = ['remote', 'update', remote_push_branch.remote]
1383 def SyncPushBranch(git_repo, remote, target, use_merge=False, **kwargs): argument
1384 """Sync and rebase or merge a local push branch to the latest remote version.
1388 remote: The remote returned by GetTrackingBranch(for_push=True)
1390 start with refs/remotes/ (specifically must be a proper remote
1393 date with remote branch. Otherwise, use rebase.
1401 'This is highly indicative of an internal bug. remote %s, %s %s'
1402 % (subcommand, remote, subcommand, target))
1404 cmd = ['remote', 'update', remote]
1425 with a local change committed ready to push to the remote branch. Must
1448 remote_ref = RemoteRef(remote=remote_ref.remote,
1462 SyncPushBranch(git_repo, remote_ref.remote, local_ref.ref)
1471 git_repo, remote_ref.remote, branch, remote_ref.ref)
1494 refresh_upstream: If True, run a remote update prior to checking it out.
1499 RunGit(git_repo, ['remote', 'update', remote_ref.remote])
1504 """Returns the remote branch associated with chromite."""