Check that all changes , besides versioning files, are committed
    :return:
16487
def git_check():
    

    # check that changes staged for commit are pushed to origin
    output = local('git diff --name-only | egrep -v "^(pynb/version.py)|(version.py)$" | tr "\\n" " "',
                   capture=True).strip()
    if output:
        fatal('Stage for commit and commit all changes first: {}'.format(output))

    output = local('git diff --cached --name-only | egrep -v "^(pynb/version.py)|(version.py)$" | tr "\\n" " "',
                   capture=True).strip()
    if output:
        fatal('Commit all changes first: {}'.format(output))
811408
def commit(self):
        
        self._check_state()
        database = self._session._database
        api = database.spanner_api
        metadata = _metadata_with_prefix(database.name)
        txn_options = TransactionOptions(read_write=TransactionOptions.ReadWrite())
        response = api.commit(
            self._session.name,
            self._mutations,
            single_use_transaction=txn_options,
            metadata=metadata,
        )
        self.committed = _pb_timestamp_to_datetime(response.commit_timestamp)
        return self.committed
1038233
def commit_status(base_commit, new_commit, ignore: [])
      base_tree = get_object(base_commit.tree) unless base_commit.nil?
      new_tree  = get_object(new_commit.tree)  unless new_commit.nil?

      Utils::Status.compare_trees base_tree,
                                  new_tree,
                                  object_store,
                                  ignore: ignore
    end
35683
def mkrelease(finish='yes', version=''):
    
    if not version:
        version = _version_format(_version_guess_next())

    if _git_get_current_branch() != 'release/' + version:
        _tool_run('git checkout develop',
                  'git flow release start ' + version)

    _project_patch_version(version)
    _project_patch_changelog()
    patched_files = ' '.join([VERSION_FILE, CHANGES_FILE])

    run('git diff ' + patched_files, pty=True)
    _tool_run(('git commit -m "Bump Version to {0!s}" {1!s}'
               .format(version, patched_files)))

    if finish not in ('no', 'n', ):
        _tool_run("git flow release finish -m '{0}' {0}".format(version),
                  env={b'GIT_MERGE_AUTOEDIT': b'no', })
        _tool_run('git push origin --tags develop master')
1063090
def _check_apt_updates(self):
        
        output = str(subprocess.check_output(["apt", "list", "--upgradeable"]))
        output = output.split(LINE_SEPARATOR)
        return len(output[1:-1])
223410
def commit_config(self):
        
        if self.loaded:
            if self.ssh_connection is False:
                self._open_ssh()
            try:
                self.ssh_device.commit()
                time.sleep(3)
                self.loaded = False
                self.changed = True
            except:   # noqa
                if self.merge_config:
                    raise MergeConfigException('Error while commiting config')
                else:
                    raise ReplaceConfigException('Error while commiting config')
        else:
            raise ReplaceConfigException('No config loaded.')
223339
def _is_updated(old_conf, new_conf):
    '''
    
    '''
    changed = {}

    # Dirty json hacking to get parameters in the same format
    new_conf = _json_to_unicode(salt.utils.json.loads(
        salt.utils.json.dumps(new_conf, ensure_ascii=False)))
    old_conf = salt.utils.json.loads(salt.utils.json.dumps(old_conf, ensure_ascii=False))

    for key, value in old_conf.items():
        oldval = six.text_type(value).lower()
        if key in new_conf:
            newval = six.text_type(new_conf[key]).lower()
        if oldval == 'null' or oldval == 'none':
            oldval = ''
        if key in new_conf and newval != oldval:
            changed[key] = {'old': oldval, 'new': newval}
    return changed
1206715
def changed_files(self) -> typing.List[str]:
        
        changed_files: typing.List[str] = [x.a_path for x in self.repo.index.diff(None)]
        LOGGER.debug('changed files: %s', changed_files)
        return changed_files
1249637
def check_commit(self, force=False):
        ''''''
        self.commit_count = self.commit_count + 1
        if force or self.commit_count >= 100:
            self.commit_count = 0
            self.conn.commit()
94246
def find_local_changes():
    

    manifest = data_store.read_local_manifest()
    old_state = manifest['files']
    current_state = get_file_list(config['data_dir'])
    current_state = [fle for fle in current_state if not
                     next((True for flter in config['ignore_filters']
                           if fnmatch.fnmatch(fle['path'], flter)), False)]
    return manifest, find_manifest_changes(current_state, old_state)
1004076
def _has_commit(version, debug=False):
    
    if _has_tag(version, debug) or _has_branch(version, debug):
        return False
    cmd = sh.git.bake('cat-file', '-e', version)
    try:
        util.run_command(cmd, debug=debug)
        return True
    except sh.ErrorReturnCode:
        return False
1286628
def CommitAll(close=None):
    
    if close:
        warnings.simplefilter('default')
        warnings.warn("close parameter will not need at all.", DeprecationWarning)
    
    for k, v in engine_manager.items():
        session = v.session(create=False)
        if session:
            session.commit()
264837
def release_check():
    """"""
    tags = local("git tag", capture=True)
    tags = set(tags.splitlines())
    if env.version in tags:
        raise Exception("Already released v. %r" % env.version)
55138
def get_changed_files(self) -> List[str]:
        
        out = shell_tools.output_of(
            'git',
            'diff',
            '--name-only',
            self.compare_commit_id,
            self.actual_commit_id,
            '--',
            cwd=self.destination_directory)
        return [e for e in out.split('\n') if e.strip()]
1121864
def is_dirty(self, untracked=False) -> bool:
        
        result = False
        if not self.index_is_empty():
            LOGGER.error('index is not empty')
            result = True
        changed_files = self.changed_files()
        if bool(changed_files):

            LOGGER.error(f'Repo has %s modified files: %s', len(changed_files), changed_files)
            result = True
        if untracked:
            result = result or bool(self.untracked_files())
        return result
192399
def needs_sync(self):
        """"""

        affected_attributes = [
            'css_files', 'js_files',
            'scss_files', 'widgets']

        for attr in affected_attributes:
            if len(getattr(self, attr)) > 0:
                return True
        return False
286088
def commit(self):
		
		try:
			if self.connection is not None:
				self.connection.commit()
				self._updateCheckTime()
				self.release()
		except Exception, e:
			pass