+ static struct poptOption long_options[] = {
+@@ -613,6 +616,8 @@ static struct poptOption long_options[] = {
+ {"timeout", 0, POPT_ARG_INT, &io_timeout, 0, 0, 0 },
+ {"no-timeout", 0, POPT_ARG_VAL, &io_timeout, 0, 0, 0 },
+ {"contimeout", 0, POPT_ARG_INT, &connect_timeout, 0, 0, 0 },
++ {"stop-at", 0, POPT_ARG_STRING, 0, OPT_STOP_AT, 0, 0 },
++ {"time-limit", 0, POPT_ARG_STRING, 0, OPT_TIME_LIMIT, 0, 0 },
+ {"rsh", 'e', POPT_ARG_STRING, &shell_cmd, 0, 0, 0 },
+ {"rsync-path", 0, POPT_ARG_STRING, &rsync_path, 0, 0, 0 },
+ {"temp-dir", 'T', POPT_ARG_STRING, &tmpdir, 0, 0, 0 },
+@@ -1244,6 +1249,36 @@ int parse_arguments(int *argc_p, const char ***argv_p, int frommain)
+ return 0;
+ #endif
+
++ case OPT_STOP_AT:
++ arg = poptGetOptArg(pc);
++ if ((stop_at_utime = parse_time(arg)) == (time_t)-1) {
++ snprintf(err_buf, sizeof err_buf,
++ "invalid --stop-at format: %s\n",
++ arg);
++ rprintf(FERROR, "ERROR: %s", err_buf);
++ return 0;
++ }
++ if (stop_at_utime < time(NULL)) {
++ snprintf(err_buf, sizeof err_buf,
++ "--stop-at time is in the past: %s\n",
++ arg);
++ rprintf(FERROR, "ERROR: %s", err_buf);
++ return 0;
++ }
++ break;