Mercurial > public > mercurial-scm > hg
comparison mercurial/commands.py @ 3833:63f8f74ac4a8
Merge with mpm
author | Brendan Cully <brendan@kublai.com> |
---|---|
date | Fri, 08 Dec 2006 14:06:26 -0800 |
parents | 08c169cbd9e1 4e488ccc8120 |
children | 7df171ea50cd |
comparison
equal
deleted
inserted
replaced
3832:08c169cbd9e1 | 3833:63f8f74ac4a8 |
---|---|
55 def add(ui, repo, *pats, **opts): | 55 def add(ui, repo, *pats, **opts): |
56 """add the specified files on the next commit | 56 """add the specified files on the next commit |
57 | 57 |
58 Schedule files to be version controlled and added to the repository. | 58 Schedule files to be version controlled and added to the repository. |
59 | 59 |
60 The files will be added to the repository at the next commit. | 60 The files will be added to the repository at the next commit. To |
61 undo an add before that, see hg revert. | |
61 | 62 |
62 If no names are given, add all files in the repository. | 63 If no names are given, add all files in the repository. |
63 """ | 64 """ |
64 | 65 |
65 names = [] | 66 names = [] |
648 | 649 |
649 By default, this command copies the contents of files as they | 650 By default, this command copies the contents of files as they |
650 stand in the working directory. If invoked with --after, the | 651 stand in the working directory. If invoked with --after, the |
651 operation is recorded, but no copying is performed. | 652 operation is recorded, but no copying is performed. |
652 | 653 |
653 This command takes effect in the next commit. | 654 This command takes effect in the next commit. To undo a copy |
655 before that, see hg revert. | |
654 """ | 656 """ |
655 wlock = repo.wlock(0) | 657 wlock = repo.wlock(0) |
656 errs, copied = docopy(ui, repo, pats, opts, wlock) | 658 errs, copied = docopy(ui, repo, pats, opts, wlock) |
657 return errs | 659 return errs |
658 | 660 |
1859 def remove(ui, repo, *pats, **opts): | 1861 def remove(ui, repo, *pats, **opts): |
1860 """remove the specified files on the next commit | 1862 """remove the specified files on the next commit |
1861 | 1863 |
1862 Schedule the indicated files for removal from the repository. | 1864 Schedule the indicated files for removal from the repository. |
1863 | 1865 |
1864 This command schedules the files to be removed at the next commit. | |
1865 This only removes files from the current branch, not from the | 1866 This only removes files from the current branch, not from the |
1866 entire project history. If the files still exist in the working | 1867 entire project history. If the files still exist in the working |
1867 directory, they will be deleted from it. If invoked with --after, | 1868 directory, they will be deleted from it. If invoked with --after, |
1868 files that have been manually deleted are marked as removed. | 1869 files that have been manually deleted are marked as removed. |
1870 | |
1871 This command schedules the files to be removed at the next commit. | |
1872 To undo a remove before that, see hg revert. | |
1869 | 1873 |
1870 Modified files and added files are not removed by default. To | 1874 Modified files and added files are not removed by default. To |
1871 remove them, use the -f/--force option. | 1875 remove them, use the -f/--force option. |
1872 """ | 1876 """ |
1873 names = [] | 1877 names = [] |
1912 | 1916 |
1913 By default, this command copies the contents of files as they | 1917 By default, this command copies the contents of files as they |
1914 stand in the working directory. If invoked with --after, the | 1918 stand in the working directory. If invoked with --after, the |
1915 operation is recorded, but no copying is performed. | 1919 operation is recorded, but no copying is performed. |
1916 | 1920 |
1917 This command takes effect in the next commit. | 1921 This command takes effect in the next commit. To undo a rename |
1922 before that, see hg revert. | |
1918 """ | 1923 """ |
1919 wlock = repo.wlock(0) | 1924 wlock = repo.wlock(0) |
1920 errs, copied = docopy(ui, repo, pats, opts, wlock) | 1925 errs, copied = docopy(ui, repo, pats, opts, wlock) |
1921 names = [] | 1926 names = [] |
1922 for abs, rel, exact in copied: | 1927 for abs, rel, exact in copied: |
1931 """revert files or dirs to their states as of some revision | 1936 """revert files or dirs to their states as of some revision |
1932 | 1937 |
1933 With no revision specified, revert the named files or directories | 1938 With no revision specified, revert the named files or directories |
1934 to the contents they had in the parent of the working directory. | 1939 to the contents they had in the parent of the working directory. |
1935 This restores the contents of the affected files to an unmodified | 1940 This restores the contents of the affected files to an unmodified |
1936 state. If the working directory has two parents, you must | 1941 state and unschedules adds, removes, copies, and renames. If the |
1937 explicitly specify the revision to revert to. | 1942 working directory has two parents, you must explicitly specify the |
1943 revision to revert to. | |
1938 | 1944 |
1939 Modified files are saved with a .orig suffix before reverting. | 1945 Modified files are saved with a .orig suffix before reverting. |
1940 To disable these backups, use --no-backup. | 1946 To disable these backups, use --no-backup. |
1941 | 1947 |
1942 Using the -r option, revert the given files or directories to their | 1948 Using the -r option, revert the given files or directories to their |