Show More
@@ -615,7 +615,12 b' class sqlitefilestore(object):' | |||||
615 | self._revisioncache[node] = revisiondata |
|
615 | self._revisioncache[node] = revisiondata | |
616 | return node |
|
616 | return node | |
617 |
|
617 | |||
618 |
def addgroup(self, deltas, linkmapper, transaction, addrevisioncb=None |
|
618 | def addgroup(self, deltas, linkmapper, transaction, addrevisioncb=None, | |
|
619 | maybemissingparents=False): | |||
|
620 | if maybemissingparents: | |||
|
621 | raise error.Abort(_('SQLite storage does not support missing ' | |||
|
622 | 'parents write mode')) | |||
|
623 | ||||
619 | nodes = [] |
|
624 | nodes = [] | |
620 |
|
625 | |||
621 | for node, p1, p2, linknode, deltabase, delta, wireflags in deltas: |
|
626 | for node, p1, p2, linknode, deltabase, delta, wireflags in deltas: |
@@ -7,6 +7,7 b'' | |||||
7 |
|
7 | |||
8 | from __future__ import absolute_import |
|
8 | from __future__ import absolute_import | |
9 |
|
9 | |||
|
10 | from .i18n import _ | |||
10 | from .node import ( |
|
11 | from .node import ( | |
11 | nullid, |
|
12 | nullid, | |
12 | nullrev, |
|
13 | nullrev, | |
@@ -104,7 +105,12 b' class filelog(object):' | |||||
104 | p1, p2, node=node, flags=flags, |
|
105 | p1, p2, node=node, flags=flags, | |
105 | cachedelta=cachedelta) |
|
106 | cachedelta=cachedelta) | |
106 |
|
107 | |||
107 |
def addgroup(self, deltas, linkmapper, transaction, addrevisioncb=None |
|
108 | def addgroup(self, deltas, linkmapper, transaction, addrevisioncb=None, | |
|
109 | maybemissingparents=False): | |||
|
110 | if maybemissingparents: | |||
|
111 | raise error.Abort(_('revlog storage does not support missing ' | |||
|
112 | 'parents write mode')) | |||
|
113 | ||||
108 | return self._revlog.addgroup(deltas, linkmapper, transaction, |
|
114 | return self._revlog.addgroup(deltas, linkmapper, transaction, | |
109 | addrevisioncb=addrevisioncb) |
|
115 | addrevisioncb=addrevisioncb) | |
110 |
|
116 |
@@ -693,7 +693,8 b' class ifilemutation(interfaceutil.Interf' | |||||
693 | applying raw data from a peer repo. |
|
693 | applying raw data from a peer repo. | |
694 | """ |
|
694 | """ | |
695 |
|
695 | |||
696 |
def addgroup(deltas, linkmapper, transaction, addrevisioncb=None |
|
696 | def addgroup(deltas, linkmapper, transaction, addrevisioncb=None, | |
|
697 | maybemissingparents=False): | |||
697 | """Process a series of deltas for storage. |
|
698 | """Process a series of deltas for storage. | |
698 |
|
699 | |||
699 | ``deltas`` is an iterable of 7-tuples of |
|
700 | ``deltas`` is an iterable of 7-tuples of | |
@@ -707,6 +708,11 b' class ifilemutation(interfaceutil.Interf' | |||||
707 |
|
708 | |||
708 | ``addrevisioncb`` should be called for each node as it is committed. |
|
709 | ``addrevisioncb`` should be called for each node as it is committed. | |
709 |
|
710 | |||
|
711 | ``maybemissingparents`` is a bool indicating whether the incoming | |||
|
712 | data may reference parents/ancestor revisions that aren't present. | |||
|
713 | This flag is set when receiving data into a "shallow" store that | |||
|
714 | doesn't hold all history. | |||
|
715 | ||||
710 | Returns a list of nodes that were processed. A node will be in the list |
|
716 | Returns a list of nodes that were processed. A node will be in the list | |
711 | even if it existed in the store previously. |
|
717 | even if it existed in the store previously. | |
712 | """ |
|
718 | """ |
@@ -459,7 +459,12 b' class filestorage(object):' | |||||
459 | self._refreshindex() |
|
459 | self._refreshindex() | |
460 | self._svfs.write(self._indexpath, cbor.dumps(self._indexdata)) |
|
460 | self._svfs.write(self._indexpath, cbor.dumps(self._indexdata)) | |
461 |
|
461 | |||
462 |
def addgroup(self, deltas, linkmapper, transaction, addrevisioncb=None |
|
462 | def addgroup(self, deltas, linkmapper, transaction, addrevisioncb=None, | |
|
463 | maybemissingparents=False): | |||
|
464 | if maybemissingparents: | |||
|
465 | raise error.Abort(_('simple store does not support missing parents ' | |||
|
466 | 'write mode')) | |||
|
467 | ||||
463 | nodes = [] |
|
468 | nodes = [] | |
464 |
|
469 | |||
465 | transaction.addbackup(self._indexpath) |
|
470 | transaction.addbackup(self._indexpath) |
General Comments 0
You need to be logged in to leave comments.
Login now