Callback for when the version selection has changed

        :param tf: the selected taskfileinfo
        :type tf: :class:`TaskFileInfo` | None
        :returns: None
        :rtype: None
        :raises: None
327337
def shot_taskfile_sel_changed(self, tf):
        
        self.shot_open_pb.setEnabled(bool(tf))
        # only allow new, if the releasetype is work
        # only allow new, if there is a shot. if there is a shot, there should always be a task.
        enablenew = bool(self.browser.shotbrws.selected_indexes(1)) and self.browser.get_releasetype() == djadapter.RELEASETYPES['work']
        self.shot_save_pb.setEnabled(enablenew)
        self.shot_descriptor_le.setEnabled(enablenew)
        self.shot_comment_pte.setEnabled(enablenew)
        self.update_descriptor_le(self.shot_descriptor_le, tf)
1108904
def at_version!(version)
      return self if log_data.version == version
      return false unless log_data.find_by_version(version)

      apply_diff(version, log_data.changes_to(version: version))
    end
1165707
def get_available_tf_versions(include_prerelease=False):
    """"""
    tf_releases = json.loads(
        requests.get('https://releases.hashicorp.com/index.json').text
    )['terraform']
    tf_versions = sorted([k  # descending
                          for k, _v in tf_releases['versions'].items()],
                         key=LooseVersion,
                         reverse=True)
    if include_prerelease:
        return tf_versions
    return [i for i in tf_versions if '-' not in i]
1350242
def updates_selection(update_selection):
    
    def handle_update(selection, *args, **kwargs):
        """Check for changes in the selection

        If the selection is changed by the decorated method, the internal core element lists are updated and a signal is
        emitted with the old and new selection as well as the name of the method that caused the change..
        """
        old_selection = selection.get_all()
        update_selection(selection, *args, **kwargs)
        new_selection = selection.get_all()

        affected_models = old_selection ^ new_selection
        if len(affected_models) != 0:  # The selection was updated
            deselected_models = old_selection - new_selection
            selected_models = new_selection - old_selection
            map(selection.relieve_model, deselected_models)
            map(selection.observe_model, selected_models)

            # Maintain internal lists for fast access
            selection.update_core_element_lists()

            # Clear focus if no longer in selection
            if selection.focus and selection.focus not in new_selection:
                del selection.focus

            # Send notifications about changes
            affected_classes = set(model.core_element.__class__ for model in affected_models)
            msg_namedtuple = SelectionChangedSignalMsg(update_selection.__name__, new_selection, old_selection,
                                                       affected_classes)
            selection.selection_changed_signal.emit(msg_namedtuple)
            if selection.parent_signal is not None:
                selection.parent_signal.emit(msg_namedtuple)
    return handle_update
1106791
public boolean recordVersion(String version) {
    if (currentInfo.documentVersion(version)) {
      populated = true;
      return true;
    } else {
      return false;
    }
  }
1262201
def version(self, path, postmap=None, **params):
        
        q = httpd.merge_query(path, postmap)

        ans = {
            'taskforce': taskforce_version,
            'python': '.'.join(str(x) for x in sys.version_info[:3]),
        }
        ans['platform'] = {
            'system': platform.system(),
        }

        #  Add in some extra details if this is a control path.
        #  These might give away too many details on a public
        #  path.
        #
        if self._httpd.allow_control:
            ans['platform']['platform'] = platform.platform()
            ans['platform']['release'] = platform.release()

        return self._format(ans, q)
879741
def _set_ignored_version(version):
    
    data = {'version': version}
    with open(filepath, 'w') as data_file:
        json.dump(data, data_file)
986451
def set_version(new_version_number=None, old_version_number=''):
    
    if new_version_number is None:
        return ValueError

    import fileinput
    import sys

    file = join('timezonefinder', '__init__.py')

    for line in fileinput.input(file, inplace=1):
        if old_version_number in line:
            line = line.replace(old_version_number, new_version_number)
        sys.stdout.write(line)
787280
def shot_ver_sel_changed(self, index):
        
        taskfile = None
        if index.isValid():
            item = index.internalPointer()
            taskfile = item.internal_data()
        self.shot_taskfile_sel_changed.emit(taskfile)
715233
def do_changed(self, subcmd, opts, component):
        

        releases = get_released_versions(component)
        latest = releases[0]

        filter_dir = components.comp_names[component].path

        latest_tag = '-'.join(latest)
        data = get_changed_since_tag(latest_tag, filter_dir)

        if len(data) > 0:
            print(data)
1331106
def replace(self, ):
        
        tfi = self.get_taskfileinfo_selection()
        if tfi:
            self.reftrack.replace(tfi)
778521
def handle_rule_versions(self, filename, rule_type, rule):
        
        if 'versions' in rule:
            versions = rule.pop('versions')
            for version_key_suffix in versions:
                version = versions[version_key_suffix]
                version['key_suffix'] = version_key_suffix
                tmp_rule = dict(rule, **version)
                self.rules[filename].append(Rule(filename, rule_type, tmp_rule))
        else:
            self.rules[filename].append(Rule(filename, rule_type, rule))
18372
async def get_version(self, tp, params):
        
        tw = TypeWrapper(tp, params)
        if not tw.is_versioned():
            # self.registry.set_tr()
            return TypeWrapper.ELEMENTARY_RES

        # If not in the DB, load from archive at current position
        if not self.version_db.is_versioned(tw):
            tr = await load_uvarint(self.iobj)
            ver = await load_uvarint(self.iobj)
            self.version_db.set_version(tw, tr, ver)

        else:
            tr, ver = self.version_db.get_version(tw)

        obj_id = None if tr == 0 else await load_uvarint(self.iobj)
        self.registry.set_tr(obj_id)
        return ver
672595
protected void doGlobalVersioning(StaplerRequest req) {
        if (req.getParameter("releaseVersion") != null) {
            releaseVersion = req.getParameter("releaseVersion");
        }
        if (req.getParameter("nextVersion") != null) {
            nextVersion = req.getParameter("nextVersion");
        }
    }
91607
def version(self, value):
        
        if isinstance(value, tuple):
            value = unparse_version(value)

        self._version = value
217436
def selection_changed(self, widget, event=None):
        """"""
        # do not forward cursor selection updates if state update is running
        # TODO maybe make this generic for respective abstract controller
        if self._state_which_is_updated:
            return
        super(StateMachineTreeController, self).selection_changed(widget, event)
1068425
def openTypeNameVersionFallback(info):
    
    versionMajor = getAttrWithFallback(info, "versionMajor")
    versionMinor = getAttrWithFallback(info, "versionMinor")
    return "Version %d.%s" % (versionMajor, str(versionMinor).zfill(3))