diff options
author | Cheng-Lung Sung <clsung@FreeBSD.org> | 2007-08-14 01:59:41 +0000 |
---|---|---|
committer | Cheng-Lung Sung <clsung@FreeBSD.org> | 2007-08-14 01:59:41 +0000 |
commit | 50ac58c79ea2a59002fb9cea5ef04892bf6333ff (patch) | |
tree | 73502a218f5e7034cffee170535f4d8766dd74d8 /devel/monotone/files | |
parent | 6e4232f1dae753b302e07293c73db749cce2fa8a (diff) | |
download | ports-50ac58c79ea2a59002fb9cea5ef04892bf6333ff.tar.gz ports-50ac58c79ea2a59002fb9cea5ef04892bf6333ff.zip |
Notes
Diffstat (limited to 'devel/monotone/files')
-rw-r--r-- | devel/monotone/files/patch-numeric_vocab.hh | 10 | ||||
-rw-r--r-- | devel/monotone/files/patch-paths.cc | 93 |
2 files changed, 0 insertions, 103 deletions
diff --git a/devel/monotone/files/patch-numeric_vocab.hh b/devel/monotone/files/patch-numeric_vocab.hh deleted file mode 100644 index 911191caa822..000000000000 --- a/devel/monotone/files/patch-numeric_vocab.hh +++ /dev/null @@ -1,10 +0,0 @@ ---- numeric_vocab.hh.orig Mon May 7 16:13:44 2007 -+++ numeric_vocab.hh Sat Jun 30 22:53:12 2007 -@@ -11,6 +11,7 @@ - // PURPOSE. - - #include <cstddef> -+#include <climits> - #include <limits> - - #include "mt-stdint.h" diff --git a/devel/monotone/files/patch-paths.cc b/devel/monotone/files/patch-paths.cc deleted file mode 100644 index 138dcac07128..000000000000 --- a/devel/monotone/files/patch-paths.cc +++ /dev/null @@ -1,93 +0,0 @@ ---- paths.cc.orig 2007-05-07 14:13:44.000000000 +0000 -+++ paths.cc 2007-07-15 22:17:32.000000000 +0000 -@@ -10,6 +10,7 @@ - #include <string> - #include <sstream> - -+#include <boost/version.hpp> - #include <boost/filesystem/operations.hpp> - #include <boost/filesystem/convenience.hpp> - -@@ -249,6 +250,41 @@ - I(fully_normalized_path_split(path, true, sp)); - } - -+// path::normalize() is deprecated in Boost 1.34, and also -+// doesn't remove leading or trailing dots any more. -+static fs::path -+normalize_path(fs::path const & in) -+{ -+#if BOOST_VERSION < 103400 -+ return in.normalize(); -+#else -+ fs::path out; -+ vector<string> stack; -+ for (fs::path::iterator i = in.begin(); i != in.end(); ++i) -+ { -+ // remove . elements -+ if (*i == ".") -+ continue; -+ // remove foo/.. element pairs -+ if (*i == "..") -+ { -+ if (!stack.empty()) -+ { -+ stack.pop_back(); -+ continue; -+ } -+ } -+ stack.push_back(*i); -+ } -+ for (vector<string>::const_iterator i = stack.begin(); -+ i != stack.end(); ++i) -+ { -+ out /= *i; -+ } -+ return out; -+#endif -+} -+ - static void - normalize_external_path(string const & path, string & normalized) - { -@@ -272,7 +308,7 @@ - base = initial_rel_path.get(); - // the fs::native is needed to get it to accept paths like ".foo". - relative = fs::path(path, fs::native); -- out = (base / relative).normalize(); -+ out = normalize_path(base / relative); - } - catch (exception &) - { -@@ -539,9 +575,9 @@ - normalize_out_dots(string const & path) - { - #ifdef WIN32 -- return fs::path(path, fs::native).normalize().string(); -+ return normalize_path(fs::path(path, fs::native)).string(); - #else -- return fs::path(path, fs::native).normalize().native_file_string(); -+ return normalize_path(fs::path(path, fs::native)).native_file_string(); - #endif - } - -@@ -679,9 +715,17 @@ - } - - // check for _MTN/. and _MTN/.. to see if mt dir is readable -- if (!fs::exists(check / ".") || !fs::exists(check / "..")) -+ try -+ { -+ if (!fs::exists(check / ".") || !fs::exists(check / "..")) -+ { -+ L(FL("problems with '%s' (missing '.' or '..')") % check.string()); -+ return false; -+ } -+ } -+ catch(exception &) - { -- L(FL("problems with '%s' (missing '.' or '..')") % check.string()); -+ L(FL("problems with '%s' (cannot check for '.' or '..')") % check.string()); - return false; - } - return true; |