Mercurial > public > mercurial-scm > hg
comparison mercurial/commands.py @ 1811:6cb548cffdf5
resync commands.py docstrings with hg.1.txt
author | Benoit Boissinot <benoit.boissinot@ens-lyon.org> |
---|---|
date | Tue, 28 Feb 2006 00:46:06 +0100 |
parents | c3f959c1c3ff |
children | a81f99dfaa2a |
comparison
equal
deleted
inserted
replaced
1804:c3f959c1c3ff | 1811:6cb548cffdf5 |
---|---|
694 For efficiency, hardlinks are used for cloning whenever the source | 694 For efficiency, hardlinks are used for cloning whenever the source |
695 and destination are on the same filesystem. Some filesystems, | 695 and destination are on the same filesystem. Some filesystems, |
696 such as AFS, implement hardlinking incorrectly, but do not report | 696 such as AFS, implement hardlinking incorrectly, but do not report |
697 errors. In these cases, use the --pull option to avoid | 697 errors. In these cases, use the --pull option to avoid |
698 hardlinking. | 698 hardlinking. |
699 | |
700 See pull for valid source format details. | |
699 """ | 701 """ |
700 if dest is None: | 702 if dest is None: |
701 dest = os.path.basename(os.path.normpath(source)) | 703 dest = os.path.basename(os.path.normpath(source)) |
702 | 704 |
703 if os.path.exists(dest): | 705 if os.path.exists(dest): |
1711 """show changesets not found in destination | 1713 """show changesets not found in destination |
1712 | 1714 |
1713 Show changesets not found in the specified destination repo or the | 1715 Show changesets not found in the specified destination repo or the |
1714 default push repo. These are the changesets that would be pushed | 1716 default push repo. These are the changesets that would be pushed |
1715 if a push was requested. | 1717 if a push was requested. |
1718 | |
1719 See pull for valid source format details. | |
1716 """ | 1720 """ |
1717 dest = ui.expandpath(dest, repo.root) | 1721 dest = ui.expandpath(dest, repo.root) |
1718 other = hg.repository(ui, dest) | 1722 other = hg.repository(ui, dest) |
1719 o = repo.findoutgoing(other) | 1723 o = repo.findoutgoing(other) |
1720 o = repo.changelog.nodesbetween(o)[0] | 1724 o = repo.changelog.nodesbetween(o)[0] |
1852 revs = [repo.lookup(rev) for rev in opts['rev']] | 1856 revs = [repo.lookup(rev) for rev in opts['rev']] |
1853 r = repo.push(other, opts['force'], revs=revs) | 1857 r = repo.push(other, opts['force'], revs=revs) |
1854 return r | 1858 return r |
1855 | 1859 |
1856 def rawcommit(ui, repo, *flist, **rc): | 1860 def rawcommit(ui, repo, *flist, **rc): |
1857 """raw commit interface (DEPRECATED) | 1861 """raw commit interface |
1858 | 1862 |
1863 (DEPRECATED) | |
1859 Lowlevel commit, for use in helper scripts. | 1864 Lowlevel commit, for use in helper scripts. |
1860 | 1865 |
1861 This command is not intended to be used by normal users, as it is | 1866 This command is not intended to be used by normal users, as it is |
1862 primarily useful for importing from other SCMs. | 1867 primarily useful for importing from other SCMs. |
1863 | 1868 |
1958 return errs | 1963 return errs |
1959 | 1964 |
1960 def revert(ui, repo, *pats, **opts): | 1965 def revert(ui, repo, *pats, **opts): |
1961 """revert modified files or dirs back to their unmodified states | 1966 """revert modified files or dirs back to their unmodified states |
1962 | 1967 |
1963 Revert any uncommitted modifications made to the named files or | 1968 In its default mode, it reverts any uncommitted modifications made |
1964 directories. This restores the contents of the affected files to | 1969 to the named files or directories. This restores the contents of |
1965 an unmodified state. | 1970 the affected files to an unmodified state. |
1971 | |
1972 Using the -r option, it reverts the given files or directories to | |
1973 their state as of an earlier revision. This can be helpful to "roll | |
1974 back" some or all of a change that should not have been committed. | |
1975 | |
1976 Revert modifies the working directory. It does not commit any | |
1977 changes, or change the parent of the current working directory. | |
1966 | 1978 |
1967 If a file has been deleted, it is recreated. If the executable | 1979 If a file has been deleted, it is recreated. If the executable |
1968 mode of a file was changed, it is reset. | 1980 mode of a file was changed, it is reset. |
1969 | 1981 |
1970 If names are given, all files matching the names are reverted. | 1982 If names are given, all files matching the names are reverted. |
2365 ('d', 'date', None, _('list the date')), | 2377 ('d', 'date', None, _('list the date')), |
2366 ('n', 'number', None, _('list the revision number (default)')), | 2378 ('n', 'number', None, _('list the revision number (default)')), |
2367 ('c', 'changeset', None, _('list the changeset')), | 2379 ('c', 'changeset', None, _('list the changeset')), |
2368 ('I', 'include', [], _('include names matching the given patterns')), | 2380 ('I', 'include', [], _('include names matching the given patterns')), |
2369 ('X', 'exclude', [], _('exclude names matching the given patterns'))], | 2381 ('X', 'exclude', [], _('exclude names matching the given patterns'))], |
2370 _('hg annotate [OPTION]... FILE...')), | 2382 _('hg annotate [-r <rev> -u -n -c -d] [files ...]')), |
2371 "bundle": | 2383 "bundle": |
2372 (bundle, | 2384 (bundle, |
2373 [], | 2385 [], |
2374 _('hg bundle FILE DEST')), | 2386 _('hg bundle FILE DEST')), |
2375 "cat": | 2387 "cat": |
2440 "^export": | 2452 "^export": |
2441 (export, | 2453 (export, |
2442 [('o', 'output', '', _('print output to file with formatted name')), | 2454 [('o', 'output', '', _('print output to file with formatted name')), |
2443 ('a', 'text', None, _('treat all files as text')), | 2455 ('a', 'text', None, _('treat all files as text')), |
2444 ('', 'switch-parent', None, _('diff against the second parent'))], | 2456 ('', 'switch-parent', None, _('diff against the second parent'))], |
2445 _('hg export [-a] [-o OUTFILE] REV...')), | 2457 _('hg export [-a] [-o filespec] REV...')), |
2446 "forget": | 2458 "forget": |
2447 (forget, | 2459 (forget, |
2448 [('I', 'include', [], _('include names matching the given patterns')), | 2460 [('I', 'include', [], _('include names matching the given patterns')), |
2449 ('X', 'exclude', [], _('exclude names matching the given patterns'))], | 2461 ('X', 'exclude', [], _('exclude names matching the given patterns'))], |
2450 _('hg forget [OPTION]... FILE...')), | 2462 _('hg forget [OPTION]... FILE...')), |
2597 [('l', 'local', None, _('make the tag local')), | 2609 [('l', 'local', None, _('make the tag local')), |
2598 ('m', 'message', '', _('message for tag commit log entry')), | 2610 ('m', 'message', '', _('message for tag commit log entry')), |
2599 ('d', 'date', '', _('record datecode as commit date')), | 2611 ('d', 'date', '', _('record datecode as commit date')), |
2600 ('u', 'user', '', _('record user as commiter')), | 2612 ('u', 'user', '', _('record user as commiter')), |
2601 ('r', 'rev', '', _('revision to tag'))], | 2613 ('r', 'rev', '', _('revision to tag'))], |
2602 _('hg tag [-r REV] [OPTION]... NAME')), | 2614 _('hg tag [-l -m <text> -d <datecode> -u <user> -r <rev>] <name>')), |
2603 "tags": (tags, [], _('hg tags')), | 2615 "tags": (tags, [], _('hg tags')), |
2604 "tip": | 2616 "tip": |
2605 (tip, | 2617 (tip, |
2606 [('b', 'branches', None, _('show branches')), | 2618 [('b', 'branches', None, _('show branches')), |
2607 ('p', 'patch', None, _('show patch'))], | 2619 ('p', 'patch', None, _('show patch'))], |
2608 _('hg [-b] [-p] tip')), | 2620 _('hg tip [-b] [-p]')), |
2609 "unbundle": | 2621 "unbundle": |
2610 (unbundle, | 2622 (unbundle, |
2611 [('u', 'update', None, | 2623 [('u', 'update', None, |
2612 _('update the working directory to tip after unbundle'))], | 2624 _('update the working directory to tip after unbundle'))], |
2613 _('hg unbundle [-u] FILE')), | 2625 _('hg unbundle [-u] FILE')), |