Updates the Blog's config.yml file if anything has changed.
195016
private function updateConfig()
    {
        if ($this->getId('updated', 'anything') === false) {
            return;
        }
        $yaml = array();

        // Blog
        $yaml['blog'] = $this->config('blog');

        // Authors
        $yaml['authors'] = array();
        $authors = $this->config('authors');
        foreach ($this->db->all(array(
            'SELECT authors.path, authors.name',
            'FROM blog AS b',
            'INNER JOIN authors ON b.author_id = authors.id',
            'WHERE b.featured <= 0 AND b.published < 0 AND b.updated < 0 AND b.author_id != 0',
            'GROUP BY authors.id',
            'ORDER BY authors.name ASC',
        ), '', 'assoc') as $row) {
            $merge = (isset($authors[$row['path']])) ? $authors[$row['path']] : array();
            $yaml['authors'][$row['path']] = array_merge(array(
                'name' => $row['name'],
                'image' => '',
            ), $merge);
            unset($authors[$row['path']]);
        }
        foreach ($authors as $path => $values) {
            $yaml['authors'][$path] = $values;
        }

        // Categories
        $yaml['categories'] = array();
        $categories = $this->config('categories');
        $hier = new Hierarchy($this->db, 'categories');
        if ($this->getId('updated', 'categories')) {
            $hier->refresh('name');
        }
        $tree = $hier->tree(array('path', 'name'));
        unset($hier);
        foreach ($tree as $row) {
            $merge = (isset($categories[$row['path']])) ? $categories[$row['path']] : array();
            $yaml['categories'][$row['path']] = array_merge(array(
                'name' => $row['name'],
            ), $merge);
            unset($categories[$row['path']]);
        }
        foreach ($categories as $path => $values) {
            $yaml['categories'][$path] = $values;
        }

        // Tags
        $yaml['tags'] = array();
        $tags = $this->config('tags');
        foreach ($this->db->all(array(
            'SELECT tags.path, tags.name',
            'FROM tagged AS t',
            'INNER JOIN tags ON t.tag_id = tags.id',
            'GROUP BY tags.id',
            'ORDER BY tags.name ASC',
        ), '', 'assoc') as $row) {
            $merge = (isset($tags[$row['path']])) ? $tags[$row['path']] : array();
            $yaml['tags'][$row['path']] = array_merge(array(
                'name' => $row['name'],
            ), $merge);
            unset($tags[$row['path']]);
        }
        foreach ($tags as $path => $values) {
            $yaml['tags'][$path] = $values;
        }

        file_put_contents($this->folder.'config.yml', Yaml::dump($yaml, 3));
    }
418309
def on_config_value_changed(self, config_m, prop_name, info):
        
        config_key = info['args'][1]
        if "LOGGING" in config_key:
            self.update_log_button_state()
1264829
def add_release_to_changelog(version):
    """"""
    temp_file = changelog_file().parent / ("~" + changelog_file().name)
    now = datetime.today()
    release_added = False
    with open(str(temp_file), 'w') as g:
        with open(str(changelog_file()), 'r') as f:
            for line in f:
                list_match = list_match_re.match(line)
                if list_match and not release_added:
                    release_line = "{}{} :release:`{} <{}-{:02}-{:02}>`".format(
                                        list_match.group("leading"),
                                        list_match.group("mark"),
                                        version, now.year, now.month, now.day)
                    print(release_line, file=g)
                    release_added = True
                print(line, file=g, end="")
            if not release_added:
                release_line = "{}{} :release:`{} <{}-{:02}-{:02}>`".format(
                                " ", "-", version, now.year, now.month, now.day)
                print(release_line, file=g)
        print('', file=g)  # add a blank line at the end of the file
    shutil.copyfile(str(temp_file), str(changelog_file()))
    os.remove(str(temp_file))
1273272
private function updateVersionInFile()
  {
    if ($this->myFilename)
    {
      $status = file_put_contents($this->myFilename, $this->myNewVersion['version']);
      if (!$status)
      {
        $this->logError("File %s is not writable", $this->myFilename);
      }
    }
  }
452630
def update(self, rc):
        
        rc = self._load_yaml(rc)
        self.store = _recursive_update(self.store, rc)
134318
static public void update(Configuration configs)
    {
        scoringPolicy = configs.get(MalmoMod.SCORING_CONFIGS, "policy", DEFAULT_NO_SCORING).getInt();
        if (scoringPolicy > 0) {
            String customLogHandler = configs.get(MalmoMod.SCORING_CONFIGS, "handler", "").getString();
            setLogging(Level.INFO, customLogHandler);
        }
        if (logging)
            log("<ScoreInit><Policy>" + scoringPolicy + "</Policy></ScoreInit>");
    }
1259919
def changelog(config, release: nil)
      config.bug_labels         = bug_labels #'Type: Bug'
      config.enhancement_labels = enhancement_labels #'Type: Enhancement'
      config.future_release     = "v#{release}" if release
    end
280600
def _update_config(self):
        
        if self._local_server:
            server_config = Config.instance().get_section_config("Server")
            self._local_server.user = server_config.get("user")
            self._local_server.password = server_config.get("password")
