Show More
@@ -1854,60 +1854,6 b' def copy(ui, repo, *pats, **opts):' | |||||
1854 | with repo.wlock(False): |
|
1854 | with repo.wlock(False): | |
1855 | return cmdutil.copy(ui, repo, pats, opts) |
|
1855 | return cmdutil.copy(ui, repo, pats, opts) | |
1856 |
|
1856 | |||
1857 | @command('debugsuccessorssets', |
|
|||
1858 | [], |
|
|||
1859 | _('[REV]')) |
|
|||
1860 | def debugsuccessorssets(ui, repo, *revs): |
|
|||
1861 | """show set of successors for revision |
|
|||
1862 |
|
||||
1863 | A successors set of changeset A is a consistent group of revisions that |
|
|||
1864 | succeed A. It contains non-obsolete changesets only. |
|
|||
1865 |
|
||||
1866 | In most cases a changeset A has a single successors set containing a single |
|
|||
1867 | successor (changeset A replaced by A'). |
|
|||
1868 |
|
||||
1869 | A changeset that is made obsolete with no successors are called "pruned". |
|
|||
1870 | Such changesets have no successors sets at all. |
|
|||
1871 |
|
||||
1872 | A changeset that has been "split" will have a successors set containing |
|
|||
1873 | more than one successor. |
|
|||
1874 |
|
||||
1875 | A changeset that has been rewritten in multiple different ways is called |
|
|||
1876 | "divergent". Such changesets have multiple successor sets (each of which |
|
|||
1877 | may also be split, i.e. have multiple successors). |
|
|||
1878 |
|
||||
1879 | Results are displayed as follows:: |
|
|||
1880 |
|
||||
1881 | <rev1> |
|
|||
1882 | <successors-1A> |
|
|||
1883 | <rev2> |
|
|||
1884 | <successors-2A> |
|
|||
1885 | <successors-2B1> <successors-2B2> <successors-2B3> |
|
|||
1886 |
|
||||
1887 | Here rev2 has two possible (i.e. divergent) successors sets. The first |
|
|||
1888 | holds one element, whereas the second holds three (i.e. the changeset has |
|
|||
1889 | been split). |
|
|||
1890 | """ |
|
|||
1891 | # passed to successorssets caching computation from one call to another |
|
|||
1892 | cache = {} |
|
|||
1893 | ctx2str = str |
|
|||
1894 | node2str = short |
|
|||
1895 | if ui.debug(): |
|
|||
1896 | def ctx2str(ctx): |
|
|||
1897 | return ctx.hex() |
|
|||
1898 | node2str = hex |
|
|||
1899 | for rev in scmutil.revrange(repo, revs): |
|
|||
1900 | ctx = repo[rev] |
|
|||
1901 | ui.write('%s\n'% ctx2str(ctx)) |
|
|||
1902 | for succsset in obsolete.successorssets(repo, ctx.node(), cache): |
|
|||
1903 | if succsset: |
|
|||
1904 | ui.write(' ') |
|
|||
1905 | ui.write(node2str(succsset[0])) |
|
|||
1906 | for node in succsset[1:]: |
|
|||
1907 | ui.write(' ') |
|
|||
1908 | ui.write(node2str(node)) |
|
|||
1909 | ui.write('\n') |
|
|||
1910 |
|
||||
1911 | @command('debugtemplate', |
|
1857 | @command('debugtemplate', | |
1912 | [('r', 'rev', [], _('apply template on changesets'), _('REV')), |
|
1858 | [('r', 'rev', [], _('apply template on changesets'), _('REV')), | |
1913 | ('D', 'define', [], _('define template keyword'), _('KEY=VALUE'))], |
|
1859 | ('D', 'define', [], _('define template keyword'), _('KEY=VALUE'))], |
@@ -1895,6 +1895,60 b' def debugsub(ui, repo, rev=None):' | |||||
1895 | ui.write((' source %s\n') % v[0]) |
|
1895 | ui.write((' source %s\n') % v[0]) | |
1896 | ui.write((' revision %s\n') % v[1]) |
|
1896 | ui.write((' revision %s\n') % v[1]) | |
1897 |
|
1897 | |||
|
1898 | @command('debugsuccessorssets', | |||
|
1899 | [], | |||
|
1900 | _('[REV]')) | |||
|
1901 | def debugsuccessorssets(ui, repo, *revs): | |||
|
1902 | """show set of successors for revision | |||
|
1903 | ||||
|
1904 | A successors set of changeset A is a consistent group of revisions that | |||
|
1905 | succeed A. It contains non-obsolete changesets only. | |||
|
1906 | ||||
|
1907 | In most cases a changeset A has a single successors set containing a single | |||
|
1908 | successor (changeset A replaced by A'). | |||
|
1909 | ||||
|
1910 | A changeset that is made obsolete with no successors are called "pruned". | |||
|
1911 | Such changesets have no successors sets at all. | |||
|
1912 | ||||
|
1913 | A changeset that has been "split" will have a successors set containing | |||
|
1914 | more than one successor. | |||
|
1915 | ||||
|
1916 | A changeset that has been rewritten in multiple different ways is called | |||
|
1917 | "divergent". Such changesets have multiple successor sets (each of which | |||
|
1918 | may also be split, i.e. have multiple successors). | |||
|
1919 | ||||
|
1920 | Results are displayed as follows:: | |||
|
1921 | ||||
|
1922 | <rev1> | |||
|
1923 | <successors-1A> | |||
|
1924 | <rev2> | |||
|
1925 | <successors-2A> | |||
|
1926 | <successors-2B1> <successors-2B2> <successors-2B3> | |||
|
1927 | ||||
|
1928 | Here rev2 has two possible (i.e. divergent) successors sets. The first | |||
|
1929 | holds one element, whereas the second holds three (i.e. the changeset has | |||
|
1930 | been split). | |||
|
1931 | """ | |||
|
1932 | # passed to successorssets caching computation from one call to another | |||
|
1933 | cache = {} | |||
|
1934 | ctx2str = str | |||
|
1935 | node2str = short | |||
|
1936 | if ui.debug(): | |||
|
1937 | def ctx2str(ctx): | |||
|
1938 | return ctx.hex() | |||
|
1939 | node2str = hex | |||
|
1940 | for rev in scmutil.revrange(repo, revs): | |||
|
1941 | ctx = repo[rev] | |||
|
1942 | ui.write('%s\n'% ctx2str(ctx)) | |||
|
1943 | for succsset in obsolete.successorssets(repo, ctx.node(), cache): | |||
|
1944 | if succsset: | |||
|
1945 | ui.write(' ') | |||
|
1946 | ui.write(node2str(succsset[0])) | |||
|
1947 | for node in succsset[1:]: | |||
|
1948 | ui.write(' ') | |||
|
1949 | ui.write(node2str(node)) | |||
|
1950 | ui.write('\n') | |||
|
1951 | ||||
1898 | @command('debugupgraderepo', [ |
|
1952 | @command('debugupgraderepo', [ | |
1899 | ('o', 'optimize', [], _('extra optimization to perform'), _('NAME')), |
|
1953 | ('o', 'optimize', [], _('extra optimization to perform'), _('NAME')), | |
1900 | ('', 'run', False, _('performs an upgrade')), |
|
1954 | ('', 'run', False, _('performs an upgrade')), |
General Comments 0
You need to be logged in to leave comments.
Login now