'Perform code update if necessary. Return three elems tuple with the
ChangeLog of the changed files, the local and the final commit id.
:param force: Force update ignoring the startup config.
:return: (changelog: A ChangeLog instance,
local_head_id: The local id before the update,
commit_id: The commit id after the update)'

def update(self, force=False):

    if ((not force) and (not self._has_to_update())):
        return
    self._start_cfg.last_upd = date.today()
    self._start_cfg.save()
    local_head_id = self._client.get_local_head_id()
    short_local_head_id = to_short_id(local_head_id)
    self._notify(VersionMgr.ON_UPDATE_CHECK)
    remote_head_id = self._client.get_remote_head_id()
    short_remote_head_id = to_short_id(remote_head_id)
    if (local_head_id == remote_head_id):
        self._notify(VersionMgr.ON_ALREADY_LATEST)
        return
    if self._user_confirmed_update(short_local_head_id, local_head_id, short_remote_head_id, remote_head_id):
        return self.__update_impl()
