comparison mercurial/commands.py @ 3194:182bdd589cbe

merge with crew
author Thomas Arendsen Hein <thomas@intevation.de>
date Fri, 29 Sep 2006 21:24:45 +0200
parents a6d0cd63068c 545b6d718593
children e18c3d08528d
comparison
equal deleted inserted replaced
3193:a6d0cd63068c 3194:182bdd589cbe
774 774
775 Unlike import/export, this exactly preserves all changeset 775 Unlike import/export, this exactly preserves all changeset
776 contents including permissions, rename data, and revision history. 776 contents including permissions, rename data, and revision history.
777 """ 777 """
778 dest = ui.expandpath(dest or 'default-push', dest or 'default') 778 dest = ui.expandpath(dest or 'default-push', dest or 'default')
779 setremoteconfig(ui, opts)
779 other = hg.repository(ui, dest) 780 other = hg.repository(ui, dest)
780 o = repo.findoutgoing(other, force=opts['force']) 781 o = repo.findoutgoing(other, force=opts['force'])
781 cg = repo.changegroup(o, 'bundle') 782 cg = repo.changegroup(o, 'bundle')
782 write_bundle(cg, fname) 783 write_bundle(cg, fname)
783 784
2688 ] 2689 ]
2689 2690
2690 dryrunopts = [('n', 'dry-run', None, 2691 dryrunopts = [('n', 'dry-run', None,
2691 _('do not perform actions, just print output'))] 2692 _('do not perform actions, just print output'))]
2692 2693
2694 remoteopts = [
2695 ('e', 'ssh', '', _('specify ssh command to use')),
2696 ('', 'remotecmd', '', _('specify hg command to run on the remote side')),
2697 ]
2698
2693 walkopts = [ 2699 walkopts = [
2694 ('I', 'include', [], _('include names matching the given patterns')), 2700 ('I', 'include', [], _('include names matching the given patterns')),
2695 ('X', 'exclude', [], _('exclude names matching the given patterns')), 2701 ('X', 'exclude', [], _('exclude names matching the given patterns')),
2696 ] 2702 ]
2697 2703
2738 ] + walkopts, 2744 ] + walkopts,
2739 _('hg backout [OPTION]... REV')), 2745 _('hg backout [OPTION]... REV')),
2740 "bundle": 2746 "bundle":
2741 (bundle, 2747 (bundle,
2742 [('f', 'force', None, 2748 [('f', 'force', None,
2743 _('run even when remote repository is unrelated'))], 2749 _('run even when remote repository is unrelated')),
2750 ] + remoteopts,
2744 _('hg bundle FILE DEST')), 2751 _('hg bundle FILE DEST')),
2745 "cat": 2752 "cat":
2746 (cat, 2753 (cat,
2747 [('o', 'output', '', _('print output to file with formatted name')), 2754 [('o', 'output', '', _('print output to file with formatted name')),
2748 ('r', 'rev', '', _('print the given revision')), 2755 ('r', 'rev', '', _('print the given revision')),
2754 ('r', 'rev', [], 2761 ('r', 'rev', [],
2755 _('a changeset you would like to have after cloning')), 2762 _('a changeset you would like to have after cloning')),
2756 ('', 'pull', None, _('use pull protocol to copy metadata')), 2763 ('', 'pull', None, _('use pull protocol to copy metadata')),
2757 ('', 'uncompressed', None, 2764 ('', 'uncompressed', None,
2758 _('use uncompressed transfer (fast over LAN)')), 2765 _('use uncompressed transfer (fast over LAN)')),
2759 ('e', 'ssh', '', _('specify ssh command to use')), 2766 ] + remoteopts,
2760 ('', 'remotecmd', '',
2761 _('specify hg command to run on the remote side'))],
2762 _('hg clone [OPTION]... SOURCE [DEST]')), 2767 _('hg clone [OPTION]... SOURCE [DEST]')),
2763 "^commit|ci": 2768 "^commit|ci":
2764 (commit, 2769 (commit,
2765 [('A', 'addremove', None, 2770 [('A', 'addremove', None,
2766 _('mark new/missing files as added/removed before committing')), 2771 _('mark new/missing files as added/removed before committing')),
2861 ('n', 'newest-first', None, _('show newest record first')), 2866 ('n', 'newest-first', None, _('show newest record first')),
2862 ('', 'bundle', '', _('file to store the bundles into')), 2867 ('', 'bundle', '', _('file to store the bundles into')),
2863 ('p', 'patch', None, _('show patch')), 2868 ('p', 'patch', None, _('show patch')),
2864 ('r', 'rev', [], _('a specific revision up to which you would like to pull')), 2869 ('r', 'rev', [], _('a specific revision up to which you would like to pull')),
2865 ('', 'template', '', _('display with template')), 2870 ('', 'template', '', _('display with template')),
2866 ('e', 'ssh', '', _('specify ssh command to use')), 2871 ] + remoteopts,
2867 ('', 'remotecmd', '',
2868 _('specify hg command to run on the remote side'))],
2869 _('hg incoming [-p] [-n] [-M] [-r REV]...' 2872 _('hg incoming [-p] [-n] [-M] [-r REV]...'
2870 ' [--bundle FILENAME] [SOURCE]')), 2873 ' [--bundle FILENAME] [SOURCE]')),
2871 "^init": 2874 "^init":
2872 (init, 2875 (init, remoteopts, _('hg init [-e FILE] [--remotecmd FILE] [DEST]')),
2873 [('e', 'ssh', '', _('specify ssh command to use')),
2874 ('', 'remotecmd', '',
2875 _('specify hg command to run on the remote side'))],
2876 _('hg init [-e FILE] [--remotecmd FILE] [DEST]')),
2877 "locate": 2876 "locate":
2878 (locate, 2877 (locate,
2879 [('r', 'rev', '', _('search the repository as it stood at rev')), 2878 [('r', 'rev', '', _('search the repository as it stood at rev')),
2880 ('0', 'print0', None, 2879 ('0', 'print0', None,
2881 _('end filenames with NUL, for use with xargs')), 2880 _('end filenames with NUL, for use with xargs')),
2914 ('p', 'patch', None, _('show patch')), 2913 ('p', 'patch', None, _('show patch')),
2915 ('', 'style', '', _('display using template map file')), 2914 ('', 'style', '', _('display using template map file')),
2916 ('r', 'rev', [], _('a specific revision you would like to push')), 2915 ('r', 'rev', [], _('a specific revision you would like to push')),
2917 ('n', 'newest-first', None, _('show newest record first')), 2916 ('n', 'newest-first', None, _('show newest record first')),
2918 ('', 'template', '', _('display with template')), 2917 ('', 'template', '', _('display with template')),
2919 ('e', 'ssh', '', _('specify ssh command to use')), 2918 ] + remoteopts,
2920 ('', 'remotecmd', '',
2921 _('specify hg command to run on the remote side'))],
2922 _('hg outgoing [-M] [-p] [-n] [-r REV]... [DEST]')), 2919 _('hg outgoing [-M] [-p] [-n] [-r REV]... [DEST]')),
2923 "^parents": 2920 "^parents":
2924 (parents, 2921 (parents,
2925 [('b', 'branches', None, _('show branches')), 2922 [('b', 'branches', None, _('show branches')),
2926 ('r', 'rev', '', _('show parents from the specified rev')), 2923 ('r', 'rev', '', _('show parents from the specified rev')),
2930 "paths": (paths, [], _('hg paths [NAME]')), 2927 "paths": (paths, [], _('hg paths [NAME]')),
2931 "^pull": 2928 "^pull":
2932 (pull, 2929 (pull,
2933 [('u', 'update', None, 2930 [('u', 'update', None,
2934 _('update the working directory to tip after pull')), 2931 _('update the working directory to tip after pull')),
2935 ('e', 'ssh', '', _('specify ssh command to use')),
2936 ('f', 'force', None, 2932 ('f', 'force', None,
2937 _('run even when remote repository is unrelated')), 2933 _('run even when remote repository is unrelated')),
2938 ('r', 'rev', [], _('a specific revision up to which you would like to pull')), 2934 ('r', 'rev', [], _('a specific revision up to which you would like to pull')),
2939 ('', 'remotecmd', '', 2935 ] + remoteopts,
2940 _('specify hg command to run on the remote side'))],
2941 _('hg pull [-u] [-r REV]... [-e FILE] [--remotecmd FILE] [SOURCE]')), 2936 _('hg pull [-u] [-r REV]... [-e FILE] [--remotecmd FILE] [SOURCE]')),
2942 "^push": 2937 "^push":
2943 (push, 2938 (push,
2944 [('f', 'force', None, _('force push')), 2939 [('f', 'force', None, _('force push')),
2945 ('e', 'ssh', '', _('specify ssh command to use')),
2946 ('r', 'rev', [], _('a specific revision you would like to push')), 2940 ('r', 'rev', [], _('a specific revision you would like to push')),
2947 ('', 'remotecmd', '', 2941 ] + remoteopts,
2948 _('specify hg command to run on the remote side'))],
2949 _('hg push [-f] [-r REV]... [-e FILE] [--remotecmd FILE] [DEST]')), 2942 _('hg push [-f] [-r REV]... [-e FILE] [--remotecmd FILE] [DEST]')),
2950 "debugrawcommit|rawcommit": 2943 "debugrawcommit|rawcommit":
2951 (rawcommit, 2944 (rawcommit,
2952 [('p', 'parent', [], _('parent')), 2945 [('p', 'parent', [], _('parent')),
2953 ('d', 'date', '', _('date code')), 2946 ('d', 'date', '', _('date code')),