Show More
@@ -389,7 +389,7 b' class gitdirstate:' | |||||
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, transaction |
|
392 | def setbranch(self, branch, transaction): | |
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 | ) |
@@ -42,9 +42,6 b' from .interfaces import (' | |||||
42 | parsers = policy.importmod('parsers') |
|
42 | parsers = policy.importmod('parsers') | |
43 | rustmod = policy.importrust('dirstate') |
|
43 | rustmod = policy.importrust('dirstate') | |
44 |
|
44 | |||
45 | # use to detect lack of a parameter |
|
|||
46 | SENTINEL = object() |
|
|||
47 |
|
||||
48 | HAS_FAST_DIRSTATE_V2 = rustmod is not None |
|
45 | HAS_FAST_DIRSTATE_V2 = rustmod is not None | |
49 |
|
46 | |||
50 | propertycache = util.propertycache |
|
47 | propertycache = util.propertycache | |
@@ -660,12 +657,8 b' class dirstate:' | |||||
660 | fold_p2 = oldp2 != nullid and p2 == nullid |
|
657 | fold_p2 = oldp2 != nullid and p2 == nullid | |
661 | return self._map.setparents(p1, p2, fold_p2=fold_p2) |
|
658 | return self._map.setparents(p1, p2, fold_p2=fold_p2) | |
662 |
|
659 | |||
663 |
def setbranch(self, branch, transaction |
|
660 | def setbranch(self, branch, transaction): | |
664 | self.__class__._branch.set(self, encoding.fromlocal(branch)) |
|
661 | self.__class__._branch.set(self, encoding.fromlocal(branch)) | |
665 | if transaction is SENTINEL: |
|
|||
666 | msg = b"setbranch needs a `transaction` argument" |
|
|||
667 | self._ui.deprecwarn(msg, b'6.5') |
|
|||
668 | transaction = None |
|
|||
669 | if transaction is not None: |
|
662 | if transaction is not None: | |
670 | self._setup_tr_abort(transaction) |
|
663 | self._setup_tr_abort(transaction) | |
671 | transaction.addfilegenerator( |
|
664 | transaction.addfilegenerator( |
@@ -123,7 +123,7 b' class idirstate(interfaceutil.Interface)' | |||||
123 | See localrepo.setparents() |
|
123 | See localrepo.setparents() | |
124 | """ |
|
124 | """ | |
125 |
|
125 | |||
126 |
def setbranch(branch, transaction |
|
126 | def setbranch(branch, transaction): | |
127 | pass |
|
127 | pass | |
128 |
|
128 | |||
129 | def invalidate(): |
|
129 | def invalidate(): |
General Comments 0
You need to be logged in to leave comments.
Login now