Attach a remote entry to a local entry
1380
def attach(self, remote_entry):
        """"""
        self.name = remote_entry.name
        self.sha = remote_entry.sha
        self.url = remote_entry.url
        self.author = remote_entry.author
        return self
499635
protected void remoteToLocalPut(MessageItem msgItem) throws SIResourceException
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.entry(
        tc,
        "remoteToLocalPut",
        new Object[] { msgItem });

    _targetStreamManager.handleMessage(msgItem);

    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.exit(tc, "remoteToLocalPut");

  }
1285532
def attach(self, volume_id, instance_id, device_path):
        """"""
        return self.call("AttachVolume",
                         VolumeId=volume_id, InstanceId=instance_id,
                         Device=device_path)
117809
def init_remote(self):
        '''
        
        '''
        new = False
        if not os.listdir(self.cachedir):
            # Repo cachedir is empty, initialize a new repo there
            self.repo = git.Repo.init(self.cachedir)
            new = True
        else:
            # Repo cachedir exists, try to attach
            try:
                self.repo = git.Repo(self.cachedir)
            except git.exc.InvalidGitRepositoryError:
                log.error(_INVALID_REPO, self.cachedir, self.url, self.role)
                return new

        self.gitdir = salt.utils.path.join(self.repo.working_dir, '.git')
        self.enforce_git_config()

        return new
806368
def build(client, destination_args):
    
    # Have defined a remote job directory, lets do the setup locally.
    if client.job_directory:
        handler = LocalSetupHandler(client, destination_args)
    else:
        handler = RemoteSetupHandler(client)
    return handler
709965
def _file_local_or_remote(f, get_retriever):
    
    if os.path.exists(f):
        return f
    integration, config = get_retriever.integration_and_config(f)
    if integration:
        return integration.file_exists(f, config)
813789
def visit_file(self, item, parent):
        
        if item.sent_to_remote:
            self._add_report_item(item.path, item.remote_id, item.size, item.get_hash_value())
82030
def Remote(path=None, loader=Notebook, **globals):
    

    class Remote(RemoteMixin, loader):
        ...

    return Remote(path=path, **globals)
440182
function setRemoteDescription(description, success, failure) {
    this.remoteDescription = description

    if (this.localDescription && this.readyState === "new") {
        open(this)
    }

    success && success()
}
912850
def connect(self, successor):
        """"""
        if isinstance(self, ConnectToExitNode) and not isinstance(successor, EntryOrExitNode):
            return

        self.outgoing.append(successor)
        successor.ingoing.append(self)
453181
def setInstallMode(self, remote, on=True, t=60, mode=1, address=None):
        """"""
        if self._server is not None:
            return self._server.setInstallMode(remote, on, t, mode, address)
871699
def upload(self, local, remote):
        
        self.sync(LocalFile(local), RemoteFile(remote, self.api))
1161371
async function addRemote(name, url) {
  try {
    await exec(`git remote add ${name} ${url}`);
    logger.log(`Added remote to ${name}`);
  } catch (error) {
    throw error;
  }
}
1191259
def _note_remote_option(self, option, state):
        """"""
        if not self.telnet_opt_dict.has_key(option):
            self.telnet_opt_dict[option] = TelnetOption()
        self.telnet_opt_dict[option].remote_option = state
1178451
protected void open(int remoteid, long remotewindow, int remotepacket)
			throws IOException {
		this.remoteid = remoteid;
		this.remotewindow = new DataWindow(remotewindow, remotepacket);

		this.state = CHANNEL_OPEN;

		synchronized (listeners) {
			for (Enumeration<ChannelEventListener> e = listeners.elements(); e
					.hasMoreElements();) {
				(e.nextElement()).channelOpened(this);
			}
		}
	}
321570
def _use_remote_connection(self, kwargs):
        '''
        
        '''
        kwargs['host'] = kwargs.get('host')
        kwargs['username'] = kwargs.get('username')
        kwargs['password'] = kwargs.get('password')
        if kwargs['host'] is None or \
           kwargs['username'] is None or \
           kwargs['password'] is None:
            return False
        else:
            return True
50931
def sync(self, localpath, href, exclude=None, block=True):
        
        logger.info(u("sync: %s %s") % (localpath, href))
        try:
            localpath = _(localpath)
            href = remote(href)
            localRoot, localFolders, localFiles = next(os.walk(localpath))
            remoteFolders, remoteFiles = self.list(href)
            if remoteFiles is None or remoteFolders is None:
                remoteFiles = {}
                remoteFolders = {}
                self.mkdir(href)

            def norm(folder):
                path = os.path.join(href, _(folder))
                if path[len(path) - 1] != os.path.sep:
                    path += u("/")
                return path

            foldersToCreate = filter(
                lambda folderPath: folderPath not in remoteFolders,
                map(norm, localFolders)
            )
            apply_async("mkdir", lambda path: self.mkdir(path), foldersToCreate, self.limit)

            filesToSync = filter(
                lambda lFile: os.path.join(href, _(lFile)) not in remoteFiles,
                localFiles
            )
            fileArgs = [(os.path.join(localpath, f), os.path.join(href, f))
                        for f in filesToSync]
            apply_async("upload", lambda s, t: self.upload(s, t), fileArgs, self.limit)

            for folder in localFolders:
                localFolderPath = os.path.join(localpath, folder)
                remoteFolderPath = os.path.join(href, folder)
                if exclude:
                    bSync = exclude(localFolderPath, remoteFolderPath)
                else:
                    bSync = True
                if bSync:
                    apply_async(
                        "sync",
                        lambda localpath, href: self.sync(localpath, href, exclude, False),
                        [(localFolderPath, remoteFolderPath), ]
                    )
        except ConnectionException:
            raise
        except Exception:
            e = sys.exc_info()[1]
            logger.exception(e)
        if block:
            qWork.join()