more operations;
authorwenzelm
Sun, 02 Oct 2016 20:06:57 +0200
changeset 63998 2f38d8aff2f5
parent 63997 e11ccb5aa82f
child 63999 5649a993666d
more operations;
src/Pure/General/mercurial.scala
--- a/src/Pure/General/mercurial.scala	Sun Oct 02 19:47:18 2016 +0200
+++ b/src/Pure/General/mercurial.scala	Sun Oct 02 20:06:57 2016 +0200
@@ -30,8 +30,11 @@
     def command(cmd: String, cwd: JFile = null): Process_Result =
       Isabelle_System.hg("--repository " + File.bash_path(root) + " " + cmd, cwd = cwd)
 
-    def manifest(rev: String = "", cwd: JFile = null): List[String] =
-      command("manifest" + opt_rev(rev), cwd = cwd).check.out_lines
+    def identify(rev: String = "", options: String = ""): String =
+      command("id -i " + options + opt_rev(rev)).check.out_lines.headOption getOrElse ""
+
+    def manifest(rev: String = "", options: String = ""): List[String] =
+      command("manifest " + options + opt_rev(rev)).check.out_lines
 
     command("root").check
   }