# # # patch "README.encapsulation" # from [effe875fa4dde44dedfcc89434df5f56333690d8] # to [79dd1f01334e681277c7a3b715d5a8b74fca258c] # # patch "cmd_db.cc" # from [d0ce88834a3610e12551f25de08ad144d3efba31] # to [eee478f3a505c9630983790d6b720bf9f1bd6a94] # # patch "revision.cc" # from [0a9c31ea3b76bcbeb8ffb437d8587f7dbdb63926] # to [ee71418011758974d4b57e7905d2b587bea32007] # ============================================================ --- README.encapsulation effe875fa4dde44dedfcc89434df5f56333690d8 +++ README.encapsulation 79dd1f01334e681277c7a3b715d5a8b74fca258c @@ -1,8 +1,3 @@ -revision.cc: - - only a CMD(rev_height is left using the app_state - - database.cc: __app is a member variable of class database, it's needed for the ============================================================ --- cmd_db.cc d0ce88834a3610e12551f25de08ad144d3efba31 +++ cmd_db.cc eee478f3a505c9630983790d6b720bf9f1bd6a94 @@ -373,6 +373,20 @@ CMD_HIDDEN(test_migration_step, "test_mi app.db.test_migration_step(idx(args,0)()); } +CMD_HIDDEN(rev_height, "rev_height", "", CMD_REF(informative), N_("REV"), + N_("Shows a revision's height"), + "", + options::opts::none) +{ + if (args.size() != 1) + throw usage(execid); + revision_id rid(idx(args, 0)()); + N(app.db.revision_exists(rid), F("No such revision %s") % rid); + rev_height height; + app.db.get_rev_height(rid, height); + P(F("cached height: %s") % height); +} + // Local Variables: // mode: C++ // fill-column: 76 ============================================================ --- revision.cc 0a9c31ea3b76bcbeb8ffb437d8587f7dbdb63926 +++ revision.cc ee71418011758974d4b57e7905d2b587bea32007 @@ -25,7 +25,6 @@ #include "botan/botan.h" -#include "app_state.hh" #include "basic_io.hh" #include "cert.hh" #include "cset.hh" @@ -42,7 +41,6 @@ #include "safe_map.hh" #include "legacy.hh" #include "rev_height.hh" -#include "cmd.hh" using std::back_inserter; using std::copy; @@ -1782,20 +1780,6 @@ regenerate_caches(database & db) P(F("finished regenerating cached rosters and heights")); } -CMD_HIDDEN(rev_height, "rev_height", "", CMD_REF(informative), N_("REV"), - N_("Shows a revision's height"), - "", - options::opts::none) -{ - if (args.size() != 1) - throw usage(execid); - revision_id rid(idx(args, 0)()); - N(app.db.revision_exists(rid), F("No such revision %s") % rid); - rev_height height; - app.db.get_rev_height(rid, height); - P(F("cached height: %s") % height); -} - // i/o stuff namespace