Mercurial > hg
comparison hgext/git/dirstate.py @ 50256:a6e0b7d4ae9d
dirstate: write the `branch` as part of the transaction if any
Bypassing the transaction means we could get out of sync with the dirstatemap
content.
The branch is stil written right away if no transaction is around, but at least
it no longer bypass the transaction.
Actual caller of this still need to be updated.
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Thu, 02 Mar 2023 11:47:18 +0100 |
parents | 76d44983a398 |
children | 39eb3aab3e63 |
comparison
equal
deleted
inserted
replaced
50255:fa04407bda7a | 50256:a6e0b7d4ae9d |
---|---|
387 | 387 |
388 def addparentchangecallback(self, category, callback): | 388 def addparentchangecallback(self, category, callback): |
389 # TODO: should this be added to the dirstate interface? | 389 # TODO: should this be added to the dirstate interface? |
390 self._plchangecallbacks[category] = callback | 390 self._plchangecallbacks[category] = callback |
391 | 391 |
392 def setbranch(self, branch): | 392 def setbranch(self, branch, transaction=None): |
393 raise error.Abort( | 393 raise error.Abort( |
394 b'git repos do not support branches. try using bookmarks' | 394 b'git repos do not support branches. try using bookmarks' |
395 ) | 395 ) |