415514
def process
      if config_changed?
        Massimo::UI.say 'massimo is reloading your site'
        @site.reload
        @site.process
        Massimo::UI.say 'massimo has built your site', :growl => true
      elsif changed?
        Massimo::UI.say 'massimo has noticed a change'
        @site.process
        Massimo::UI.say 'massimo has built your site', :growl => true
      end
    end
1208277
private void updateConfig() {
        // JDBC URL
        final String u = this.model.getUrl();
        final String url = (u != null) ? u.trim() : null;

        if (url == null || url.length() == 0) {
            this.conf.remove("jdbc.url");
        } else {
            this.conf.put("jdbc.url", url);
        } // end of else

        // DB user name
        final String n = this.model.getUser();
        final String user = (n != null) ? n.trim() : null;

        if (user == null || user.length() == 0) {
            this.conf.remove("db.user");
        } else {
            this.conf.put("db.user", user);
        } // end of else

        // DB charset
        final Charset charset = this.model.getCharset();

        if (charset == null) {
            this.conf.remove("db.charset");
        } else {
            this.conf.put("db.charset", charset.name());
        } // end of else

        // Persist configuration
        try {
            this.saveConf.call();
        } catch (Exception e) {
            e.printStackTrace();
        } // end of catch
    }
1135708
def update_config(self, config_dict, config_file):
        
        config_path = path.dirname(config_file)
        self.config.config_file_path = config_file
        self.config.path = config_path
        for config_key, config_value in config_dict.items():
            if config_value != self.config.get_config_value(config_key):
                self.set_preliminary_config_value(config_key, config_value)
1147483
def override(settings, yaml=None, env=None):
    
    if yaml is not None:
        if hasattr(yaml, 'read'):
            settings.update(load_yaml(yaml.read()))
        else:
            if os.path.exists(yaml):
                with open(yaml) as f:
                    settings.update(load_yaml(f.read()))

    if env is not None:
        for k, v in os.environ.items():
            if k.startswith(env):
                settings[k[len(env):]] = load_yaml(v)
1361661
def _update(self):
        
        with self._lock:
            if getmtime(self._filename) > self._last_modified:
                self._last_modified = getmtime(self._filename)
                self._book = ConfigParser(default_section='format')
                self._book.read(self._filename)
323233
def changelog(self, api_version, doc):
        """"""
        doc = textwrap.dedent(doc).strip()
        self._changelog[api_version] = doc
        self._changelog_locations[api_version] = get_callsite_location()
1215537
public static function updateChangeTime() {

		if (is_dir(Config::getOption("publicDir"))) {
			file_put_contents(Config::getOption("publicDir")."/latest-change.txt",time());
		} else {
			Console::writeError("the public directory for Pattern Lab doesn't exist...");
		}

	}
614503
def update_config(self, config):
    
    path = self._path() + '/config'
    resp = self._get_resource_root().put(path, data = config_to_json(config))
    return json_to_config(resp)
200273
def publish():
    """"""
    print("To be ready for release, remember:")
    print("      1) Update the version number (and associated test)")
    print("      2) Update the ChangeLog.rst (and other documentation)")
    print(
        "         ChangeLog should have an line (title) consisting of the version number"
    )
    print("      3) Tag Mercurial with 'Release <version>'")
    print("      4) Push updates to BitBucket")
    print("      5) Set the RELEASE environment variable")
    print("           $ export RELEASE=formic")

    cmd = [
        'bash', '-c',
        'yolk -M formic | grep "^version: " | sed "s/^version: \\(.*\\)$/\\1/"'
    ]
    published_version = subprocess.check_output(cmd).strip()
    our_version = open(os.path.join("formic", "VERSION.txt"), "r").read()

    # sanity test on version
    if "\n" in published_version or\
       len(published_version) < 3 or len(published_version) > 10:
        raise Exception(
            "Published version number seems weird: " + published_version)

    print("Published version:", published_version)
    print("Current version:  ", our_version)

    if our_version == published_version:
        raise Exception(
            "You are attempting to republish version " + our_version)

    # sanity: check ChangeLog starts with our version
    changelog = open("CHANGELOG.rst", "r")
    found = False
    for line in changelog.readlines():
        if line.strip() == our_version:
            print("ChangeLog has an entry")
            found = True
            break
    changelog.close()
    if not found:
        raise Exception(
            "The ChangeLog does not appear to include comments on this release"
        )

    # Sanity check: is there a release tag
    tags = subprocess.check_output("hg tags".split())
    found = False
    looking_for = "Release " + our_version
    for line in tags.split("\n"):
        match = re.match(r"^(.*)\s+[0-9]+:[0-9a-f]+$", line)
        if match:
            tag = match.group(1).strip()
            if tag == looking_for:
                print("Found tag", tag)
                found = True
                break

    if not found:
        raise Exception(
            "Mercurial does not have the release tag: " + looking_for)

    status = subprocess.check_output(["hg", "status"])
    for line in status.split("\n"):
        if len(line) > 0:
            raise Exception("Uncommitted changes present")

    try:
        v = os.environ["RELEASE"]
        if v != "formic":
            raise KeyError()
    except KeyError:
        print("$RELEASE environment variable is not set")
        raise

    subprocess.check_call("python setup.py bdist_egg upload".split())
    subprocess.check_call("python setup.py sdist upload".split())