1861 Returns 0 on success, 1 if errors are encountered. |
1861 Returns 0 on success, 1 if errors are encountered. |
1862 """ |
1862 """ |
1863 with repo.wlock(False): |
1863 with repo.wlock(False): |
1864 return cmdutil.copy(ui, repo, pats, opts) |
1864 return cmdutil.copy(ui, repo, pats, opts) |
1865 |
1865 |
1866 @command('debugknown', [], _('REPO ID...'), norepo=True) |
|
1867 def debugknown(ui, repopath, *ids, **opts): |
|
1868 """test whether node ids are known to a repo |
|
1869 |
|
1870 Every ID must be a full-length hex node id string. Returns a list of 0s |
|
1871 and 1s indicating unknown/known. |
|
1872 """ |
|
1873 repo = hg.peer(ui, opts, repopath) |
|
1874 if not repo.capable('known'): |
|
1875 raise error.Abort("known() not supported by target repository") |
|
1876 flags = repo.known([bin(s) for s in ids]) |
|
1877 ui.write("%s\n" % ("".join([f and "1" or "0" for f in flags]))) |
|
1878 |
|
1879 @command('debuglabelcomplete', [], _('LABEL...')) |
1866 @command('debuglabelcomplete', [], _('LABEL...')) |
1880 def debuglabelcomplete(ui, repo, *args): |
1867 def debuglabelcomplete(ui, repo, *args): |
1881 '''backwards compatibility with old bash completion scripts (DEPRECATED)''' |
1868 '''backwards compatibility with old bash completion scripts (DEPRECATED)''' |
1882 debugnamecomplete(ui, repo, *args) |
1869 debugnamecomplete(ui, repo, *args) |
1883 |
1870 |