# # # patch "ChangeLog" # from [f58aae619a2fce8ec5dc17991401ab9cb6645e60] # to [c9d120932c269c85778d0c8d1f65ec41b1995cc9] # # patch "automate.cc" # from [c2d1209b39ea49b0c5c4c40496b7b5afe9791c61] # to [18458490c7f2fd24860839b4a474e4e2197f56dd] # ============================================================ --- ChangeLog f58aae619a2fce8ec5dc17991401ab9cb6645e60 +++ ChangeLog c9d120932c269c85778d0c8d1f65ec41b1995cc9 @@ -1,3 +1,9 @@ +2006-10-12 Thomas Keller + + * automate.cc: replaced std::endl in favour of simple unix + unix line endings which is useful if these commands are used + over automate stdio (flushing is expensive...) + 2006-10-03 Evan Deaubl * monotone.cc, options_list.hh: Added ability to specify ============================================================ --- automate.cc c2d1209b39ea49b0c5c4c40496b7b5afe9791c61 +++ automate.cc 18458490c7f2fd24860839b4a474e4e2197f56dd @@ -38,7 +38,6 @@ using std::char_traits; using std::basic_ios; using std::basic_stringbuf; using std::char_traits; -using std::endl; using std::inserter; using std::make_pair; using std::map; @@ -74,7 +73,7 @@ AUTOMATE(heads, N_("[BRANCH]")) set heads; get_branch_heads(app.branch_name(), app, heads); for (set::const_iterator i = heads.begin(); i != heads.end(); ++i) - output << (*i).inner()() << endl; + output << (*i).inner()() << "\n"; } // Name: ancestors @@ -120,7 +119,7 @@ AUTOMATE(ancestors, N_("REV1 [REV2 [REV3 for (set::const_iterator i = ancestors.begin(); i != ancestors.end(); ++i) if (!null_id(*i)) - output << (*i).inner()() << endl; + output << (*i).inner()() << "\n"; } @@ -164,7 +163,7 @@ AUTOMATE(descendents, N_("REV1 [REV2 [RE } for (set::const_iterator i = descendents.begin(); i != descendents.end(); ++i) - output << (*i).inner()() << endl; + output << (*i).inner()() << "\n"; } @@ -192,7 +191,7 @@ AUTOMATE(erase_ancestors, N_("[REV1 [REV } erase_ancestors(revs, app); for (set::const_iterator i = revs.begin(); i != revs.end(); ++i) - output << (*i).inner()() << endl; + output << (*i).inner()() << "\n"; } // Name: attributes @@ -335,7 +334,7 @@ AUTOMATE(toposort, N_("[REV1 [REV2 [REV3 toposort(revs, sorted, app); for (vector::const_iterator i = sorted.begin(); i != sorted.end(); ++i) - output << (*i).inner()() << endl; + output << (*i).inner()() << "\n"; } // Name: ancestry_difference @@ -377,7 +376,7 @@ AUTOMATE(ancestry_difference, N_("NEW_RE toposort(ancestors, sorted, app); for (vector::const_iterator i = sorted.begin(); i != sorted.end(); ++i) - output << (*i).inner()() << endl; + output << (*i).inner()() << "\n"; } // Name: leaves @@ -408,7 +407,7 @@ AUTOMATE(leaves, "") leaves.erase(i->first); for (set::const_iterator i = leaves.begin(); i != leaves.end(); ++i) - output << (*i).inner()() << endl; + output << (*i).inner()() << "\n"; } // Name: parents @@ -432,7 +431,7 @@ AUTOMATE(parents, N_("REV")) for (set::const_iterator i = parents.begin(); i != parents.end(); ++i) if (!null_id(*i)) - output << (*i).inner()() << endl; + output << (*i).inner()() << "\n"; } // Name: children @@ -456,7 +455,7 @@ AUTOMATE(children, N_("REV")) for (set::const_iterator i = children.begin(); i != children.end(); ++i) if (!null_id(*i)) - output << (*i).inner()() << endl; + output << (*i).inner()() << "\n"; } // Name: graph @@ -510,7 +509,7 @@ AUTOMATE(graph, "") for (set::const_iterator j = i->second.begin(); j != i->second.end(); ++j) output << " " << (*j).inner()(); - output << endl; + output << "\n"; } } @@ -537,7 +536,7 @@ AUTOMATE(select, N_("SELECTOR")) for (set::const_iterator i = completions.begin(); i != completions.end(); ++i) - output << *i << endl; + output << *i << "\n"; } // consider a changeset with the following @@ -824,7 +823,7 @@ AUTOMATE(inventory, "") output << path_suffix; - output << endl; + output << "\n"; } } @@ -944,7 +943,7 @@ AUTOMATE(get_base_revision_id, "") revision_id rid; app.work.get_revision_id(rid); - output << rid << endl; + output << rid << "\n"; } // Name: get_current_revision_id @@ -977,7 +976,7 @@ AUTOMATE(get_current_revision_id, "") calculate_ident(rev, new_revision_id); - output << new_revision_id << endl; + output << new_revision_id << "\n"; } // Name: get_manifest_of @@ -1252,7 +1251,7 @@ AUTOMATE(common_ancestors, N_("REV1 [REV for (set::const_iterator i = common_ancestors.begin(); i != common_ancestors.end(); ++i) if (!null_id(*i)) - output << (*i).inner()() << endl; + output << (*i).inner()() << "\n"; } // Name: branches @@ -1280,7 +1279,7 @@ AUTOMATE(branches, "") for (vector::const_iterator i = names.begin(); i != names.end(); ++i) if (!app.lua.hook_ignore_branch(*i)) - output << (*i) << endl; + output << (*i) << "\n"; } // Name: tags @@ -1485,13 +1484,13 @@ AUTOMATE(get_option, N_("OPTION")) string opt = args[0](); if (opt == "database") - output << database_option << endl; + output << database_option << "\n"; else if (opt == "branch") - output << branch_option << endl; + output << branch_option << "\n"; else if (opt == "key") - output << key_option << endl; + output << key_option << "\n"; else if (opt == "keydir") - output << keydir_option << endl; + output << keydir_option << "\n"; else N(false, F("'%s' is not a recognized workspace option") % opt); }