# # # patch "cmd_netsync.cc" # from [a45569ce4b7735f449ed9b05e3e12ac7c0457c97] # to [35412505a5868f3a6ad1dd54a0c82b9921428d24] # # patch "netsync.cc" # from [bf78b35eae5367b5acff68d4bc160756f28926c3] # to [758485dc2f86e59b810237185d8cc0b578fe4c3c] # # patch "options_list.hh" # from [556f0e2b7f83c5baece9886bcf2ef842ef2fc29e] # to [48113655eb5f5b1e14bfe6424cc504df801b968e] # ============================================================ --- cmd_netsync.cc a45569ce4b7735f449ed9b05e3e12ac7c0457c97 +++ cmd_netsync.cc 35412505a5868f3a6ad1dd54a0c82b9921428d24 @@ -248,6 +248,25 @@ CMD(push, "push", "", CMD_REF(network), client_voice, source_role, info); } +CMD_AUTOMATE(push, N_("[ADDRESS[:PORTNUMBER] [PATTERN ...]]"), + N_("Pushes branches to a netsync server"), + "", + options::opts::max_netsync_version | + options::opts::min_netsync_version | + options::opts::set_default | options::opts::exclude | + options::opts::key_to_push) +{ + database db(app); + key_store keys(app); + project_t project(db); + + netsync_connection_info info; + extract_client_connection_info(app.opts, app.lua, db, keys, project, args, info); + + run_netsync_protocol(app.opts, app.lua, project, keys, + client_voice, source_role, info); +} + CMD(pull, "pull", "", CMD_REF(network), N_("[ADDRESS[:PORTNUMBER] [PATTERN ...]]"), N_("Pulls branches from a netsync server"), @@ -271,6 +290,25 @@ CMD(pull, "pull", "", CMD_REF(network), client_voice, sink_role, info); } +CMD_AUTOMATE(pull, N_("[ADDRESS[:PORTNUMBER] [PATTERN ...]]"), + N_("Pulls branches from a netsync server"), + "", + options::opts::max_netsync_version | + options::opts::min_netsync_version | + options::opts::set_default | options::opts::exclude) +{ + database db(app); + key_store keys(app); + project_t project(db); + + netsync_connection_info info; + extract_client_connection_info(app.opts, app.lua, db, keys, project, + args, info, false); + + run_netsync_protocol(app.opts, app.lua, project, keys, + client_voice, sink_role, info); +} + CMD(sync, "sync", "", CMD_REF(network), N_("[ADDRESS[:PORTNUMBER] [PATTERN ...]]"), N_("Synchronizes branches with a netsync server"), @@ -299,6 +337,31 @@ CMD(sync, "sync", "", CMD_REF(network), client_voice, source_and_sink_role, info); } +CMD_AUTOMATE(sync, N_("[ADDRESS[:PORTNUMBER] [PATTERN ...]]"), + N_("Synchronizes branches with a netsync server"), + "", + options::opts::max_netsync_version | options::opts::min_netsync_version | + options::opts::set_default | options::opts::exclude | + options::opts::key_to_push) +{ + database db(app); + key_store keys(app); + project_t project(db); + + netsync_connection_info info; + extract_client_connection_info(app.opts, app.lua, db, keys, project, args, info); + + if (app.opts.set_default && workspace::found) + { + // Write workspace options, including key; this is the simplest way to + // fix a "found multiple keys" error reported by sync. + workspace work(app, true); + } + + run_netsync_protocol(app.opts, app.lua, project, keys, + client_voice, source_and_sink_role, info); +} + class dir_cleanup_helper { public: ============================================================ --- netsync.cc bf78b35eae5367b5acff68d4bc160756f28926c3 +++ netsync.cc 758485dc2f86e59b810237185d8cc0b578fe4c3c @@ -1217,6 +1217,10 @@ session::setup_client_tickers() { I(role == source_and_sink_role); // xgettext: please use short message and try to avoid multibytes chars + cert_in_ticker.reset(new ticker(N_("certs in"), "c", 3, false, true)); + // xgettext: please use short message and try to avoid multibytes chars + cert_out_ticker.reset(new ticker(N_("certs out"), "C", 3, false, true)); + // xgettext: please use short message and try to avoid multibytes chars revision_in_ticker.reset(new ticker(N_("revs in"), "r", 1)); // xgettext: please use short message and try to avoid multibytes chars revision_out_ticker.reset(new ticker(N_("revs out"), "R", 1)); @@ -3301,6 +3305,9 @@ call_server(options & opts, // Commit whatever work we managed to accomplish anyways. guard.commit(); + // ensure that the tickers have finished and write any last ticks + ui.ensure_clean_line(); + // We had an I/O error. We must decide if this represents a // user-reported error or a clean disconnect. See protocol // state diagram in session::process_bye_cmd. ============================================================ --- options_list.hh 556f0e2b7f83c5baece9886bcf2ef842ef2fc29e +++ options_list.hh 48113655eb5f5b1e14bfe6424cc504df801b968e @@ -91,6 +91,17 @@ OPT(automate_stdio_size, "automate-stdio } #endif +OPT(do_not_enforce_ssh_agent, "do-not-enforce-ssh-agent", bool, false, + gettext_noop("do not enforce the usage of ssh-agent. enabling this is " + "highly discouraged if you run this command over stdio " + "as it may prompt for a key password which cannot be " + "handled.")) +#ifdef option_bodies +{ + do_not_enforce_ssh_agent = true; +} +#endif + OPTSET(bind_opts) OPTVAR(bind_opts, std::list, bind_uris, ) OPTVAR(bind_opts, bool, bind_stdio, false)