#
# patch "ChangeLog"
# from [3778f43c1b9c5e6e9013d0f94897f95d36cf07fe]
# to [67efcbf870e9b7445139b11b7b3e34694a5cda47]
#
# patch "app_state.cc"
# from [e305f61ae2b99d6d540ad6bebd7e796452363147]
# to [a48e3316e58760390f478e34ca33a5475867d330]
#
# patch "automate.cc"
# from [ca486d66afc95b42519bd3831732b71099d45cc4]
# to [de5a69d2183076a45f2d5801fc81edea951e928c]
#
# patch "commands.cc"
# from [467f15799d4f2ce8da3095a56a35502a0548f8b0]
# to [69b54198950751b1b3ec29fb9baa1edb94a48b7c]
#
# patch "paths.cc"
# from [842f2b7b7b55c8e811c5d47b45f3a52a25ad57ba]
# to [5459f9585f202f921b133f0b1d6aba09c61a5c4e]
#
# patch "rcs_import.cc"
# from [140b9da9093485a0aa06a4ffbe9e99818da7a8e1]
# to [bb9113bda3ccacea6236e9b9e5045ee2ff96756a]
#
# patch "restrictions.cc"
# from [78d220a74de9051def3807502d7d3598ca1e994c]
# to [2befadf39214a86ccfa02f83576fbd1c97a115ef]
#
========================================================================
--- ChangeLog 3778f43c1b9c5e6e9013d0f94897f95d36cf07fe
+++ ChangeLog 67efcbf870e9b7445139b11b7b3e34694a5cda47
@@ -1,5 +1,9 @@
2005-08-24 Nathaniel Smith
+ * Switch rest of instances to using convenience functions.
+
+2005-08-24 Nathaniel Smith
+
* Switch many instances to using convenience functions.
2005-08-24 Nathaniel Smith
========================================================================
--- app_state.cc e305f61ae2b99d6d540ad6bebd7e796452363147
+++ app_state.cc a48e3316e58760390f478e34ca33a5475867d330
@@ -152,11 +152,11 @@
vector const & paths,
bool respect_ignore)
{
- static file_path root(internal, "");
+ static file_path root = file_path_internal("");
restrictions.clear();
for (vector::const_iterator i = paths.begin(); i != paths.end(); ++i)
{
- file_path p(external, *i);
+ file_path p = file_path_external(*i);
if (respect_ignore && lua.hook_ignore_file(p))
{
@@ -182,7 +182,7 @@
bool
app_state::restriction_includes(file_path const & path)
{
- static file_path root(internal, "");
+ static file_path root = file_path_internal("");
if (restrictions.empty())
{
return true;
@@ -208,7 +208,7 @@
{
L(F("checking restricted path set for '%s'\n") % test.string());
- file_path p(internal, test.string());
+ file_path p = file_path_internal(test.string());
path_set::const_iterator i = restrictions.find(p);
if (i != restrictions.end())
========================================================================
--- automate.cc ca486d66afc95b42519bd3831732b71099d45cc4
+++ automate.cc de5a69d2183076a45f2d5801fc81edea951e928c
@@ -237,7 +237,7 @@
if (args.size() == 1) {
// a filename was given, if it has attributes, print them
- file_path path(external, idx(args,0)());
+ file_path path = file_path_external(idx(args,0)());
attr_map::const_iterator i = attrs.find(path);
if (i == attrs.end()) return;
========================================================================
--- commands.cc 467f15799d4f2ce8da3095a56a35502a0548f8b0
+++ commands.cc 69b54198950751b1b3ec29fb9baa1edb94a48b7c
@@ -2121,7 +2121,7 @@
read_attr_map(attr_data, attrs);
}
- file_path path(external, idx(args,1));
+ file_path path = file_path_external(idx(args,1));
N(file_exists(path), F("file '%s' not found") % path);
bool attrs_modified = false;
@@ -3460,7 +3460,7 @@
if ((args.size() != 1) || (app.revision_selectors.size() > 1))
throw usage(name);
- file_path file(external, idx(args, 0));
+ file_path file = file_path_external(idx(args, 0));
if (app.revision_selectors.size() == 0)
get_revision_id(rid);
else
========================================================================
--- paths.cc 842f2b7b7b55c8e811c5d47b45f3a52a25ad57ba
+++ paths.cc 5459f9585f202f921b133f0b1d6aba09c61a5c4e
@@ -295,7 +295,7 @@
path_prefix = (i ? "" : "blah/blah/blah");
for (char const ** c = baddies; *c; ++c)
{
- file_path fp(internal, *c);
+ file_path fp(file_path::internal, *c);
BOOST_CHECK(fp.as_internal() == *c);
BOOST_CHECK(file_path(fp.as_internal()) == fp);
std::vector split_test;
@@ -313,7 +313,7 @@
static void check_fp_normalizes_to(char * before, char * after)
{
- file_path fp(external, before);
+ file_path fp(file_path::external, before);
BOOST_CHECK(fp.as_internal() == after);
BOOST_CHECK(file_path(internal, fp.as_internal()) == after);
// we compare after to the external form too, since as far as we know
@@ -409,8 +409,8 @@
static void test_split_join()
{
- file_path fp1(internal, "foo/bar/baz");
- file_path fp2(internal, "bar/baz/foo");
+ file_path fp1(file_path::internal, "foo/bar/baz");
+ file_path fp2(file_path::internal, "bar/baz/foo");
typedef std::vector pcv;
pcv split1, split2;
fp1.split(split1);
@@ -431,7 +431,7 @@
BOOST_CHECK(split1[1] == split2[0]);
BOOST_CHECK(split1[2] == split2[1]);
- file_path fp3(internal, "");
+ file_path fp3(file_path_internal, "");
pcv split3;
fp3.split(split3);
BOOST_CHECK(split3.size() == 1);
========================================================================
--- rcs_import.cc 140b9da9093485a0aa06a4ffbe9e99818da7a8e1
+++ rcs_import.cc bb9113bda3ccacea6236e9b9e5045ee2ff96756a
@@ -1484,7 +1484,7 @@
for (cvs_cluster::entry_map::const_iterator i = c.entries.begin();
i != c.entries.end(); ++i)
{
- file_path pth(internal, cvs.path_interner.lookup(i->first));
+ file_path pth = file_path_internal(cvs.path_interner.lookup(i->first));
file_id fid(cvs.file_version_interner.lookup(i->second.version));
if (i->second.live)
{
========================================================================
--- restrictions.cc 78d220a74de9051def3807502d7d3598ca1e994c
+++ restrictions.cc 2befadf39214a86ccfa02f83576fbd1c97a115ef
@@ -63,7 +63,7 @@
std::string::size_type j = std::string::npos;
while ((j = (*i)().rfind('/', j)) != std::string::npos)
{
- file_path dir(internal, (*i)().substr(0, j));
+ file_path dir = file_path_internal((*i)().substr(0, j));
if (intermediate_paths.find(dir) != intermediate_paths.end()) break;
if (paths.find(dir) != paths.end()) break;
intermediate_paths.insert(dir);