Show More
@@ -1855,24 +1855,6 b' def copy(ui, repo, *pats, **opts):' | |||||
1855 | with repo.wlock(False): |
|
1855 | with repo.wlock(False): | |
1856 | return cmdutil.copy(ui, repo, pats, opts) |
|
1856 | return cmdutil.copy(ui, repo, pats, opts) | |
1857 |
|
1857 | |||
1858 | @command('debugsetparents', [], _('REV1 [REV2]')) |
|
|||
1859 | def debugsetparents(ui, repo, rev1, rev2=None): |
|
|||
1860 | """manually set the parents of the current working directory |
|
|||
1861 |
|
||||
1862 | This is useful for writing repository conversion tools, but should |
|
|||
1863 | be used with care. For example, neither the working directory nor the |
|
|||
1864 | dirstate is updated, so file status may be incorrect after running this |
|
|||
1865 | command. |
|
|||
1866 |
|
||||
1867 | Returns 0 on success. |
|
|||
1868 | """ |
|
|||
1869 |
|
||||
1870 | r1 = scmutil.revsingle(repo, rev1).node() |
|
|||
1871 | r2 = scmutil.revsingle(repo, rev2, 'null').node() |
|
|||
1872 |
|
||||
1873 | with repo.wlock(): |
|
|||
1874 | repo.setparents(r1, r2) |
|
|||
1875 |
|
||||
1876 | @command('debugdirstate|debugstate', |
|
1858 | @command('debugdirstate|debugstate', | |
1877 | [('', 'nodates', None, _('do not display the saved mtime')), |
|
1859 | [('', 'nodates', None, _('do not display the saved mtime')), | |
1878 | ('', 'datesort', None, _('sort by saved mtime'))], |
|
1860 | ('', 'datesort', None, _('sort by saved mtime'))], |
@@ -1835,6 +1835,24 b' def debugrevspec(ui, repo, expr, **opts)' | |||||
1835 | for c in revs: |
|
1835 | for c in revs: | |
1836 | ui.write("%s\n" % c) |
|
1836 | ui.write("%s\n" % c) | |
1837 |
|
1837 | |||
|
1838 | @command('debugsetparents', [], _('REV1 [REV2]')) | |||
|
1839 | def debugsetparents(ui, repo, rev1, rev2=None): | |||
|
1840 | """manually set the parents of the current working directory | |||
|
1841 | ||||
|
1842 | This is useful for writing repository conversion tools, but should | |||
|
1843 | be used with care. For example, neither the working directory nor the | |||
|
1844 | dirstate is updated, so file status may be incorrect after running this | |||
|
1845 | command. | |||
|
1846 | ||||
|
1847 | Returns 0 on success. | |||
|
1848 | """ | |||
|
1849 | ||||
|
1850 | r1 = scmutil.revsingle(repo, rev1).node() | |||
|
1851 | r2 = scmutil.revsingle(repo, rev2, 'null').node() | |||
|
1852 | ||||
|
1853 | with repo.wlock(): | |||
|
1854 | repo.setparents(r1, r2) | |||
|
1855 | ||||
1838 | @command('debugupgraderepo', [ |
|
1856 | @command('debugupgraderepo', [ | |
1839 | ('o', 'optimize', [], _('extra optimization to perform'), _('NAME')), |
|
1857 | ('o', 'optimize', [], _('extra optimization to perform'), _('NAME')), | |
1840 | ('', 'run', False, _('performs an upgrade')), |
|
1858 | ('', 'run', False, _('performs an upgrade')), |
General Comments 0
You need to be logged in to leave comments.
Login now