mercurial/commands.py
changeset 10376 a2950e053614
parent 10375 adf9505e8888
child 10379 a78bfaf988e1
equal deleted inserted replaced
10375:adf9505e8888 10376:a2950e053614
   484     """create a changegroup file
   484     """create a changegroup file
   485 
   485 
   486     Generate a compressed changegroup file collecting changesets not
   486     Generate a compressed changegroup file collecting changesets not
   487     known to be in another repository.
   487     known to be in another repository.
   488 
   488 
   489     If no destination repository is specified the destination is
   489     If you omit the destination repository, then hg assumes the
   490     assumed to have all the nodes specified by one or more --base
   490     destination will have all the nodes you specify with --base
   491     parameters. To create a bundle containing all changesets, use
   491     parameters. To create a bundle containing all changesets, use
   492     -a/--all (or --base null).
   492     -a/--all (or --base null).
   493 
   493 
   494     You can change compression method with the -t/--type option.
   494     You can change compression method with the -t/--type option.
   495     The available compression methods are: none, bzip2, and
   495     The available compression methods are: none, bzip2, and
  2198         return 0
  2198         return 0
  2199 
  2199 
  2200     return hg.merge(repo, node, force=opts.get('force'))
  2200     return hg.merge(repo, node, force=opts.get('force'))
  2201 
  2201 
  2202 def outgoing(ui, repo, dest=None, **opts):
  2202 def outgoing(ui, repo, dest=None, **opts):
  2203     """show changesets not found in destination
  2203     """show changesets not found in the destination
  2204 
  2204 
  2205     Show changesets not found in the specified destination repository
  2205     Show changesets not found in the specified destination repository
  2206     or the default push location. These are the changesets that would
  2206     or the default push location. These are the changesets that would
  2207     be pushed if a push was requested.
  2207     be pushed if a push was requested.
  2208 
  2208 
  2209     See pull for valid destination format details.
  2209     See pull for details of valid destination formats.
  2210     """
  2210     """
  2211     limit = cmdutil.loglimit(opts)
  2211     limit = cmdutil.loglimit(opts)
  2212     dest = ui.expandpath(dest or 'default-push', dest or 'default')
  2212     dest = ui.expandpath(dest or 'default-push', dest or 'default')
  2213     dest, branches = hg.parseurl(dest)
  2213     dest, branches = hg.parseurl(dest)
  2214     revs, checkout = hg.addbranchrevs(repo, repo, branches, opts.get('rev'))
  2214     revs, checkout = hg.addbranchrevs(repo, repo, branches, opts.get('rev'))
  2348     return postincoming(ui, repo, modheads, opts.get('update'), checkout)
  2348     return postincoming(ui, repo, modheads, opts.get('update'), checkout)
  2349 
  2349 
  2350 def push(ui, repo, dest=None, **opts):
  2350 def push(ui, repo, dest=None, **opts):
  2351     """push changes to the specified destination
  2351     """push changes to the specified destination
  2352 
  2352 
  2353     Push changes from the local repository to the given destination.
  2353     Push changes from the local repository to the specified destination.
  2354 
  2354 
  2355     This is the symmetrical operation for pull. It moves changes from
  2355     This is the symmetrical operation for pull. It moves changes from
  2356     the current repository to a different one. If the destination is
  2356     the current repository to a different one. If the destination is
  2357     local this is identical to a pull in that directory from the
  2357     local this is identical to a pull in that directory from the
  2358     current one.
  2358     current one.
  2548 
  2548 
  2549     With no revision specified, revert the named files or directories
  2549     With no revision specified, revert the named files or directories
  2550     to the contents they had in the parent of the working directory.
  2550     to the contents they had in the parent of the working directory.
  2551     This restores the contents of the affected files to an unmodified
  2551     This restores the contents of the affected files to an unmodified
  2552     state and unschedules adds, removes, copies, and renames. If the
  2552     state and unschedules adds, removes, copies, and renames. If the
  2553     working directory has two parents, you must explicitly specify the
  2553     working directory has two parents, you must explicitly specify a
  2554     revision to revert to.
  2554     revision.
  2555 
  2555 
  2556     Using the -r/--rev option, revert the given files or directories
  2556     Using the -r/--rev option, revert the given files or directories
  2557     to their contents as of a specific revision. This can be helpful
  2557     to their contents as of a specific revision. This can be helpful
  2558     to "roll back" some or all of an earlier change. See 'hg help
  2558     to "roll back" some or all of an earlier change. See 'hg help
  2559     dates' for a list of formats valid for -d/--date.
  2559     dates' for a list of formats valid for -d/--date.
  2773     and their effects can be rolled back:
  2773     and their effects can be rolled back:
  2774 
  2774 
  2775     - commit
  2775     - commit
  2776     - import
  2776     - import
  2777     - pull
  2777     - pull
  2778     - push (with this repository as destination)
  2778     - push (with this repository as the destination)
  2779     - unbundle
  2779     - unbundle
  2780 
  2780 
  2781     This command is not intended for use on public repositories. Once
  2781     This command is not intended for use on public repositories. Once
  2782     changes are visible for pull by other users, rolling a transaction
  2782     changes are visible for pull by other users, rolling a transaction
  2783     back locally is ineffective (someone else may already have pulled
  2783     back locally is ineffective (someone else may already have pulled