mirror of
https://github.com/mnauw/git-remote-hg.git
synced 2025-11-02 01:25:49 +01:00
Use marks.applychange()
Since 4.3 bookmarks are updated with applychanges() and since 4.6 anything else is deprecated. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
This commit is contained in:
@@ -376,13 +376,16 @@ def updatebookmarks(repo, peer):
|
|||||||
try:
|
try:
|
||||||
wlock = repo.wlock()
|
wlock = repo.wlock()
|
||||||
tr = repo.transaction('bookmark')
|
tr = repo.transaction('bookmark')
|
||||||
localmarks.update(changes)
|
if check_version(4, 3):
|
||||||
if check_version(3, 2):
|
localmarks.applychanges(repo, tr, changes.items())
|
||||||
localmarks.recordchange(tr)
|
|
||||||
elif check_version(2, 5):
|
|
||||||
localmarks.write()
|
|
||||||
else:
|
else:
|
||||||
bookmarks.write(repo)
|
localmarks.update(changes)
|
||||||
|
if check_version(3, 2):
|
||||||
|
localmarks.recordchange(tr)
|
||||||
|
elif check_version(2, 5):
|
||||||
|
localmarks.write()
|
||||||
|
else:
|
||||||
|
bookmarks.write(repo)
|
||||||
tr.close()
|
tr.close()
|
||||||
finally:
|
finally:
|
||||||
tr.release()
|
tr.release()
|
||||||
|
|||||||
Reference in New Issue
Block a user