mercurial/commands.py
changeset 6163 1f733c2f0165
parent 6161 bc1ba9124799
child 6171 73b1de288801
equal deleted inserted replaced
6162:554715e584e6 6163:1f733c2f0165
   182 
   182 
   183     The --merge option remembers the parent of the working directory
   183     The --merge option remembers the parent of the working directory
   184     before starting the backout, then merges the new head with that
   184     before starting the backout, then merges the new head with that
   185     changeset afterwards.  This saves you from doing the merge by
   185     changeset afterwards.  This saves you from doing the merge by
   186     hand.  The result of this merge is not committed, as for a normal
   186     hand.  The result of this merge is not committed, as for a normal
   187     merge.'''
   187     merge.
       
   188 
       
   189     See 'hg help dates' for a list of formats valid for -d/--date.
       
   190     '''
   188     if rev and node:
   191     if rev and node:
   189         raise util.Abort(_("please specify just one revision"))
   192         raise util.Abort(_("please specify just one revision"))
   190 
   193 
   191     if not rev:
   194     if not rev:
   192         rev = node
   195         rev = node
   531     If a list of files is omitted, all changes reported by "hg status"
   534     If a list of files is omitted, all changes reported by "hg status"
   532     will be committed.
   535     will be committed.
   533 
   536 
   534     If no commit message is specified, the configured editor is started to
   537     If no commit message is specified, the configured editor is started to
   535     enter a message.
   538     enter a message.
       
   539 
       
   540     See 'hg help dates' for a list of formats valid for -d/--date.
   536     """
   541     """
   537     def commitfunc(ui, repo, files, message, match, opts):
   542     def commitfunc(ui, repo, files, message, match, opts):
   538         return repo.commit(files, message, opts['user'], opts['date'], match,
   543         return repo.commit(files, message, opts['user'], opts['date'], match,
   539                            force_editor=opts.get('force_editor'))
   544                            force_editor=opts.get('force_editor'))
   540     cmdutil.commit(ui, repo, commitfunc, pats, opts)
   545     cmdutil.commit(ui, repo, commitfunc, pats, opts)
  1438     if the resulting changeset has a different ID than the one
  1443     if the resulting changeset has a different ID than the one
  1439     recorded in the patch. This may happen due to character set
  1444     recorded in the patch. This may happen due to character set
  1440     problems or other deficiencies in the text patch format.
  1445     problems or other deficiencies in the text patch format.
  1441 
  1446 
  1442     To read a patch from standard input, use patch name "-".
  1447     To read a patch from standard input, use patch name "-".
       
  1448     See 'hg help dates' for a list of formats valid for -d/--date.
  1443     """
  1449     """
  1444     patches = (patch1,) + patches
  1450     patches = (patch1,) + patches
  1445 
  1451 
  1446     date = opts.get('date')
  1452     date = opts.get('date')
  1447     if date:
  1453     if date:
  1659     only follows the first parent of merge revisions.
  1665     only follows the first parent of merge revisions.
  1660 
  1666 
  1661     If no revision range is specified, the default is tip:0 unless
  1667     If no revision range is specified, the default is tip:0 unless
  1662     --follow is set, in which case the working directory parent is
  1668     --follow is set, in which case the working directory parent is
  1663     used as the starting revision.
  1669     used as the starting revision.
       
  1670 
       
  1671     See 'hg help dates' for a list of formats valid for -d/--date.
  1664 
  1672 
  1665     By default this command outputs: changeset id and hash, tags,
  1673     By default this command outputs: changeset id and hash, tags,
  1666     non-trivial parents, user, date and time, and a summary for each
  1674     non-trivial parents, user, date and time, and a summary for each
  1667     commit. When the -v/--verbose switch is used, the list of changed
  1675     commit. When the -v/--verbose switch is used, the list of changed
  1668     files and full commit message is shown.
  1676     files and full commit message is shown.
  2171     working directory has two parents, you must explicitly specify the
  2179     working directory has two parents, you must explicitly specify the
  2172     revision to revert to.
  2180     revision to revert to.
  2173 
  2181 
  2174     Using the -r option, revert the given files or directories to their
  2182     Using the -r option, revert the given files or directories to their
  2175     contents as of a specific revision. This can be helpful to "roll
  2183     contents as of a specific revision. This can be helpful to "roll
  2176     back" some or all of an earlier  change.
  2184     back" some or all of an earlier change.
       
  2185     See 'hg help dates' for a list of formats valid for -d/--date.
  2177 
  2186 
  2178     Revert modifies the working directory.  It does not commit any
  2187     Revert modifies the working directory.  It does not commit any
  2179     changes, or change the parent of the working directory.  If you
  2188     changes, or change the parent of the working directory.  If you
  2180     revert to a revision other than the parent of the working
  2189     revert to a revision other than the parent of the working
  2181     directory, the reverted files will thus appear modified
  2190     directory, the reverted files will thus appear modified
  2183 
  2192 
  2184     If a file has been deleted, it is restored.  If the executable
  2193     If a file has been deleted, it is restored.  If the executable
  2185     mode of a file was changed, it is reset.
  2194     mode of a file was changed, it is reset.
  2186 
  2195 
  2187     If names are given, all files matching the names are reverted.
  2196     If names are given, all files matching the names are reverted.
  2188 
       
  2189     If no arguments are given, no files are reverted.
  2197     If no arguments are given, no files are reverted.
  2190 
  2198 
  2191     Modified files are saved with a .orig suffix before reverting.
  2199     Modified files are saved with a .orig suffix before reverting.
  2192     To disable these backups, use --no-backup.
  2200     To disable these backups, use --no-backup.
  2193     """
  2201     """
  2539     To facilitate version control, distribution, and merging of tags,
  2547     To facilitate version control, distribution, and merging of tags,
  2540     they are stored as a file named ".hgtags" which is managed
  2548     they are stored as a file named ".hgtags" which is managed
  2541     similarly to other project files and can be hand-edited if
  2549     similarly to other project files and can be hand-edited if
  2542     necessary.  The file '.hg/localtags' is used for local tags (not
  2550     necessary.  The file '.hg/localtags' is used for local tags (not
  2543     shared among repositories).
  2551     shared among repositories).
       
  2552 
       
  2553     See 'hg help dates' for a list of formats valid for -d/--date.
  2544     """
  2554     """
  2545     if name in ['tip', '.', 'null']:
  2555     if name in ['tip', '.', 'null']:
  2546         raise util.Abort(_("the name '%s' is reserved") % name)
  2556         raise util.Abort(_("the name '%s' is reserved") % name)
  2547     if rev_ is not None:
  2557     if rev_ is not None:
  2548         ui.warn(_("use of 'hg tag NAME [REV]' is deprecated, "
  2558         ui.warn(_("use of 'hg tag NAME [REV]' is deprecated, "
  2640 def update(ui, repo, node=None, rev=None, clean=False, date=None):
  2650 def update(ui, repo, node=None, rev=None, clean=False, date=None):
  2641     """update working directory
  2651     """update working directory
  2642 
  2652 
  2643     Update the working directory to the specified revision, or the
  2653     Update the working directory to the specified revision, or the
  2644     tip of the current branch if none is specified.
  2654     tip of the current branch if none is specified.
       
  2655     See 'hg help dates' for a list of formats valid for -d/--date.
  2645 
  2656 
  2646     If there are no outstanding changes in the working directory and
  2657     If there are no outstanding changes in the working directory and
  2647     there is a linear relationship between the current version and the
  2658     there is a linear relationship between the current version and the
  2648     requested version, the result is the requested version.
  2659     requested version, the result is the requested version.
  2649 
  2660