Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 0.9, 0.9.1, and 0.9.1.1

merge with stable

Changeset 2c2a1a633735

Parents 79441a3f5a01

Parents 868b8054a602

by Steve Borho

Changes to 7 files · Browse files at 2c2a1a633735 Showing diff from parent 79441a3f5a01 868b8054a602 Diff from another changeset...

 
273
274
275
276
 
 
277
278
279
 
273
274
275
 
276
277
278
279
280
@@ -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)
Change 1 of 1 Show Entire File contrib/​rpm.sh Stacked
 
1
2
3
4
 
5
6
7
 
1
2
3
 
4
5
6
7
@@ -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
11
12
 
13
14
15
 
16
17
18
 
30
31
32
33
 
 
 
 
34
35
36
 
9
10
11
 
12
13
14
 
15
16
17
18
 
30
31
32
 
33
34
35
36
37
38
39
@@ -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}"
Change 1 of 1 Show Entire File hggtk/​hgthread.py Stacked
 
147
148
149
150
 
 
 
151
152
153
 
147
148
149
 
150
151
152
153
154
155
@@ -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
155
156
157
158
159
160
161
162
163
164
165
166
167
 
 
 
 
 
 
168
169
170
 
154
155
156
 
 
 
 
 
 
 
 
 
 
 
157
158
159
160
161
162
163
164
165
@@ -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
2
 
 
3
4
5
 
254
255
256
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
 
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
@@ -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
24
25
 
26
27
 
23
24
25
26
27
28
@@ -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