mercurial/commands.py
changeset 16109 cb756482c1aa
parent 16104 5535e66b3016
parent 16107 a3dcc59054ca
child 16136 68007f0557de
equal deleted inserted replaced
16104:5535e66b3016 16109:cb756482c1aa
  4274                 ret = 1
  4274                 ret = 1
  4275     return ret
  4275     return ret
  4276 
  4276 
  4277 def postincoming(ui, repo, modheads, optupdate, checkout):
  4277 def postincoming(ui, repo, modheads, optupdate, checkout):
  4278     if modheads == 0:
  4278     if modheads == 0:
  4279         return 1
  4279         return
  4280     if optupdate:
  4280     if optupdate:
  4281         movemarkfrom = repo['.'].node()
  4281         movemarkfrom = repo['.'].node()
  4282         try:
  4282         try:
  4283             ret = hg.update(repo, checkout)
  4283             ret = hg.update(repo, checkout)
  4284         except util.Abort, inst:
  4284         except util.Abort, inst:
  4325     -r X` where ``X`` is the last changeset listed by :hg:`incoming`.
  4325     -r X` where ``X`` is the last changeset listed by :hg:`incoming`.
  4326 
  4326 
  4327     If SOURCE is omitted, the 'default' path will be used.
  4327     If SOURCE is omitted, the 'default' path will be used.
  4328     See :hg:`help urls` for more information.
  4328     See :hg:`help urls` for more information.
  4329 
  4329 
  4330     Returns 0 on success, 1 if no changes found or an update had
  4330     Returns 0 on success, 1 if an update had unresolved files.
  4331     unresolved files.
       
  4332     """
  4331     """
  4333     source, branches = hg.parseurl(ui.expandpath(source), opts.get('branch'))
  4332     source, branches = hg.parseurl(ui.expandpath(source), opts.get('branch'))
  4334     other = hg.peer(repo, opts, source)
  4333     other = hg.peer(repo, opts, source)
  4335     ui.status(_('pulling from %s\n') % util.hidepassword(source))
  4334     ui.status(_('pulling from %s\n') % util.hidepassword(source))
  4336     revs, checkout = hg.addbranchrevs(repo, other, branches, opts.get('rev'))
  4335     revs, checkout = hg.addbranchrevs(repo, other, branches, opts.get('rev'))