Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/commands.py @ 5155:13d23d66a6cd
manifest: accept -r for rev specification
author | Bryan O'Sullivan <bos@serpentine.com> |
---|---|
date | Thu, 09 Aug 2007 19:42:33 -0700 |
parents | 06154aff2b1a |
children | 49554ba98951 |
comparison
equal
deleted
inserted
replaced
5154:67afecb8d6cc | 5155:13d23d66a6cd |
---|---|
1868 elif st == 'iter': | 1868 elif st == 'iter': |
1869 if count == limit: break | 1869 if count == limit: break |
1870 if displayer.flush(rev): | 1870 if displayer.flush(rev): |
1871 count += 1 | 1871 count += 1 |
1872 | 1872 |
1873 def manifest(ui, repo, rev=None): | 1873 def manifest(ui, repo, node=None, rev=None): |
1874 """output the current or given revision of the project manifest | 1874 """output the current or given revision of the project manifest |
1875 | 1875 |
1876 Print a list of version controlled files for the given revision. | 1876 Print a list of version controlled files for the given revision. |
1877 If no revision is given, the parent of the working directory is used, | 1877 If no revision is given, the parent of the working directory is used, |
1878 or tip if no revision is checked out. | 1878 or tip if no revision is checked out. |
1882 | 1882 |
1883 With -v flag, print file permissions. With --debug flag, print | 1883 With -v flag, print file permissions. With --debug flag, print |
1884 file revision hashes. | 1884 file revision hashes. |
1885 """ | 1885 """ |
1886 | 1886 |
1887 m = repo.changectx(rev).manifest() | 1887 if rev and node: |
1888 raise util.Abort(_("please specify just one revision")) | |
1889 | |
1890 if not node: | |
1891 node = rev | |
1892 | |
1893 m = repo.changectx(node).manifest() | |
1888 files = m.keys() | 1894 files = m.keys() |
1889 files.sort() | 1895 files.sort() |
1890 | 1896 |
1891 for f in files: | 1897 for f in files: |
1892 if ui.debugflag: | 1898 if ui.debugflag: |
1909 revision to merge with must be provided. | 1915 revision to merge with must be provided. |
1910 """ | 1916 """ |
1911 | 1917 |
1912 if rev and node: | 1918 if rev and node: |
1913 raise util.Abort(_("please specify just one revision")) | 1919 raise util.Abort(_("please specify just one revision")) |
1914 | |
1915 if not node: | 1920 if not node: |
1916 node = rev | 1921 node = rev |
1917 | 1922 |
1918 if not node: | 1923 if not node: |
1919 heads = repo.heads() | 1924 heads = repo.heads() |
2977 ('p', 'patch', None, _('show patch')), | 2982 ('p', 'patch', None, _('show patch')), |
2978 ('P', 'prune', [], _('do not display revision or any of its ancestors')), | 2983 ('P', 'prune', [], _('do not display revision or any of its ancestors')), |
2979 ('', 'template', '', _('display with template')), | 2984 ('', 'template', '', _('display with template')), |
2980 ] + walkopts, | 2985 ] + walkopts, |
2981 _('hg log [OPTION]... [FILE]')), | 2986 _('hg log [OPTION]... [FILE]')), |
2982 "manifest": (manifest, [], _('hg manifest [REV]')), | 2987 "manifest": (manifest, [('r', 'rev', '', _('revision to display'))], |
2988 _('hg manifest [-r REV]')), | |
2983 "^merge": | 2989 "^merge": |
2984 (merge, | 2990 (merge, |
2985 [('f', 'force', None, _('force a merge with outstanding changes')), | 2991 [('f', 'force', None, _('force a merge with outstanding changes')), |
2986 ('r', 'rev', '', _('revision to merge')), | 2992 ('r', 'rev', '', _('revision to merge')), |
2987 ], | 2993 ], |