mirror of
https://github.com/mnauw/git-remote-hg.git
synced 2026-07-08 17:31:57 +02:00
Merge commit '4d33' into felipec
These changes are unattributed ports of existing fixes and can as such mostly be discarded.
This commit is contained in:
@@ -416,26 +416,28 @@ def updatebookmarks(repo, peer):
|
||||
bookmarks.pushbookmark(repo, k, old, v)
|
||||
return
|
||||
|
||||
for k, v in remotemarks.iteritems():
|
||||
localmarks[k] = hgbin(v)
|
||||
changes = { k: hgbin(v) for k, v in remotemarks.iteritems() }
|
||||
|
||||
if check_version(3, 6):
|
||||
lock = tr = None
|
||||
try:
|
||||
lock = repo.lock()
|
||||
tr = repo.transaction('bookmark')
|
||||
localmarks.recordchange(tr)
|
||||
tr.close()
|
||||
finally:
|
||||
if tr is not None:
|
||||
tr.release()
|
||||
if lock is not None:
|
||||
lock.release()
|
||||
else:
|
||||
if hasattr(localmarks, 'write'):
|
||||
localmarks.write()
|
||||
wlock = tr = None
|
||||
try:
|
||||
wlock = repo.wlock()
|
||||
tr = repo.transaction('bookmark')
|
||||
if check_version(4, 3):
|
||||
localmarks.applychanges(repo, tr, changes.items())
|
||||
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()
|
||||
finally:
|
||||
if tr is not None:
|
||||
tr.release()
|
||||
if wlock is not None:
|
||||
wlock.release()
|
||||
|
||||
def get_repo(url, alias):
|
||||
global peer
|
||||
|
||||
Reference in New Issue
Block a user