comparison mercurial/localrepo.py @ 22645:6e431e1635b6

pull: move bookmark movements inside the `exchange.pull` There is no reason for bookmarks to get a special treatment. As a first step we move the code as is in the `exchange.pull` function. Integration with the rest of the flow will come later. Adding bookmarks to pull means that most clone paths are now pulling bookmarks through pull. We ensure that bookmark-update messages are properly suppressed in that case. In test-pull-http.t the 'requesting all changes' message disappear because we now get the authentication error on the `listkeys`command before such message is printed.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Fri, 26 Sep 2014 17:44:00 -0700
parents 45e50d8546d9
children bf0b5bfc24b9
comparison
equal deleted inserted replaced
22644:1ec7cdaf898f 22645:6e431e1635b6
1722 if streamreqs: 1722 if streamreqs:
1723 streamreqs = set(streamreqs.split(',')) 1723 streamreqs = set(streamreqs.split(','))
1724 # if we support it, stream in and adjust our requirements 1724 # if we support it, stream in and adjust our requirements
1725 if not streamreqs - self.supportedformats: 1725 if not streamreqs - self.supportedformats:
1726 return self.stream_in(remote, streamreqs) 1726 return self.stream_in(remote, streamreqs)
1727 return self.pull(remote, heads) 1727
1728 quiet = self.ui.backupconfig('ui', 'quietbookmarkmove')
1729 try:
1730 self.ui.setconfig('ui', 'quietbookmarkmove', True, 'clone')
1731 ret = self.pull(remote, heads)
1732 finally:
1733 self.ui.restoreconfig(quiet)
1734 return ret
1728 1735
1729 def pushkey(self, namespace, key, old, new): 1736 def pushkey(self, namespace, key, old, new):
1730 self.hook('prepushkey', throw=True, namespace=namespace, key=key, 1737 self.hook('prepushkey', throw=True, namespace=namespace, key=key,
1731 old=old, new=new) 1738 old=old, new=new)
1732 self.ui.debug('pushing key for "%s:%s"\n' % (namespace, key)) 1739 self.ui.debug('pushing key for "%s:%s"\n' % (namespace, key))