diff hg @ 107:707a7481a861

Make prompting go Minor UI tweaking Add merge prompting
author mpm@selenic.com
date Wed, 18 May 2005 18:25:37 -0800
parents e8d4bbf4c9e2
children 66fb61d9d97d
line wrap: on
line diff
--- a/hg	Wed May 18 17:37:49 2005 -0800
+++ b/hg	Wed May 18 18:25:37 2005 -0800
@@ -87,7 +87,9 @@
 options = {}
 opts = [('v', 'verbose', None, 'verbose'),
         ('d', 'debug', None, 'debug'),
-        ('q', 'quiet', None, 'quiet')]
+        ('q', 'quiet', None, 'quiet'),
+        ('y', 'noninteractive', None, 'run non-interactively'),
+        ]
 
 args = fancyopts.fancyopts(sys.argv[1:], opts, options,
                            'hg [options] <command> [command options] [files]')
@@ -98,7 +100,8 @@
 except:
     cmd = ""
 
-ui = hg.ui(options["verbose"], options["debug"], options["quiet"])
+ui = hg.ui(options["verbose"], options["debug"], options["quiet"],
+           not options["noninteractive"])
     
 if cmd == "init":
     repo = hg.repository(ui, ".", create=1)
@@ -348,6 +351,9 @@
     for f in files:
         print hg.hex(m[f]), f
 
+elif cmd == "debugprompt":
+    print ui.prompt(args[0], args[1], args[2])
+
 elif cmd == "debughash":
     f = repo.file(args[0])
     print f.encodepath(args[0])