# HG changeset patch # User wenzelm # Date 1398777881 -7200 # Node ID df03bf8c36a1f7fd044d5d90d7f7faa62a6392b4 # Parent 776890e0cf716e94db497f1daf8e39991636db91 basic support for Mercurial command line tools; diff -r 776890e0cf71 -r df03bf8c36a1 src/Pure/System/isabelle_system.scala --- a/src/Pure/System/isabelle_system.scala Tue Apr 29 14:50:40 2014 +0200 +++ b/src/Pure/System/isabelle_system.scala Tue Apr 29 15:24:41 2014 +0200 @@ -444,6 +444,7 @@ def err: String = cat_lines(err_lines) def add_err(s: String): Bash_Result = copy(err_lines = err_lines ::: List(s)) def set_rc(i: Int): Bash_Result = copy(rc = i) + def check_error: Bash_Result = if (rc != 0) error(err) else this } private class Limited_Progress(proc: Managed_Process, progress_limit: Option[Long]) @@ -514,6 +515,8 @@ def pdf_viewer(arg: Path): Unit = bash("exec \"$PDF_VIEWER\" '" + standard_path(arg) + "' >/dev/null 2>/dev/null &") + def hg(cmd_line: String, cwd: Path = Path.current): Bash_Result = + bash("cd " + shell_path(cwd) + " && \"${HG:-hg}\" " + cmd_line) /** Isabelle resources **/