#
#
# add_file "mtsh.sln"
# content [eff2a01c80c98eea423e38442e6401208ac57c5b]
#
# add_file "mtsh.vcproj"
# content [a287e837373cc79e466a1cf2e16df75a49235b0a]
#
# patch "main.cc"
# from [837322b148744ad8c31e4251f3568eb84fa8f3b2]
# to [2ca8576e93ca756af28926af28ab6fd864c95108]
#
# patch "misc.hh"
# from [6d7f5031038c1712650c75736ea0ed71d2a2116e]
# to [f1d0d68e8fba187589d0115489aef3d1a9ebb5f6]
#
# patch "monotone.cc"
# from [ac520ac8e3574637bb5032cef1ec18c73b7dff01]
# to [704f9a5053222467062ec701015f1f20fa125d2f]
#
# patch "monotone.hh"
# from [b16bbdc7edc223093df365f5e76aa0a5986bab35]
# to [ebb4ff575e506586333b469e8fec4d03ee427611]
#
# patch "rev_file_info.hh"
# from [d44b55176f4b984d5a98b1bc85992578f018012f]
# to [00e010f0019893dc2e62efe98bb270eb99ad148a]
#
# patch "rev_file_list.cc"
# from [48f11ed0650a742018b4d84d25b5d617cfbde07c]
# to [490fef183e606a99df677e83ccedf895352be109]
#
# patch "rev_file_list.hh"
# from [d053c9583bb5fddd8cdb0e78539f08d0067a4a2c]
# to [623026e3b340bd8457edba654c66c89824bbde23]
#
# patch "revdat.hh"
# from [33496a7d49f91e2dafff4d220388ddd84176e856]
# to [310794a1fbe6dd7e6092410bbbdc54a236379492]
#
============================================================
--- mtsh.sln eff2a01c80c98eea423e38442e6401208ac57c5b
+++ mtsh.sln eff2a01c80c98eea423e38442e6401208ac57c5b
@@ -0,0 +1,20 @@
+
+Microsoft Visual Studio Solution File, Format Version 9.00
+# Visual Studio 2005
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mtsh", "mtsh.vcproj", "{1BEAAA5F-A072-4129-B1F8-8D06D457072A}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Win32 = Debug|Win32
+ Release|Win32 = Release|Win32
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {1BEAAA5F-A072-4129-B1F8-8D06D457072A}.Debug|Win32.ActiveCfg = Debug|Win32
+ {1BEAAA5F-A072-4129-B1F8-8D06D457072A}.Debug|Win32.Build.0 = Debug|Win32
+ {1BEAAA5F-A072-4129-B1F8-8D06D457072A}.Release|Win32.ActiveCfg = Release|Win32
+ {1BEAAA5F-A072-4129-B1F8-8D06D457072A}.Release|Win32.Build.0 = Release|Win32
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
============================================================
--- mtsh.vcproj a287e837373cc79e466a1cf2e16df75a49235b0a
+++ mtsh.vcproj a287e837373cc79e466a1cf2e16df75a49235b0a
@@ -0,0 +1,245 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
============================================================
--- main.cc 837322b148744ad8c31e4251f3568eb84fa8f3b2
+++ main.cc 2ca8576e93ca756af28926af28ab6fd864c95108
@@ -1,16 +1,29 @@
// Copyright 2005 Timothy Brownawell
// Licensed to the public under the GNU GPL v2, see COPYING
// This provides a window to put the revdat widget in, and a toolbar
// to tell it what to do.
+#ifdef _MSC_VER
+#pragma warning(disable : 4250)
+#endif
#include
#include
#include
// chdir
+#ifdef WIN32
+#include
+int chdir(char const *x) {
+ if (SetCurrentDirectoryA(x))
+ return 0;
+ else
+ return -1;
+}
+#else
#include
+#endif
#include "monotone.hh"
#include "revdat.hh"
============================================================
--- misc.hh 6d7f5031038c1712650c75736ea0ed71d2a2116e
+++ misc.hh f1d0d68e8fba187589d0115489aef3d1a9ebb5f6
@@ -1,6 +1,9 @@
#ifndef __MISC_HH__
#define __MISC_HH__
+#ifdef _MSC_VER
+#pragma warning(disable : 4250)
+#endif
#include
#include
============================================================
--- monotone.cc ac520ac8e3574637bb5032cef1ec18c73b7dff01
+++ monotone.cc 704f9a5053222467062ec701015f1f20fa125d2f
@@ -1,8 +1,7 @@
// Copyright 2005 Timothy Brownawell
// Licensed to the public under the GNU GPL v2, see COPYING
#include "monotone.hh"
-#include
#ifdef WIN32
#include
@@ -23,7 +22,9 @@
#include
#include
-inline int max(int a, int b) {return (a>b)?a:b;}
+#ifndef max
+int max(int a, int b) {return (a>b)?a:b;}
+#endif
monotone::monotone(): pid(0), dir("."), done(2)
{
@@ -79,6 +80,12 @@
}
Glib::ustring data;
chan->read(data, 1024);
+ if (data.empty())
+ {
+ if (++done == 2)
+ child_exited(0, 0);
+ return false;
+ }
if (mode == STDIO)
{
tempstr += data;
@@ -106,6 +113,12 @@
}
Glib::ustring data;
chan->read(data, 1024);
+ if (data.empty())
+ {
+ if (++done == 2)
+ child_exited(0, 0);
+ return false;
+ }
output_err += data;
return true;
}
@@ -142,7 +155,10 @@
return false;
}
//std::cerr<<"spawn()\n";
- args.insert(args.begin(), Glib::find_program_in_path("monotone"));
+ std::string progname = Glib::find_program_in_path("mtn");
+ if (progname.empty())
+ return false;
+ args.insert(args.begin(), progname);
if (!db.empty())
args.push_back("--db=" + db);
try
============================================================
--- monotone.hh b16bbdc7edc223093df365f5e76aa0a5986bab35
+++ monotone.hh ebb4ff575e506586333b469e8fec4d03ee427611
@@ -11,6 +11,9 @@
#ifndef __MONOTONE_HH_
#define __MONOTONE_HH_
+#ifdef _MSC_VER
+#pragma warning(disable : 4250)
+#endif
#include
#include
#include
============================================================
--- rev_file_info.hh d44b55176f4b984d5a98b1bc85992578f018012f
+++ rev_file_info.hh 00e010f0019893dc2e62efe98bb270eb99ad148a
@@ -16,6 +16,9 @@
#ifndef __REV_FILE_INFO_HH__
#define __REV_FILE_INFO_HH__
+#ifdef _MSC_VER
+#pragma warning(disable : 4250)
+#endif
#include
#include
============================================================
--- rev_file_list.cc 48f11ed0650a742018b4d84d25b5d617cfbde07c
+++ rev_file_list.cc 490fef183e606a99df677e83ccedf895352be109
@@ -6,11 +6,20 @@
#include "misc.hh"
// getcwd
+#ifdef WIN32
+#include
+int getcwd(char *buf, int size) {
+ return GetCurrentDirectoryA(size, buf);
+}
+#else
#include
+#endif
// rand, srand
#include
// rename
#include
+// time
+#include
template
std::vector & operator%(std::vector & v, T t)
============================================================
--- rev_file_list.hh d053c9583bb5fddd8cdb0e78539f08d0067a4a2c
+++ rev_file_list.hh 623026e3b340bd8457edba654c66c89824bbde23
@@ -12,6 +12,9 @@
#ifndef __REV_FILE_LIST_HH_
#define __REV_FILE_LIST_HH_
+#ifdef _MSC_VER
+#pragma warning(disable : 4250)
+#endif
#include
#include "monotone.hh"
============================================================
--- revdat.hh 33496a7d49f91e2dafff4d220388ddd84176e856
+++ revdat.hh 310794a1fbe6dd7e6092410bbbdc54a236379492
@@ -11,6 +11,9 @@
#ifndef __REVDAT_HH__
#define __REVDAT_HH__
+#ifdef _MSC_VER
+#pragma warning(disable : 4250)
+#endif
#include
#include "rev_file_list.hh"