Show More
@@ -20,7 +20,7 b' import sys, os, time' | |||||
20 | from mercurial import hg, mdiff, fancyopts |
|
20 | from mercurial import hg, mdiff, fancyopts | |
21 |
|
21 | |||
22 | def help(): |
|
22 | def help(): | |
23 |
|
|
23 | ui.status("""\ | |
24 | commands: |
|
24 | commands: | |
25 |
|
25 | |||
26 | add [files...] add the given files in the next commit |
|
26 | add [files...] add the given files in the next commit | |
@@ -42,7 +42,7 b' def help():' | |||||
42 | status show new, missing, and changed files in working dir |
|
42 | status show new, missing, and changed files in working dir | |
43 | tags show current changeset tags |
|
43 | tags show current changeset tags | |
44 | undo undo the last transaction |
|
44 | undo undo the last transaction | |
45 | """ |
|
45 | """) | |
46 |
|
46 | |||
47 | def filterfiles(list, files): |
|
47 | def filterfiles(list, files): | |
48 | l = [ x for x in list if x in files ] |
|
48 | l = [ x for x in list if x in files ] | |
@@ -372,13 +372,6 b' elif cmd == "dumpmanifest":' | |||||
372 | for f in files: |
|
372 | for f in files: | |
373 | print hg.hex(m[f]), f |
|
373 | print hg.hex(m[f]), f | |
374 |
|
374 | |||
375 | elif cmd == "debugprompt": |
|
|||
376 | print ui.prompt(args[0], args[1], args[2]) |
|
|||
377 |
|
||||
378 | elif cmd == "debughash": |
|
|||
379 | f = repo.file(args[0]) |
|
|||
380 | print f.encodepath(args[0]) |
|
|||
381 |
|
||||
382 | elif cmd == "debugindex": |
|
375 | elif cmd == "debugindex": | |
383 | if ".hg" not in args[0]: |
|
376 | if ".hg" not in args[0]: | |
384 | args[0] = ".hg/data/" + repo.file(args[0]).encodepath(args[0]) + "i" |
|
377 | args[0] = ".hg/data/" + repo.file(args[0]).encodepath(args[0]) + "i" | |
@@ -412,6 +405,17 b' elif cmd == "merge":' | |||||
412 | sys.exit(1) |
|
405 | sys.exit(1) | |
413 |
|
406 | |||
414 | if args: |
|
407 | if args: | |
|
408 | paths = {} | |||
|
409 | try: | |||
|
410 | pf = os.path.join(os.environ["HOME"], ".hgpaths") | |||
|
411 | for l in file(pf): | |||
|
412 | name, path = l.split() | |||
|
413 | paths[name] = path | |||
|
414 | except: | |||
|
415 | pass | |||
|
416 | ||||
|
417 | if args[0] in paths: args[0] = paths[args[0]] | |||
|
418 | ||||
415 | other = hg.repository(ui, args[0]) |
|
419 | other = hg.repository(ui, args[0]) | |
416 | ui.status("requesting changegroup\n") |
|
420 | ui.status("requesting changegroup\n") | |
417 | cg = repo.getchangegroup(other) |
|
421 | cg = repo.getchangegroup(other) | |
@@ -580,6 +584,6 b' elif cmd == "serve":' | |||||
580 | soptions["address"], soptions["port"]) |
|
584 | soptions["address"], soptions["port"]) | |
581 |
|
585 | |||
582 | else: |
|
586 | else: | |
583 |
|
|
587 | if cmd: ui.warn("unknown command\n\n") | |
584 | help() |
|
588 | help() | |
585 | sys.exit(1) |
|
589 | sys.exit(1) |
General Comments 0
You need to be logged in to leave comments.
Login now