1850 Returns 0 on success, 1 if errors are encountered. |
1850 Returns 0 on success, 1 if errors are encountered. |
1851 """ |
1851 """ |
1852 with repo.wlock(False): |
1852 with repo.wlock(False): |
1853 return cmdutil.copy(ui, repo, pats, opts) |
1853 return cmdutil.copy(ui, repo, pats, opts) |
1854 |
1854 |
1855 @command('debugwireargs', |
|
1856 [('', 'three', '', 'three'), |
|
1857 ('', 'four', '', 'four'), |
|
1858 ('', 'five', '', 'five'), |
|
1859 ] + remoteopts, |
|
1860 _('REPO [OPTIONS]... [ONE [TWO]]'), |
|
1861 norepo=True) |
|
1862 def debugwireargs(ui, repopath, *vals, **opts): |
|
1863 repo = hg.peer(ui, opts, repopath) |
|
1864 for opt in remoteopts: |
|
1865 del opts[opt[1]] |
|
1866 args = {} |
|
1867 for k, v in opts.iteritems(): |
|
1868 if v: |
|
1869 args[k] = v |
|
1870 # run twice to check that we don't mess up the stream for the next command |
|
1871 res1 = repo.debugwireargs(*vals, **args) |
|
1872 res2 = repo.debugwireargs(*vals, **args) |
|
1873 ui.write("%s\n" % res1) |
|
1874 if res1 != res2: |
|
1875 ui.warn("%s\n" % res2) |
|
1876 |
|
1877 @command('^diff', |
1855 @command('^diff', |
1878 [('r', 'rev', [], _('revision'), _('REV')), |
1856 [('r', 'rev', [], _('revision'), _('REV')), |
1879 ('c', 'change', '', _('change made by revision'), _('REV')) |
1857 ('c', 'change', '', _('change made by revision'), _('REV')) |
1880 ] + diffopts + diffopts2 + walkopts + subrepoopts, |
1858 ] + diffopts + diffopts2 + walkopts + subrepoopts, |
1881 _('[OPTION]... ([-c REV] | [-r REV1 [-r REV2]]) [FILE]...'), |
1859 _('[OPTION]... ([-c REV] | [-r REV1 [-r REV2]]) [FILE]...'), |