1865 Returns 0 on success, 1 if errors are encountered. |
1865 Returns 0 on success, 1 if errors are encountered. |
1866 """ |
1866 """ |
1867 with repo.wlock(False): |
1867 with repo.wlock(False): |
1868 return cmdutil.copy(ui, repo, pats, opts) |
1868 return cmdutil.copy(ui, repo, pats, opts) |
1869 |
1869 |
1870 @command('debugcreatestreamclonebundle', [], 'FILE') |
|
1871 def debugcreatestreamclonebundle(ui, repo, fname): |
|
1872 """create a stream clone bundle file |
|
1873 |
|
1874 Stream bundles are special bundles that are essentially archives of |
|
1875 revlog files. They are commonly used for cloning very quickly. |
|
1876 """ |
|
1877 requirements, gen = streamclone.generatebundlev1(repo) |
|
1878 changegroup.writechunks(ui, gen, fname) |
|
1879 |
|
1880 ui.write(_('bundle requirements: %s\n') % ', '.join(sorted(requirements))) |
|
1881 |
|
1882 @command('debugapplystreamclonebundle', [], 'FILE') |
|
1883 def debugapplystreamclonebundle(ui, repo, fname): |
|
1884 """apply a stream clone bundle file""" |
|
1885 f = hg.openpath(ui, fname) |
|
1886 gen = exchange.readbundle(ui, f, fname) |
|
1887 gen.apply(repo) |
|
1888 |
|
1889 @command('debugcheckstate', [], '') |
1870 @command('debugcheckstate', [], '') |
1890 def debugcheckstate(ui, repo): |
1871 def debugcheckstate(ui, repo): |
1891 """validate the correctness of the current dirstate""" |
1872 """validate the correctness of the current dirstate""" |
1892 parent1, parent2 = repo.dirstate.parents() |
1873 parent1, parent2 = repo.dirstate.parents() |
1893 m1 = repo[parent1].manifest() |
1874 m1 = repo[parent1].manifest() |