Show More
@@ -29,6 +29,7 from .node import ( | |||||
29 | hex, |
|
29 | hex, | |
30 | nullid, |
|
30 | nullid, | |
31 | nullrev, |
|
31 | nullrev, | |
|
32 | wdirfilenodeids, | |||
32 | wdirhex, |
|
33 | wdirhex, | |
33 | wdirid, |
|
34 | wdirid, | |
34 | wdirrev, |
|
35 | wdirrev, | |
@@ -807,7 +808,7 class revlog(object): | |||||
807 | raise |
|
808 | raise | |
808 | except RevlogError: |
|
809 | except RevlogError: | |
809 | # parsers.c radix tree lookup failed |
|
810 | # parsers.c radix tree lookup failed | |
810 | if node == wdirid: |
|
811 | if node == wdirid or node in wdirfilenodeids: | |
811 | raise error.WdirUnsupported |
|
812 | raise error.WdirUnsupported | |
812 | raise LookupError(node, self.indexfile, _('no node')) |
|
813 | raise LookupError(node, self.indexfile, _('no node')) | |
813 | except KeyError: |
|
814 | except KeyError: | |
@@ -823,7 +824,7 class revlog(object): | |||||
823 | if v == node: |
|
824 | if v == node: | |
824 | self._nodepos = r - 1 |
|
825 | self._nodepos = r - 1 | |
825 | return r |
|
826 | return r | |
826 | if node == wdirid: |
|
827 | if node == wdirid or node in wdirfilenodeids: | |
827 | raise error.WdirUnsupported |
|
828 | raise error.WdirUnsupported | |
828 | raise LookupError(node, self.indexfile, _('no node')) |
|
829 | raise LookupError(node, self.indexfile, _('no node')) | |
829 |
|
830 | |||
@@ -1436,6 +1437,7 class revlog(object): | |||||
1436 | pass |
|
1437 | pass | |
1437 |
|
1438 | |||
1438 | def _partialmatch(self, id): |
|
1439 | def _partialmatch(self, id): | |
|
1440 | # we don't care wdirfilenodeids as they should be always full hash | |||
1439 | maybewdir = wdirhex.startswith(id) |
|
1441 | maybewdir = wdirhex.startswith(id) | |
1440 | try: |
|
1442 | try: | |
1441 | partial = self.index.partialmatch(id) |
|
1443 | partial = self.index.partialmatch(id) | |
@@ -2114,7 +2116,7 class revlog(object): | |||||
2114 | if node == nullid: |
|
2116 | if node == nullid: | |
2115 | raise RevlogError(_("%s: attempt to add null revision") % |
|
2117 | raise RevlogError(_("%s: attempt to add null revision") % | |
2116 | (self.indexfile)) |
|
2118 | (self.indexfile)) | |
2117 | if node == wdirid: |
|
2119 | if node == wdirid or node in wdirfilenodeids: | |
2118 | raise RevlogError(_("%s: attempt to add wdir revision") % |
|
2120 | raise RevlogError(_("%s: attempt to add wdir revision") % | |
2119 | (self.indexfile)) |
|
2121 | (self.indexfile)) | |
2120 |
|
2122 |
General Comments 0
You need to be logged in to leave comments.
Login now