Mercurial > hg > pyhgsh
comparison 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 |
comparison
equal
deleted
inserted
replaced
106:e8d4bbf4c9e2 | 107:707a7481a861 |
---|---|
85 sys.stdout.write(mdiff.unidiff(to, date1, tn, date2, f)) | 85 sys.stdout.write(mdiff.unidiff(to, date1, tn, date2, f)) |
86 | 86 |
87 options = {} | 87 options = {} |
88 opts = [('v', 'verbose', None, 'verbose'), | 88 opts = [('v', 'verbose', None, 'verbose'), |
89 ('d', 'debug', None, 'debug'), | 89 ('d', 'debug', None, 'debug'), |
90 ('q', 'quiet', None, 'quiet')] | 90 ('q', 'quiet', None, 'quiet'), |
91 ('y', 'noninteractive', None, 'run non-interactively'), | |
92 ] | |
91 | 93 |
92 args = fancyopts.fancyopts(sys.argv[1:], opts, options, | 94 args = fancyopts.fancyopts(sys.argv[1:], opts, options, |
93 'hg [options] <command> [command options] [files]') | 95 'hg [options] <command> [command options] [files]') |
94 | 96 |
95 try: | 97 try: |
96 cmd = args[0] | 98 cmd = args[0] |
97 args = args[1:] | 99 args = args[1:] |
98 except: | 100 except: |
99 cmd = "" | 101 cmd = "" |
100 | 102 |
101 ui = hg.ui(options["verbose"], options["debug"], options["quiet"]) | 103 ui = hg.ui(options["verbose"], options["debug"], options["quiet"], |
104 not options["noninteractive"]) | |
102 | 105 |
103 if cmd == "init": | 106 if cmd == "init": |
104 repo = hg.repository(ui, ".", create=1) | 107 repo = hg.repository(ui, ".", create=1) |
105 sys.exit(0) | 108 sys.exit(0) |
106 elif cmd == "branch" or cmd == "clone": | 109 elif cmd == "branch" or cmd == "clone": |
346 files.sort() | 349 files.sort() |
347 | 350 |
348 for f in files: | 351 for f in files: |
349 print hg.hex(m[f]), f | 352 print hg.hex(m[f]), f |
350 | 353 |
354 elif cmd == "debugprompt": | |
355 print ui.prompt(args[0], args[1], args[2]) | |
356 | |
351 elif cmd == "debughash": | 357 elif cmd == "debughash": |
352 f = repo.file(args[0]) | 358 f = repo.file(args[0]) |
353 print f.encodepath(args[0]) | 359 print f.encodepath(args[0]) |
354 | 360 |
355 elif cmd == "debugindex": | 361 elif cmd == "debugindex": |