by
Changes to 7 files · Browse files at 2c2a1a633735 Showing diff from parent 79441a3f5a01 868b8054a602 Diff from another changeset...
@@ -273,7 +273,8 @@ return
root = os.path.commonprefix(files)
root = paths.find_root(root)
- self.invalidate(files, root)
+ if root:
+ self.invalidate(files, root)
def invalidate(self, paths, root = ''):
started = bool(self.inv_dirs)
|
@@ -1,7 +1,7 @@ #!/bin/sh
mkdir -p rpmbuild/{SOURCES,BUILD}
-hg archive -t tgz rpmbuild/SOURCES/tortoisehg-hg.tgz
+hg archive -t tgz rpmbuild/SOURCES/tortoisehg-hg.tar.gz
rpmbuild --define "_topdir $(pwd)/rpmbuild" -ba $(dirname $0)/tortoisehg.spec
rm -rf rpmbuild/BUILD/
ls -l rpmbuild/{RPMS/*,SRPMS}/tortoisehg-*.rpm
|
@@ -9,10 +9,10 @@ Group: Development/Tools
License: GPLv2
URL: http://bitbucket.org/tortoisehg/stable/wiki/
-Source0: tortoisehg-hg.tgz
+Source0: tortoisehg-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: python
-Requires: python >= 2.4, mercurial >= 1.1.2, gnome-python2-gconf
+Requires: python >= 2.4, mercurial >= 1.3, gnome-python2-gconf
Requires: gnome-python2-gtksourceview, pycairo, pygobject2, pygtk2 >= 2.10
%description
@@ -30,7 +30,10 @@system available in the file manager with a graphical interface.
%prep
-%setup -q -n tortoisehg-hg
+%setup -q -n tortoisehg-%{version}
+
+# Fix for nautilus python extensions in lib64 on x86_64
+sed -i "s,lib/nautilus,%{_lib}/nautilus,g" setup.py
cat > thgutil/config.py << EOT
bin_path = "%{_bindir}"
|
@@ -147,7 +147,9 @@ self.ret = ret or 0
if self.postfunc:
self.postfunc(ret)
- except (hglib.RepoError, urllib2.HTTPError, util.Abort), e:
+ except util.Abort, e:
+ self.ui.write_err(_('abort: ') + str(e) + '\n')
+ except (hglib.RepoError, urllib2.HTTPError), e:
self.ui.write_err(str(e) + '\n')
except (Exception, OSError, IOError), e:
self.ui.write_err(str(e) + '\n')
|
@@ -154,17 +154,12 @@
if (rv == ERROR_SUCCESS && hkey)
{
- BYTE Data[MAX_PATH] = "";
- DWORD cbData = MAX_PATH * sizeof(BYTE);
-
- rv = RegQueryValueExA(hkey, "menuText", 0, 0, Data, &cbData);
- if (rv == ERROR_SUCCESS)
- menuText = reinterpret_cast<const char*>(&Data);
-
- cbData = MAX_PATH * sizeof(BYTE);
- rv = RegQueryValueExA(hkey, "helpText", 0, 0, Data, &cbData);
- if (rv == ERROR_SUCCESS)
- helpText = reinterpret_cast<const char*>(&Data);
+ GetRegSZValue(hkey, "menuText", menuText);
+ GetRegSZValue(hkey, "helpText", helpText);
+ }
+ else
+ {
+ TDEBUG_TRACE("GetCMenuTranslation: RegOpenKeyExA(" << subkey << ") failed");
}
if (hkey)
|
@@ -1,5 +1,7 @@ #include "stdafx.h"
#include "TortoiseUtils.h"
+
+#include <vector>
#include <assert.h>
#include <io.h>
@@ -254,3 +256,26 @@ return f;
}
+
+// read string value from registry
+int GetRegSZValue(HKEY hkey, const char* name, std::string& res)
+{
+ res = "";
+
+ if (!hkey)
+ return 0;
+
+ std::vector<BYTE> Data(300);
+ DWORD cbData = Data.size();
+
+ LONG rv = ::RegQueryValueExA(hkey, name, 0, 0, &Data[0], &cbData);
+
+ if (rv == ERROR_SUCCESS)
+ {
+ res = reinterpret_cast<char*>(&Data[0]);
+ return 1;
+ }
+
+ return 0;
+}
+
|
@@ -23,5 +23,6 @@ bool IsHgRepo(const std::string& path);
int GetRegistryConfig(const std::string& name, std::string& res);
FILE* fopenReadRenameAllowed(const char* path);
+int GetRegSZValue(HKEY hkey, const char* name, std::string& res);
#endif
|
Loading...