- // svn update or perhaps for svn this should be a noop
- // we need to detect conflict (eg "C" in output)
- // before we can do this.
- lyxerr << "Sorry not implemented." << endl;
+ FileName tmpf = FileName::tempName("lyxvcout");
+ if (tmpf.empty()) {
+ LYXERR(Debug::LYXVC, "Could not generate logfile " << tmpf);
+ return N_("Error: Could not generate logfile.");
+ }
+
+ doVCCommand("svn update " + quoteName(onlyFilename(owner_->absFileName()))
+ + " > " + tmpf.toFilesystemEncoding(),
+ FileName(owner_->filePath()));
+
+ string log;
+ string res = scanLogFile(tmpf, log);
+ if (!res.empty())
+ frontend::Alert::error(_("Revision control error."),
+ bformat(_("Error when updating from repository.\n"
+ "You have to manually resolve the conflicts NOW!\n'%1$s'.\n\n"
+ "After pressing OK, LyX will try to reopen resolved document."),
+ from_ascii(res)));
+ tmpf.erase();
+ return "SVN: " + log;