mercurial/commands.py
changeset 18848 cc741817a49e
parent 18828 b718999f2e0b
child 18851 a60963c02f92
equal deleted inserted replaced
18847:40c679748fa9 18848:cc741817a49e
  4497     revs, checkout = hg.addbranchrevs(repo, other, branches, opts.get('rev'))
  4497     revs, checkout = hg.addbranchrevs(repo, other, branches, opts.get('rev'))
  4498 
  4498 
  4499     if opts.get('bookmark'):
  4499     if opts.get('bookmark'):
  4500         if not revs:
  4500         if not revs:
  4501             revs = []
  4501             revs = []
  4502         rb = other.listkeys('bookmarks')
  4502         remotebookmarks = other.listkeys('bookmarks')
  4503         for b in opts['bookmark']:
  4503         for b in opts['bookmark']:
  4504             if b not in rb:
  4504             if b not in remotebookmarks:
  4505                 raise util.Abort(_('remote bookmark %s not found!') % b)
  4505                 raise util.Abort(_('remote bookmark %s not found!') % b)
  4506             revs.append(rb[b])
  4506             revs.append(remotebookmarks[b])
  4507 
  4507 
  4508     if revs:
  4508     if revs:
  4509         try:
  4509         try:
  4510             revs = [other.lookup(rev) for rev in revs]
  4510             revs = [other.lookup(rev) for rev in revs]
  4511         except error.CapabilityError:
  4511         except error.CapabilityError:
  4528     if opts.get('bookmark'):
  4528     if opts.get('bookmark'):
  4529         marks = repo._bookmarks
  4529         marks = repo._bookmarks
  4530         for b in opts['bookmark']:
  4530         for b in opts['bookmark']:
  4531             # explicit pull overrides local bookmark if any
  4531             # explicit pull overrides local bookmark if any
  4532             ui.status(_("importing bookmark %s\n") % b)
  4532             ui.status(_("importing bookmark %s\n") % b)
  4533             marks[b] = repo[rb[b]].node()
  4533             marks[b] = repo[remotebookmarks[b]].node()
  4534         marks.write()
  4534         marks.write()
  4535 
  4535 
  4536     return ret
  4536     return ret
  4537 
  4537 
  4538 @command('^push',
  4538 @command('^push',