Perform len(MARKED_DAYS)*self.max_commits and Push to the Repository
492827
def do_commits(self):
        
        git_clone_command = "git clone " + str(self.git_repo_url)
        subprocess.call(git_clone_command, shell=True)
        subprocess.check_call(
            ['touch', 'gitHeart.txt'], cwd=self.repository_name)
        self.append_onto_file(self.repository_name+"/gitHeart.txt", HEADER)
        subprocess.check_call(
            ['git', 'add', 'gitHeart.txt'], cwd=self.repository_name)
        subprocess.check_call(
            ['git', 'commit', '-m', '"Commit Number 0"'], cwd=self.repository_name)
        for commit_number in range(1, len(MARKED_DAYS)*self.max_commits+1):
            heart_msg = HEART.format(commit_number=str(commit_number))
            self.append_onto_file(
                self.repository_name+"/gitHeart.txt", heart_msg)
            subprocess.check_call(
                ['git', 'add', 'gitHeart.txt'], cwd=self.repository_name)
            subprocess.check_call(['git', 'commit', '-m', '"Commit Number {commit_number}"'.format(
                commit_number=commit_number)], cwd=self.repository_name)
        subprocess.check_call(
            ['git', 'push', 'origin', 'master'], cwd=self.repository_name)
251891
def _flush(self, commit=True, using=None):
        
        if commit:
            # XXX: multi-set?
            if self._uses_savepoints():
                self._commit_all_savepoints(using)
            c = self.local.mget('%s_%s_*' %
                                (self.prefix, self._trunc_using(using)))
            for key, value in c.items():
                self.cache_backend.set(key, value, self.timeout)
        else:
            if self._uses_savepoints():
                self._rollback_all_savepoints(using)
        self._clear(using)
        self._clear_sid_stack(using)
568646
def push(self):
        ''''''
        message = self.build_message()
        return requests.post(self.hook, json=message)
1157547
def commit(self):
        '''
        

        '''
        url = self.api_endpoints['send']
        payload = {
            'actions': self._bulk_query,
        }
        payload.update(self._payload)
        self._bulk_query = []

        return self._make_request(
            url,
            json.dumps(payload),
            headers={'content-type': 'application/json'},
        )
1324896
def commit(self):
        '''
        
        '''

        commit = self._log(num=-1, format='%H')
        if commit.get('returncode') == 0:
            return commit.get('stdout')
1045187
def _push_actions(self):
        
        data = cherrypy.request.json
        with self.app.lock:
            self.app.add_actions(data['actions'], data['scheduler_instance_id'])
1161073
protected void accumulatePersistedRepositoryChanges(long delta)
   {
      long dataSize = 0;
      try
      {
         dataSize = quotaPersister.getRepositoryDataSize(rName);
      }
      catch (UnknownDataSizeException e)
      {
         if (LOG.isTraceEnabled())
         {
            LOG.trace(e.getMessage(), e);
         }
      }

      long newDataSize = Math.max(dataSize + delta, 0); // to avoid possible inconsistency
      quotaPersister.setRepositoryDataSize(rName, newDataSize);
   }
1104995
public void pushCommandLine(String commandLine) {
        // Add new history entry to the end.
        history.add(commandLine);

        // Maintain max history size.
        if (history.size() > maxHistory) {
            history.remove(0);
        }

        // Reset the iteration index.
        resetCurrentIndex();
    }
827094
def Commit(self):
		
		self.lock.acquire()
		try:
			for bucket in self.connections.values():
				try:
					for conn in bucket:
						conn.lock()
						try:
							conn.commit()
							conn.release()
						except Exception:
							conn.release()
				except Exception:
					pass
		finally:
			self.lock.release()
164486
def push(self, el):
        
        count = next(self.counter)
        heapq.heappush(self._queue, (el, count))
