mercurial/exchange.py
changeset 25479 f00a63a43c4b
parent 25446 b5311068077e
child 25480 d410336fdb3c
equal deleted inserted replaced
25478:d19787db6fe0 25479:f00a63a43c4b
   953 
   953 
   954     If not using bundle2, we have to fetch bookmarks before changeset
   954     If not using bundle2, we have to fetch bookmarks before changeset
   955     discovery to reduce the chance and impact of race conditions."""
   955     discovery to reduce the chance and impact of race conditions."""
   956     if pullop.remotebookmarks is not None:
   956     if pullop.remotebookmarks is not None:
   957         return
   957         return
   958     if not _canusebundle2(pullop): # all bundle2 server now support listkeys
   958     if (_canusebundle2(pullop)
   959         pullop.remotebookmarks = pullop.remote.listkeys('bookmarks')
   959             and 'listkeys' in bundle2.bundle2caps(pullop.remote)):
       
   960         # all known bundle2 servers now support listkeys, but lets be nice with
       
   961         # new implementation.
       
   962         return
       
   963     pullop.remotebookmarks = pullop.remote.listkeys('bookmarks')
   960 
   964 
   961 
   965 
   962 @pulldiscovery('changegroup')
   966 @pulldiscovery('changegroup')
   963 def _pulldiscoverychangegroup(pullop):
   967 def _pulldiscoverychangegroup(pullop):
   964     """discovery phase for the pull
   968     """discovery phase for the pull