Show More
@@ -43,6 +43,9 b' from .interfaces import (' | |||||
43 | parsers = policy.importmod('parsers') |
|
43 | parsers = policy.importmod('parsers') | |
44 | rustmod = policy.importrust('dirstate') |
|
44 | rustmod = policy.importrust('dirstate') | |
45 |
|
45 | |||
|
46 | # use to detect lack of a parameter | |||
|
47 | SENTINEL = object() | |||
|
48 | ||||
46 | HAS_FAST_DIRSTATE_V2 = rustmod is not None |
|
49 | HAS_FAST_DIRSTATE_V2 = rustmod is not None | |
47 |
|
50 | |||
48 | propertycache = util.propertycache |
|
51 | propertycache = util.propertycache | |
@@ -621,8 +624,12 b' class dirstate:' | |||||
621 | fold_p2 = oldp2 != nullid and p2 == nullid |
|
624 | fold_p2 = oldp2 != nullid and p2 == nullid | |
622 | return self._map.setparents(p1, p2, fold_p2=fold_p2) |
|
625 | return self._map.setparents(p1, p2, fold_p2=fold_p2) | |
623 |
|
626 | |||
624 |
def setbranch(self, branch, transaction= |
|
627 | def setbranch(self, branch, transaction=SENTINEL): | |
625 | self.__class__._branch.set(self, encoding.fromlocal(branch)) |
|
628 | self.__class__._branch.set(self, encoding.fromlocal(branch)) | |
|
629 | if transaction is SENTINEL: | |||
|
630 | msg = b"setbranch needs a `transaction` argument" | |||
|
631 | self._ui.deprecwarn(msg, b'6.5') | |||
|
632 | transaction = None | |||
626 | if transaction is not None: |
|
633 | if transaction is not None: | |
627 | self._setup_tr_abort(transaction) |
|
634 | self._setup_tr_abort(transaction) | |
628 | transaction.addfilegenerator( |
|
635 | transaction.addfilegenerator( |
General Comments 0
You need to be logged in to leave comments.
Login now