equal
deleted
inserted
replaced
65 if args[0] == 'git': |
65 if args[0] == 'git': |
66 args = args[1:] |
66 args = args[1:] |
67 |
67 |
68 cmd = args[0] |
68 cmd = args[0] |
69 if not cmd in gitcommands: |
69 if not cmd in gitcommands: |
70 raise error.Abort("error: unknown git command %s" % (cmd)) |
70 raise error.Abort(_("error: unknown git command %s") % (cmd)) |
71 |
71 |
72 ui.pager('githelp') |
72 ui.pager('githelp') |
73 args = args[1:] |
73 args = args[1:] |
74 return gitcommands[cmd](ui, repo, *args, **kwargs) |
74 return gitcommands[cmd](ui, repo, *args, **kwargs) |
75 |
75 |
88 if ('--' + ex.opt) in ex.msg: |
88 if ('--' + ex.opt) in ex.msg: |
89 flag = '--' + ex.opt |
89 flag = '--' + ex.opt |
90 elif ('-' + ex.opt) in ex.msg: |
90 elif ('-' + ex.opt) in ex.msg: |
91 flag = '-' + ex.opt |
91 flag = '-' + ex.opt |
92 else: |
92 else: |
93 raise error.Abort("unknown option %s" % ex.opt) |
93 raise error.Abort(_("unknown option %s") % ex.opt) |
94 try: |
94 try: |
95 args.remove(flag) |
95 args.remove(flag) |
96 except Exception: |
96 except Exception: |
97 raise error.Abort( |
97 raise error.Abort( |
98 "unknown option {0} packed with other options\n" |
98 "unknown option {0} packed with other options\n" |
334 cmd.append(rev) |
334 cmd.append(rev) |
335 elif opts.get('force'): |
335 elif opts.get('force'): |
336 cmd = Command('revert') |
336 cmd = Command('revert') |
337 cmd['--all'] = None |
337 cmd['--all'] = None |
338 else: |
338 else: |
339 raise error.Abort("a commit must be specified") |
339 raise error.Abort(_("a commit must be specified")) |
340 |
340 |
341 ui.status((bytes(cmd)), "\n") |
341 ui.status((bytes(cmd)), "\n") |
342 |
342 |
343 def cherrypick(ui, repo, *args, **kwargs): |
343 def cherrypick(ui, repo, *args, **kwargs): |
344 cmdoptions = [ |
344 cmdoptions = [ |
384 ('b', 'branch', '', ''), |
384 ('b', 'branch', '', ''), |
385 ] |
385 ] |
386 args, opts = parseoptions(ui, cmdoptions, args) |
386 args, opts = parseoptions(ui, cmdoptions, args) |
387 |
387 |
388 if len(args) == 0: |
388 if len(args) == 0: |
389 raise error.Abort("a repository to clone must be specified") |
389 raise error.Abort(_("a repository to clone must be specified")) |
390 |
390 |
391 cmd = Command('clone') |
391 cmd = Command('clone') |
392 cmd.append(args[0]) |
392 cmd.append(args[0]) |
393 if len(args) > 1: |
393 if len(args) > 1: |
394 cmd.append(args[1]) |
394 cmd.append(args[1]) |
774 ui.status(_("note: if you're trying to lift a commit off one branch, " + |
774 ui.status(_("note: if you're trying to lift a commit off one branch, " + |
775 "try hg rebase -d <destination commit> -s <commit to be lifted>" + |
775 "try hg rebase -d <destination commit> -s <commit to be lifted>" + |
776 "\n\n")) |
776 "\n\n")) |
777 cmd['-d'] = convert(opts.get('onto')) |
777 cmd['-d'] = convert(opts.get('onto')) |
778 if len(args) < 2: |
778 if len(args) < 2: |
779 raise error.Abort("Expected format: git rebase --onto X Y Z") |
779 raise error.Abort(_("Expected format: git rebase --onto X Y Z")) |
780 cmd['-s'] = "'::%s - ::%s'" % (convert(args[1]), convert(args[0])) |
780 cmd['-s'] = "'::%s - ::%s'" % (convert(args[1]), convert(args[0])) |
781 else: |
781 else: |
782 if len(args) == 1: |
782 if len(args) == 1: |
783 cmd['-d'] = convert(args[0]) |
783 cmd['-d'] = convert(args[0]) |
784 elif len(args) == 2: |
784 elif len(args) == 2: |