#
# patch "ChangeLog"
# from [fa1d4b7e493828ddd605f870b1a85588d644a1ea]
# to [f04e5abb6e8050ffdd39c836b2cecd03d14b2fde]
#
# patch "commands.cc"
# from [6536a5fec8f4c742203ff8b03081b958c2b44be3]
# to [2c71b2923ed2eb397c91610c343de2e9627be11b]
#
# patch "commands.hh"
# from [cce382e66cf7064f56e731f8e9a48fe8be62d71c]
# to [f2f45ab20f37d33f52054ae343a0b1a099494a35]
#
--- ChangeLog
+++ ChangeLog
@@ -1,3 +1,9 @@
+2005-04-20 Matthew Gregan
+
+ * commands.cc (kill_rev_locally): Move up with rest of non-CMD()
+ functions. Mark static. Minor whitespace cleanup.
+ * commands.hh (kill_rev_locally): Declaration not needed now.
+
2005-04-20 Nathaniel Smith
* commands.cc (mdelta, mdata, fdelta, fdata, rdata): Check for
--- commands.cc
+++ commands.cc
@@ -1023,6 +1023,25 @@
}
}
+// Deletes a revision from the local database. This can be used to 'undo' a
+// changed revision from a local database without leaving (much of) a trace.
+static void
+kill_rev_locally(app_state& app, std::string const& id)
+{
+ revision_id ident;
+ complete(app, id, ident);
+ N(app.db.revision_exists(ident),
+ F("no revision %s found in database") % ident);
+
+ //check that the revision does not have any children
+ set children;
+ app.db.get_revision_children(ident, children);
+ N(!children.size(),
+ F("revision %s already has children. We cannot kill it.") % ident);
+
+ app.db.delete_existing_rev_and_certs(ident);
+}
+
// The changes_summary structure holds a list all of files and directories
// affected in a revision, and is useful in the 'log' command to print this
// information easily. It has to be constructed from all change_set objects
@@ -2463,24 +2482,6 @@
throw usage(name);
}
-/// Deletes a revision from the local database
-/// This can be used to 'undo' a changed revision from a local database without
-/// leaving a trace.
-void kill_rev_locally(app_state& app, std::string const& id){
- revision_id ident;
- complete(app, id, ident);
- N(app.db.revision_exists(ident),
- F("no revision %s found in database") % ident);
-
- //check that the revision does not have any children
- set children;
- app.db.get_revision_children(ident, children);
- N(!children.size(),
- F("revision %s already has children. We cannot kill it.") % ident);
-
- app.db.delete_existing_rev_and_certs(ident);
-}
-
CMD(attr, "working copy", "set FILE ATTR VALUE\nget FILE [ATTR]\ndrop FILE",
"set, get or drop file attributes")
{
--- commands.hh
+++ commands.hh
@@ -25,7 +25,6 @@
namespace commands {
void explain_usage(std::string const & cmd, std::ostream & out);
int process(app_state & app, std::string const & cmd, std::vector const & args);
- void kill_rev_locally(app_state& app, std::string const & id);
typedef enum
{
sel_author,