mercurial/commands.py
changeset 7807 bd8f44638847
parent 7765 da9acc68b1dd
child 7829 b61e918ea767
equal deleted inserted replaced
7806:6d0cf2a2acad 7807:bd8f44638847
    21     Schedule files to be version controlled and added to the repository.
    21     Schedule files to be version controlled and added to the repository.
    22 
    22 
    23     The files will be added to the repository at the next commit. To
    23     The files will be added to the repository at the next commit. To
    24     undo an add before that, see hg revert.
    24     undo an add before that, see hg revert.
    25 
    25 
    26     If no names are given, add all files in the repository.
    26     If no names are given, add all files to the repository.
    27     """
    27     """
    28 
    28 
    29     rejected = None
    29     rejected = None
    30     exacts = {}
    30     exacts = {}
    31     names = []
    31     names = []
   182     backout changeset with another head (current one by default).
   182     backout changeset with another head (current one by default).
   183 
   183 
   184     The --merge option remembers the parent of the working directory
   184     The --merge option remembers the parent of the working directory
   185     before starting the backout, then merges the new head with that
   185     before starting the backout, then merges the new head with that
   186     changeset afterwards. This saves you from doing the merge by
   186     changeset afterwards. This saves you from doing the merge by
   187     hand. The result of this merge is not committed, as for a normal
   187     hand. The result of this merge is not committed, as with a normal
   188     merge.
   188     merge.
   189 
   189 
   190     See \'hg help dates\' for a list of formats valid for -d/--date.
   190     See \'hg help dates\' for a list of formats valid for -d/--date.
   191     '''
   191     '''
   192     if rev and node:
   192     if rev and node:
   275     revision as good or bad without checking it out first.
   275     revision as good or bad without checking it out first.
   276 
   276 
   277     If you supply a command it will be used for automatic bisection. Its exit
   277     If you supply a command it will be used for automatic bisection. Its exit
   278     status will be used as flag to mark revision as bad or good. In case exit
   278     status will be used as flag to mark revision as bad or good. In case exit
   279     status is 0 the revision is marked as good, 125 - skipped, 127 (command not
   279     status is 0 the revision is marked as good, 125 - skipped, 127 (command not
   280     found) - bisection will be aborted and any other status bigger than 0 will
   280     found) - bisection will be aborted; any other status bigger than 0 will
   281     mark revision as bad.
   281     mark revision as bad.
   282     """
   282     """
   283     def print_result(nodes, good):
   283     def print_result(nodes, good):
   284         displayer = cmdutil.show_changeset(ui, repo, {})
   284         displayer = cmdutil.show_changeset(ui, repo, {})
   285         transition = (good and "good" or "bad")
   285         transition = (good and "good" or "bad")
   454 
   454 
   455 def bundle(ui, repo, fname, dest=None, **opts):
   455 def bundle(ui, repo, fname, dest=None, **opts):
   456     """create a changegroup file
   456     """create a changegroup file
   457 
   457 
   458     Generate a compressed changegroup file collecting changesets not
   458     Generate a compressed changegroup file collecting changesets not
   459     found in the other repository.
   459     known to be in another repository.
   460 
   460 
   461     If no destination repository is specified the destination is
   461     If no destination repository is specified the destination is
   462     assumed to have all the nodes specified by one or more --base
   462     assumed to have all the nodes specified by one or more --base
   463     parameters. To create a bundle containing all changesets, use
   463     parameters. To create a bundle containing all changesets, use
   464     --all (or --base null). To change the compression method applied,
   464     --all (or --base null). To change the compression method applied,
   612 
   612 
   613     If you are committing the result of a merge, do not provide any
   613     If you are committing the result of a merge, do not provide any
   614     file names or -I/-X filters.
   614     file names or -I/-X filters.
   615 
   615 
   616     If no commit message is specified, the configured editor is started to
   616     If no commit message is specified, the configured editor is started to
   617     enter a message.
   617     prompt you for a message.
   618 
   618 
   619     See 'hg help dates' for a list of formats valid for -d/--date.
   619     See 'hg help dates' for a list of formats valid for -d/--date.
   620     """
   620     """
   621     extra = {}
   621     extra = {}
   622     if opts.get('close_branch'):
   622     if opts.get('close_branch'):
   651 def copy(ui, repo, *pats, **opts):
   651 def copy(ui, repo, *pats, **opts):
   652     """mark files as copied for the next commit
   652     """mark files as copied for the next commit
   653 
   653 
   654     Mark dest as having copies of source files. If dest is a
   654     Mark dest as having copies of source files. If dest is a
   655     directory, copies are put in that directory. If dest is a file,
   655     directory, copies are put in that directory. If dest is a file,
   656     there can only be one source.
   656     the source must be a single file.
   657 
   657 
   658     By default, this command copies the contents of files as they
   658     By default, this command copies the contents of files as they
   659     stand in the working directory. If invoked with --after, the
   659     stand in the working directory. If invoked with --after, the
   660     operation is recorded, but no copying is performed.
   660     operation is recorded, but no copying is performed.
   661 
   661 
   662     This command takes effect in the next commit. To undo a copy
   662     This command takes effect with the next commit. To undo a copy
   663     before that, see hg revert.
   663     before that, see hg revert.
   664     """
   664     """
   665     wlock = repo.wlock(False)
   665     wlock = repo.wlock(False)
   666     try:
   666     try:
   667         return cmdutil.copy(ui, repo, pats, opts)
   667         return cmdutil.copy(ui, repo, pats, opts)
  1021     Without the -a option, diff will avoid generating diffs of files
  1021     Without the -a option, diff will avoid generating diffs of files
  1022     it detects as binary. With -a, diff will generate a diff anyway,
  1022     it detects as binary. With -a, diff will generate a diff anyway,
  1023     probably with undesirable results.
  1023     probably with undesirable results.
  1024 
  1024 
  1025     Use the --git option to generate diffs in the git extended diff
  1025     Use the --git option to generate diffs in the git extended diff
  1026     format. Read the diffs help topic for more information.
  1026     format. For more information, read hg help diffs.
  1027     """
  1027     """
  1028 
  1028 
  1029     revs = opts.get('rev')
  1029     revs = opts.get('rev')
  1030     change = opts.get('change')
  1030     change = opts.get('change')
  1031 
  1031 
  1855     non-trivial parents, user, date and time, and a summary for each
  1855     non-trivial parents, user, date and time, and a summary for each
  1856     commit. When the -v/--verbose switch is used, the list of changed
  1856     commit. When the -v/--verbose switch is used, the list of changed
  1857     files and full commit message is shown.
  1857     files and full commit message is shown.
  1858 
  1858 
  1859     NOTE: log -p may generate unexpected diff output for merge
  1859     NOTE: log -p may generate unexpected diff output for merge
  1860     changesets, as it will compare the merge changeset against its
  1860     changesets, as it will only compare the merge changeset against
  1861     first parent only. Also, the files: list will only reflect files
  1861     its first parent. Also, the files: list will only reflect files
  1862     that are different from BOTH parents.
  1862     that are different from BOTH parents.
  1863 
  1863 
  1864     """
  1864     """
  1865 
  1865 
  1866     get = util.cachefunc(lambda r: repo[r].changeset())
  1866     get = util.cachefunc(lambda r: repo[r].changeset())
  2310     Mark dest as copies of sources; mark sources for deletion. If
  2310     Mark dest as copies of sources; mark sources for deletion. If
  2311     dest is a directory, copies are put in that directory. If dest is
  2311     dest is a directory, copies are put in that directory. If dest is
  2312     a file, there can only be one source.
  2312     a file, there can only be one source.
  2313 
  2313 
  2314     By default, this command copies the contents of files as they
  2314     By default, this command copies the contents of files as they
  2315     stand in the working directory. If invoked with --after, the
  2315     exist in the working directory. If invoked with --after, the
  2316     operation is recorded, but no copying is performed.
  2316     operation is recorded, but no copying is performed.
  2317 
  2317 
  2318     This command takes effect in the next commit. To undo a rename
  2318     This command takes effect at the next commit. To undo a rename
  2319     before that, see hg revert.
  2319     before that, see hg revert.
  2320     """
  2320     """
  2321     wlock = repo.wlock(False)
  2321     wlock = repo.wlock(False)
  2322     try:
  2322     try:
  2323         return cmdutil.copy(ui, repo, pats, opts, rename=True)
  2323         return cmdutil.copy(ui, repo, pats, opts, rename=True)