# # # patch "cmd_ws_commit.cc" # from [8d1fcea9995a4ec8b88e26fcb5bf138531939884] # to [351179677e8ed8d6ef4c3fe4c436337bcf5d1c50] # ============================================================ --- cmd_ws_commit.cc 8d1fcea9995a4ec8b88e26fcb5bf138531939884 +++ cmd_ws_commit.cc 351179677e8ed8d6ef4c3fe4c436337bcf5d1c50 @@ -9,6 +9,7 @@ #include +#include "asciik.hh" #include "cmd.hh" #include "diff_patch.hh" #include "file_io.hh" @@ -415,7 +416,7 @@ CMD(status, N_("informative"), N_("[PATH } CMD(status, N_("informative"), N_("[PATH]..."), N_("show status of workspace"), - options::opts::depth | options::opts::exclude) + options::opts::depth | options::opts::exclude | options::opts::no_graph) { roster_t new_roster; parent_map old_rosters; @@ -434,6 +435,21 @@ CMD(status, N_("informative"), N_("[PATH app.work.update_current_roster_from_filesystem(new_roster, mask); make_restricted_revision(old_rosters, new_roster, mask, rev); + if (!app.opts.no_graph) { + asciik graph; + set parents; + for (edge_map::const_iterator i = rev.edges.begin(); i != rev.edges.end(); + ++i) + parents.insert(edge_old_revision(*i)); + graph.print(revision_id(), parents, revision_id().inner()() + "ciao"); + for (set::const_iterator i = parents.begin(); + i != parents.end(); ++i) + { + set grandparents; + app.db.get_revision_parents(*i, grandparents); + graph.print(i, grandparents, i->inner()()); + } + } // We intentionally do not collapse the final \n into the format // strings here, for consistency with newline conventions used by most // other format strings. @@ -1044,7 +1060,7 @@ CMD_NO_WORKSPACE(import, N_("tree"), N_( // commit if (!app.opts.dryrun) - process(app, "commit", empty_args); + process(app, "commit", empty_args); } catch (...) {