mercurial/commands.py
changeset 42612 3c16b9c0b099
parent 42600 3bc400ccbf99
child 42614 117437f3f541
equal deleted inserted replaced
42611:2f760da140ee 42612:3c16b9c0b099
  1891     fm.end()
  1891     fm.end()
  1892     if matched:
  1892     if matched:
  1893         return 0
  1893         return 0
  1894     return 1
  1894     return 1
  1895 
  1895 
       
  1896 @command('continue',
       
  1897     dryrunopts, helpcategory=command.CATEGORY_CHANGE_MANAGEMENT,
       
  1898     helpbasic=True)
       
  1899 def continuecmd(ui, repo, **opts):
       
  1900     """resumes an interrupted operation (EXPERIMENTAL)
       
  1901 
       
  1902     Finishes a multistep operation like graft, histedit, rebase, merge,
       
  1903     and unshelve if they are in an interrupted state.
       
  1904 
       
  1905     use --dry-run/-n to dry run the command.
       
  1906     A new operation can be added to this by registering the operation and
       
  1907     continue logic in the unfinishedstates list under statemod.
       
  1908     """
       
  1909     dryrun = opts.get(r'dry_run')
       
  1910     contstate = cmdutil.getunfinishedstate(repo)
       
  1911     if not contstate:
       
  1912         raise error.Abort(_('no operation in progress'))
       
  1913     if not contstate.continuefunc:
       
  1914         raise error.Abort((_("%s in progress but does not support "
       
  1915                              "'hg continue'") % (contstate._opname)),
       
  1916                              hint=contstate.continuemsg())
       
  1917     if dryrun:
       
  1918         ui.status(_('%s in progress, will be resumed\n') % (contstate._opname))
       
  1919         return
       
  1920     return contstate.continuefunc(ui, repo)
       
  1921 
  1896 @command('copy|cp',
  1922 @command('copy|cp',
  1897     [('A', 'after', None, _('record a copy that has already occurred')),
  1923     [('A', 'after', None, _('record a copy that has already occurred')),
  1898     ('f', 'force', None, _('forcibly copy over an existing managed file')),
  1924     ('f', 'force', None, _('forcibly copy over an existing managed file')),
  1899     ] + walkopts + dryrunopts,
  1925     ] + walkopts + dryrunopts,
  1900     _('[OPTION]... SOURCE... DEST'),
  1926     _('[OPTION]... SOURCE... DEST'),