mirror of
https://github.com/facebook/sapling.git
synced 2024-10-10 00:45:18 +03:00
git_handler: update for bookmark changes in mercurial 3.5
This commit is contained in:
parent
09a1dd77d6
commit
057929f2ba
@ -262,7 +262,11 @@ class GitHandler(object):
|
||||
bms = getattr(self.repo['tip'], 'bookmarks',
|
||||
lambda: None)()
|
||||
if bms:
|
||||
bookmarks.setcurrent(self.repo, bms[0])
|
||||
try:
|
||||
bookmarks.activate(self.repo, bms[0])
|
||||
except AttributeError:
|
||||
# hg < 3.5
|
||||
bookmarks.setcurrent(self.repo, bms[0])
|
||||
|
||||
self.save_map(self.map_file)
|
||||
|
||||
@ -1010,7 +1014,11 @@ class GitHandler(object):
|
||||
except NameError:
|
||||
bookmarks.bookmark(self.ui, self.repo, 'master',
|
||||
rev=tip, force=True)
|
||||
bookmarks.setcurrent(self.repo, 'master')
|
||||
try:
|
||||
bookmarks.activate(self.repo, 'master')
|
||||
except AttributeError:
|
||||
# hg < 3.5
|
||||
bookmarks.setcurrent(self.repo, 'master')
|
||||
new_refs['refs/heads/master'] = self.map_git_get(tip)
|
||||
|
||||
for rev, rev_refs in exportable.iteritems():
|
||||
|
Loading…
Reference in New Issue
Block a user