15180
public void push(List<Metric> rawMetrics) {
    List<Metric> validMetrics = ValidCharacters.toValidValues(filter(rawMetrics));
    List<Metric> metrics = transformMetrics(validMetrics);

    LOGGER.debug("Scheduling push of {} metrics", metrics.size());
    final UpdateTasks tasks = getUpdateTasks(BasicTagList.EMPTY,
        identifyCountersForPush(metrics));
    final int maxAttempts = 5;
    int attempts = 1;
    while (!pushQueue.offer(tasks) && attempts <= maxAttempts) {
      ++attempts;
      final UpdateTasks droppedTasks = pushQueue.remove();
      LOGGER.warn("Removing old push task due to queue full. Dropping {} metrics.",
          droppedTasks.numMetrics);
      numMetricsDroppedQueueFull.increment(droppedTasks.numMetrics);
    }
    if (attempts >= maxAttempts) {
      LOGGER.error("Unable to push update of {}", tasks);
      numMetricsDroppedQueueFull.increment(tasks.numMetrics);
    } else {
      LOGGER.debug("Queued push of {}", tasks);
    }
  }
1203104
def push(self, index=None):
        
        for ind in self.indexes:
            if index and not isinstance(ind, index):
                continue
            ind.push()
1359087
private void addCommitDateInstantColumnIfNeeded() {
        if (!columnExists(getCommitTableNameWithSchema(), COMMIT_COMMIT_DATE_INSTANT)){
            addStringColumn(getCommitTableNameWithSchema(), COMMIT_COMMIT_DATE_INSTANT, 30);
        } else {
            extendStringColumnIfNeeded(getCommitTableNameWithSchema(), COMMIT_COMMIT_DATE_INSTANT, 30);
        }
    }
217009
def bulk_upsert(self, docs, namespace, timestamp):
        
        if self.auto_commit_interval is not None:
            add_kwargs = {
                "commit": (self.auto_commit_interval == 0),
                "commitWithin": str(self.auto_commit_interval)
            }
        else:
            add_kwargs = {"commit": False}

        cleaned = (self._clean_doc(d, namespace, timestamp) for d in docs)
        if self.chunk_size > 0:
            batch = list(next(cleaned) for i in range(self.chunk_size))
            while batch:
                self.solr.add(batch, **add_kwargs)
                batch = list(next(cleaned)
                             for i in range(self.chunk_size))
        else:
            self.solr.add(cleaned, **add_kwargs)
935225
def _submit_changes_to_github_repo(path, url):
    
    try:
        repo = git.Repo(path)
    except Exception:
        raise RuntimeError('Couldn\'t locate a repository at `%s`.' % path)
    commited = False
    try:
        try:
            repo.delete_remote('trytravis')
        except Exception:
            pass
        print('Adding a temporary remote to '
              '`%s`...' % url)
        remote = repo.create_remote('trytravis', url)

        print('Adding all local changes...')
        repo.git.add('--all')
        try:
            print('Committing local changes...')
            timestamp = datetime.datetime.now().isoformat()
            repo.git.commit(m='trytravis-' + timestamp)
            commited = True
        except git.exc.GitCommandError as e:
            if 'nothing to commit' in str(e):
                commited = False
            else:
                raise
        commit = repo.head.commit.hexsha
        committed_at = repo.head.commit.committed_datetime

        print('Pushing to `trytravis` remote...')
        remote.push(force=True)
    finally:
        if commited:
            print('Reverting to old state...')
            repo.git.reset('HEAD^')
        try:
            repo.delete_remote('trytravis')
        except Exception:
            pass
    return commit, committed_at
329016
def last_commit(self) -> Tuple:
        """"""
        from libs.repos import git

        return git.get_last_commit(repo_path=self.path)
1081129
def commit(self):
        ""
        if self._meta.path:
            with open(self._meta.path, 'wb') as fd:
                raw = deepcopy(self.raw)
                # LAZY INDEX PROCESSING
                # Save indexes only if not lazy
                lazy_indexes = self.lazy_indexes  # Keep this list safe
                if not self._meta.lazy_indexes:
                    # Remove indexes if needed
                    for idx_name in lazy_indexes:
                        del raw['indexes'][idx_name]
                    for index_name, values in raw['indexes'].items():
                        for value, keys in values.items():
                            raw['indexes'][index_name][value] = list(keys)
                # don't store indexes if not needed
                if not raw['indexes'] or self._meta.lazy_indexes:
                    del raw['indexes']
                try:
                    fd.write(six.u(self.serialize(raw)))
                except TypeError:
                    fd.write(six.b(self.serialize(raw)))