#
#
# patch "ChangeLog"
# from [65c8b4eff828bd4b016d00717ed0763bb03f1e1f]
# to [97f0535b7027ff509f5e97d762b4e5a76ffe5fc5]
#
# patch "cmd_list.cc"
# from [79f91298e7627e90ecbccb65d5fc693f26af026c]
# to [2251384099a9d52d757829f388a0dde3013f0f94]
#
# patch "cmd_ws_commit.cc"
# from [7dc23e7fa867951dbc82b5bd2da8a3560f2e4fc6]
# to [7c6997b990823c878080f41b0428b2543fa0c896]
#
# patch "paths.cc"
# from [d1a8c00a2bfdac86d0dd9947b5a59010fc824fb7]
# to [33170c42ef7db7d1205e132558b8a568fa6ac430]
#
# patch "paths.hh"
# from [601092879bde9e640b917cd6515dfa60151ca587]
# to [6b435d71c4ffd44102ce968f714fde870b4fad55]
#
============================================================
--- ChangeLog 65c8b4eff828bd4b016d00717ed0763bb03f1e1f
+++ ChangeLog 97f0535b7027ff509f5e97d762b4e5a76ffe5fc5
@@ -1,3 +1,12 @@
+2006-12-22 Derek Scherger
+
+ * cmd_list.cc (ls):
+ * cmd_ws_commit.cc (mv,co): add semi's to ALIASes so indent-region works
+ (pivot_root): tweak indentation
+ (add,drop): use args_to_paths and new split_paths function
+ * paths.{cc,hh} (split_paths): new function to split a vector of
+ file_paths into a set of split_paths
+
2006-12-19 Thomas Keller
* monotone.texi: added missing documentation for
============================================================
--- cmd_list.cc 79f91298e7627e90ecbccb65d5fc693f26af026c
+++ cmd_list.cc 2251384099a9d52d757829f388a0dde3013f0f94
@@ -524,7 +524,7 @@ CMD(list, N_("informative"),
throw usage(name);
}
-ALIAS(ls, list)
+ALIAS(ls, list);
namespace
{
============================================================
--- cmd_ws_commit.cc 7dc23e7fa867951dbc82b5bd2da8a3560f2e4fc6
+++ cmd_ws_commit.cc 7c6997b990823c878080f41b0428b2543fa0c896
@@ -334,13 +334,7 @@ CMD(add, N_("workspace"), N_("[PATH]..."
app.work.find_unknown_and_ignored(mask, roots, paths, ignored);
}
else
- for (vector::const_iterator i = args.begin();
- i != args.end(); ++i)
- {
- split_path sp;
- file_path_external(*i).split(sp);
- paths.insert(sp);
- }
+ split_paths(args_to_paths(args), paths);
bool add_recursive = app.opts.recursive;
app.work.perform_additions(paths, add_recursive, !app.opts.no_ignore);
@@ -368,13 +362,7 @@ CMD(drop, N_("workspace"), N_("[PATH]...
app.work.find_missing(current_roster_shape, mask, paths);
}
else
- for (vector::const_iterator i = args.begin();
- i != args.end(); ++i)
- {
- split_path sp;
- file_path_external(*i).split(sp);
- paths.insert(sp);
- }
+ split_paths(args_to_paths(args), paths);
app.work.perform_deletions(paths, app.opts.recursive, app.opts.execute);
}
@@ -404,17 +392,17 @@ CMD(rename, N_("workspace"),
app.work.perform_rename(src_paths, dst_path, app.opts.execute);
}
-ALIAS(mv, rename)
+ALIAS(mv, rename);
- CMD(pivot_root, N_("workspace"), N_("NEW_ROOT PUT_OLD"),
- N_("rename the root directory\n"
- "after this command, the directory that currently "
- "has the name NEW_ROOT\n"
- "will be the root directory, and the directory "
- "that is currently the root\n"
- "directory will have name PUT_OLD.\n"
- "Using --execute is strongly recommended."),
+CMD(pivot_root, N_("workspace"), N_("NEW_ROOT PUT_OLD"),
+ N_("rename the root directory\n"
+ "after this command, the directory that currently "
+ "has the name NEW_ROOT\n"
+ "will be the root directory, and the directory "
+ "that is currently the root\n"
+ "directory will have name PUT_OLD.\n"
+ "Using --execute is strongly recommended."),
options::opts::execute)
{
if (args.size() != 2)
@@ -630,7 +618,7 @@ CMD(checkout, N_("tree"), N_("[DIRECTORY
guard.commit();
}
-ALIAS(co, checkout)
+ALIAS(co, checkout);
CMD(attr, N_("workspace"), N_("set PATH ATTR VALUE\nget PATH [ATTR]\ndrop PATH [ATTR]"),
N_("set, get or drop file attributes"),
============================================================
--- paths.cc d1a8c00a2bfdac86d0dd9947b5a59010fc824fb7
+++ paths.cc 33170c42ef7db7d1205e132558b8a568fa6ac430
@@ -26,6 +26,7 @@ using std::string;
using std::ostream;
using std::ostringstream;
using std::string;
+using std::vector;
// some structure to ensure we aren't doing anything broken when resolving
@@ -382,6 +383,18 @@ file_path::split(split_path & sp) const
}
}
+void
+split_paths(std::vector const & file_paths, path_set & split_paths)
+{
+ for (vector::const_iterator i = file_paths.begin();
+ i != file_paths.end(); ++i)
+ {
+ split_path sp;
+ i->split(sp);
+ split_paths.insert(sp);
+ }
+}
+
template <>
void dump(split_path const & sp, string & out)
{
============================================================
--- paths.hh 601092879bde9e640b917cd6515dfa60151ca587
+++ paths.hh 6b435d71c4ffd44102ce968f714fde870b4fad55
@@ -271,6 +271,9 @@ typedef std::set path_set;
typedef std::set path_set;
+void
+split_paths(std::vector const & file_paths, path_set & split_paths);
+
// equivalent to file_path_internal(path).split(sp) but more efficient.
void
internal_string_to_split_path(std::string const & path, split_path & sp);