Mercurial > hg > easyhg
diff hgrunner.cpp @ 210:c5fceb3fe5b4
* OS/X: Add script to run external diff; add space around tab widget; textual fixes
* Bail out of easyhg.py in uisetup rather than at extension load time if we can't load PyQt4 -- that way we find out about it in easyhg
* Ensure editing the default path works even if hgrc doesn't yet exist; ensure path and branch are reset (to empty and default) if their respective files are absent
author | Chris Cannam |
---|---|
date | Wed, 05 Jan 2011 14:31:07 +0000 |
parents | ff0d76dcb3b8 |
children | 90e70a9024f3 |
line wrap: on
line diff
--- a/hgrunner.cpp Tue Jan 04 16:34:33 2011 +0000 +++ b/hgrunner.cpp Wed Jan 05 14:31:07 2011 +0000 @@ -65,21 +65,18 @@ QString HgRunner::findExtension() { - // If we haven't unbundled an extension, always do that (so that - // it's available in case someone wants to use it later, e.g. to - // fix a malfunctioning setup). But the path we actually prefer - // is the one in the settings first, if it exists; then the + // Always unbundle the extension: even if it already exists (in + // case we're upgrading) and even if we're not going to use it (so + // that it's available in case someone wants to use it later, + // e.g. to fix a malfunctioning setup). But the path we actually + // prefer is the one in the settings first, if it exists; then the // unbundled one; then anything in the path if for some reason // unbundling failed QSettings settings; settings.beginGroup("Locations"); - QString unbundled = getUnbundledFileName(); - if (!QFile(unbundled).exists()) { - unbundled = unbundleExtension(); - } - + QString unbundled = unbundleExtension(); QString extpath = settings.value("extensionpath", "").toString(); if (extpath != "" && QFile(extpath).exists()) return extpath;