36 REVISION_FLAG_ELLIPSIS = 1 << 14 |
32 REVISION_FLAG_ELLIPSIS = 1 << 14 |
37 REVISION_FLAG_EXTSTORED = 1 << 13 |
33 REVISION_FLAG_EXTSTORED = 1 << 13 |
38 REVISION_FLAG_SIDEDATA = 1 << 12 |
34 REVISION_FLAG_SIDEDATA = 1 << 12 |
39 |
35 |
40 REVISION_FLAGS_KNOWN = ( |
36 REVISION_FLAGS_KNOWN = ( |
41 REVISION_FLAG_CENSORED | REVISION_FLAG_ELLIPSIS | REVISION_FLAG_EXTSTORED |
37 REVISION_FLAG_CENSORED |
|
38 | REVISION_FLAG_ELLIPSIS |
|
39 | REVISION_FLAG_EXTSTORED |
42 | REVISION_FLAG_SIDEDATA |
40 | REVISION_FLAG_SIDEDATA |
43 ) |
41 ) |
44 |
42 |
45 CG_DELTAMODE_STD = b'default' |
43 CG_DELTAMODE_STD = b'default' |
46 CG_DELTAMODE_PREV = b'previous' |
44 CG_DELTAMODE_PREV = b'previous' |
47 CG_DELTAMODE_FULL = b'fulltext' |
45 CG_DELTAMODE_FULL = b'fulltext' |
48 CG_DELTAMODE_P1 = b'p1' |
46 CG_DELTAMODE_P1 = b'p1' |
49 |
47 |
|
48 |
50 class ipeerconnection(interfaceutil.Interface): |
49 class ipeerconnection(interfaceutil.Interface): |
51 """Represents a "connection" to a repository. |
50 """Represents a "connection" to a repository. |
52 |
51 |
53 This is the base interface for representing a connection to a repository. |
52 This is the base interface for representing a connection to a repository. |
54 It holds basic properties and methods applicable to all peer types. |
53 It holds basic properties and methods applicable to all peer types. |
55 |
54 |
56 This is not a complete interface definition and should not be used |
55 This is not a complete interface definition and should not be used |
57 outside of this module. |
56 outside of this module. |
58 """ |
57 """ |
|
58 |
59 ui = interfaceutil.Attribute("""ui.ui instance""") |
59 ui = interfaceutil.Attribute("""ui.ui instance""") |
60 |
60 |
61 def url(): |
61 def url(): |
62 """Returns a URL string representing this peer. |
62 """Returns a URL string representing this peer. |
63 |
63 |
318 called commands until they are told to send them and that each |
323 called commands until they are told to send them and that each |
319 command executor could result in a new connection or wire-level request |
324 command executor could result in a new connection or wire-level request |
320 being issued. |
325 being issued. |
321 """ |
326 """ |
322 |
327 |
|
328 |
323 class ipeerbase(ipeerconnection, ipeercapabilities, ipeerrequests): |
329 class ipeerbase(ipeerconnection, ipeercapabilities, ipeerrequests): |
324 """Unified interface for peer repositories. |
330 """Unified interface for peer repositories. |
325 |
331 |
326 All peer instances must conform to this interface. |
332 All peer instances must conform to this interface. |
327 """ |
333 """ |
328 |
334 |
|
335 |
329 class ipeerv2(ipeerconnection, ipeercapabilities, ipeerrequests): |
336 class ipeerv2(ipeerconnection, ipeercapabilities, ipeerrequests): |
330 """Unified peer interface for wire protocol version 2 peers.""" |
337 """Unified peer interface for wire protocol version 2 peers.""" |
331 |
338 |
332 apidescriptor = interfaceutil.Attribute( |
339 apidescriptor = interfaceutil.Attribute( |
333 """Data structure holding description of server API.""") |
340 """Data structure holding description of server API.""" |
|
341 ) |
|
342 |
334 |
343 |
335 @interfaceutil.implementer(ipeerbase) |
344 @interfaceutil.implementer(ipeerbase) |
336 class peer(object): |
345 class peer(object): |
337 """Base class for peer repositories.""" |
346 """Base class for peer repositories.""" |
338 |
347 |
344 return True |
353 return True |
345 |
354 |
346 name = '%s=' % name |
355 name = '%s=' % name |
347 for cap in caps: |
356 for cap in caps: |
348 if cap.startswith(name): |
357 if cap.startswith(name): |
349 return cap[len(name):] |
358 return cap[len(name) :] |
350 |
359 |
351 return False |
360 return False |
352 |
361 |
353 def requirecap(self, name, purpose): |
362 def requirecap(self, name, purpose): |
354 if self.capable(name): |
363 if self.capable(name): |
355 return |
364 return |
356 |
365 |
357 raise error.CapabilityError( |
366 raise error.CapabilityError( |
358 _('cannot %s; remote repository does not support the ' |
367 _( |
359 '\'%s\' capability') % (purpose, name)) |
368 'cannot %s; remote repository does not support the ' |
|
369 '\'%s\' capability' |
|
370 ) |
|
371 % (purpose, name) |
|
372 ) |
|
373 |
360 |
374 |
361 class iverifyproblem(interfaceutil.Interface): |
375 class iverifyproblem(interfaceutil.Interface): |
362 """Represents a problem with the integrity of the repository. |
376 """Represents a problem with the integrity of the repository. |
363 |
377 |
364 Instances of this interface are emitted to describe an integrity issue |
378 Instances of this interface are emitted to describe an integrity issue |
365 with a repository (e.g. corrupt storage, missing data, etc). |
379 with a repository (e.g. corrupt storage, missing data, etc). |
366 |
380 |
367 Instances are essentially messages associated with severity. |
381 Instances are essentially messages associated with severity. |
368 """ |
382 """ |
|
383 |
369 warning = interfaceutil.Attribute( |
384 warning = interfaceutil.Attribute( |
370 """Message indicating a non-fatal problem.""") |
385 """Message indicating a non-fatal problem.""" |
371 |
386 ) |
372 error = interfaceutil.Attribute( |
387 |
373 """Message indicating a fatal problem.""") |
388 error = interfaceutil.Attribute("""Message indicating a fatal problem.""") |
374 |
389 |
375 node = interfaceutil.Attribute( |
390 node = interfaceutil.Attribute( |
376 """Revision encountering the problem. |
391 """Revision encountering the problem. |
377 |
392 |
378 ``None`` means the problem doesn't apply to a single revision. |
393 ``None`` means the problem doesn't apply to a single revision. |
379 """) |
394 """ |
|
395 ) |
|
396 |
380 |
397 |
381 class irevisiondelta(interfaceutil.Interface): |
398 class irevisiondelta(interfaceutil.Interface): |
382 """Represents a delta between one revision and another. |
399 """Represents a delta between one revision and another. |
383 |
400 |
384 Instances convey enough information to allow a revision to be exchanged |
401 Instances convey enough information to allow a revision to be exchanged |
389 are mutually exclusive. |
406 are mutually exclusive. |
390 |
407 |
391 Typically used for changegroup generation. |
408 Typically used for changegroup generation. |
392 """ |
409 """ |
393 |
410 |
394 node = interfaceutil.Attribute( |
411 node = interfaceutil.Attribute("""20 byte node of this revision.""") |
395 """20 byte node of this revision.""") |
|
396 |
412 |
397 p1node = interfaceutil.Attribute( |
413 p1node = interfaceutil.Attribute( |
398 """20 byte node of 1st parent of this revision.""") |
414 """20 byte node of 1st parent of this revision.""" |
|
415 ) |
399 |
416 |
400 p2node = interfaceutil.Attribute( |
417 p2node = interfaceutil.Attribute( |
401 """20 byte node of 2nd parent of this revision.""") |
418 """20 byte node of 2nd parent of this revision.""" |
|
419 ) |
402 |
420 |
403 linknode = interfaceutil.Attribute( |
421 linknode = interfaceutil.Attribute( |
404 """20 byte node of the changelog revision this node is linked to.""") |
422 """20 byte node of the changelog revision this node is linked to.""" |
|
423 ) |
405 |
424 |
406 flags = interfaceutil.Attribute( |
425 flags = interfaceutil.Attribute( |
407 """2 bytes of integer flags that apply to this revision. |
426 """2 bytes of integer flags that apply to this revision. |
408 |
427 |
409 This is a bitwise composition of the ``REVISION_FLAG_*`` constants. |
428 This is a bitwise composition of the ``REVISION_FLAG_*`` constants. |
410 """) |
429 """ |
|
430 ) |
411 |
431 |
412 basenode = interfaceutil.Attribute( |
432 basenode = interfaceutil.Attribute( |
413 """20 byte node of the revision this data is a delta against. |
433 """20 byte node of the revision this data is a delta against. |
414 |
434 |
415 ``nullid`` indicates that the revision is a full revision and not |
435 ``nullid`` indicates that the revision is a full revision and not |
416 a delta. |
436 a delta. |
417 """) |
437 """ |
|
438 ) |
418 |
439 |
419 baserevisionsize = interfaceutil.Attribute( |
440 baserevisionsize = interfaceutil.Attribute( |
420 """Size of base revision this delta is against. |
441 """Size of base revision this delta is against. |
421 |
442 |
422 May be ``None`` if ``basenode`` is ``nullid``. |
443 May be ``None`` if ``basenode`` is ``nullid``. |
423 """) |
444 """ |
|
445 ) |
424 |
446 |
425 revision = interfaceutil.Attribute( |
447 revision = interfaceutil.Attribute( |
426 """Raw fulltext of revision data for this node.""") |
448 """Raw fulltext of revision data for this node.""" |
|
449 ) |
427 |
450 |
428 delta = interfaceutil.Attribute( |
451 delta = interfaceutil.Attribute( |
429 """Delta between ``basenode`` and ``node``. |
452 """Delta between ``basenode`` and ``node``. |
430 |
453 |
431 Stored in the bdiff delta format. |
454 Stored in the bdiff delta format. |
432 """) |
455 """ |
|
456 ) |
|
457 |
433 |
458 |
434 class ifilerevisionssequence(interfaceutil.Interface): |
459 class ifilerevisionssequence(interfaceutil.Interface): |
435 """Contains index data for all revisions of a file. |
460 """Contains index data for all revisions of a file. |
436 |
461 |
437 Types implementing this behave like lists of tuples. The index |
462 Types implementing this behave like lists of tuples. The index |
711 directory. ``addrevision()`` is often called by ``add()`` and for |
751 directory. ``addrevision()`` is often called by ``add()`` and for |
712 scenarios where revision data has already been computed, such as when |
752 scenarios where revision data has already been computed, such as when |
713 applying raw data from a peer repo. |
753 applying raw data from a peer repo. |
714 """ |
754 """ |
715 |
755 |
716 def addgroup(deltas, linkmapper, transaction, addrevisioncb=None, |
756 def addgroup( |
717 maybemissingparents=False): |
757 deltas, |
|
758 linkmapper, |
|
759 transaction, |
|
760 addrevisioncb=None, |
|
761 maybemissingparents=False, |
|
762 ): |
718 """Process a series of deltas for storage. |
763 """Process a series of deltas for storage. |
719 |
764 |
720 ``deltas`` is an iterable of 7-tuples of |
765 ``deltas`` is an iterable of 7-tuples of |
721 (node, p1, p2, linknode, deltabase, delta, flags) defining revisions |
766 (node, p1, p2, linknode, deltabase, delta, flags) defining revisions |
722 to add. |
767 to add. |
772 |
817 |
773 TODO this is highly revlog centric and should be abstracted into a |
818 TODO this is highly revlog centric and should be abstracted into a |
774 higher-level deletion API. |
819 higher-level deletion API. |
775 """ |
820 """ |
776 |
821 |
|
822 |
777 class ifilestorage(ifileindex, ifiledata, ifilemutation): |
823 class ifilestorage(ifileindex, ifiledata, ifilemutation): |
778 """Complete storage interface for a single tracked file.""" |
824 """Complete storage interface for a single tracked file.""" |
779 |
825 |
780 def files(): |
826 def files(): |
781 """Obtain paths that are backing storage for this file. |
827 """Obtain paths that are backing storage for this file. |
782 |
828 |
783 TODO this is used heavily by verify code and there should probably |
829 TODO this is used heavily by verify code and there should probably |
784 be a better API for that. |
830 be a better API for that. |
785 """ |
831 """ |
786 |
832 |
787 def storageinfo(exclusivefiles=False, sharedfiles=False, |
833 def storageinfo( |
788 revisionscount=False, trackedsize=False, |
834 exclusivefiles=False, |
789 storedsize=False): |
835 sharedfiles=False, |
|
836 revisionscount=False, |
|
837 trackedsize=False, |
|
838 storedsize=False, |
|
839 ): |
790 """Obtain information about storage for this file's data. |
840 """Obtain information about storage for this file's data. |
791 |
841 |
792 Returns a dict describing storage for this tracked path. The keys |
842 Returns a dict describing storage for this tracked path. The keys |
793 in the dict map to arguments of the same. The arguments are bools |
843 in the dict map to arguments of the same. The arguments are bools |
794 indicating whether to calculate and obtain that data. |
844 indicating whether to calculate and obtain that data. |
1085 manifests should not be "narrowed on disk"). |
1140 manifests should not be "narrowed on disk"). |
1086 |
1141 |
1087 Returns the binary node of the created revision. |
1142 Returns the binary node of the created revision. |
1088 """ |
1143 """ |
1089 |
1144 |
|
1145 |
1090 class imanifeststorage(interfaceutil.Interface): |
1146 class imanifeststorage(interfaceutil.Interface): |
1091 """Storage interface for manifest data.""" |
1147 """Storage interface for manifest data.""" |
1092 |
1148 |
1093 tree = interfaceutil.Attribute( |
1149 tree = interfaceutil.Attribute( |
1094 """The path to the directory this manifest tracks. |
1150 """The path to the directory this manifest tracks. |
1095 |
1151 |
1096 The empty bytestring represents the root manifest. |
1152 The empty bytestring represents the root manifest. |
1097 """) |
1153 """ |
|
1154 ) |
1098 |
1155 |
1099 index = interfaceutil.Attribute( |
1156 index = interfaceutil.Attribute( |
1100 """An ``ifilerevisionssequence`` instance.""") |
1157 """An ``ifilerevisionssequence`` instance.""" |
|
1158 ) |
1101 |
1159 |
1102 indexfile = interfaceutil.Attribute( |
1160 indexfile = interfaceutil.Attribute( |
1103 """Path of revlog index file. |
1161 """Path of revlog index file. |
1104 |
1162 |
1105 TODO this is revlog specific and should not be exposed. |
1163 TODO this is revlog specific and should not be exposed. |
1106 """) |
1164 """ |
|
1165 ) |
1107 |
1166 |
1108 opener = interfaceutil.Attribute( |
1167 opener = interfaceutil.Attribute( |
1109 """VFS opener to use to access underlying files used for storage. |
1168 """VFS opener to use to access underlying files used for storage. |
1110 |
1169 |
1111 TODO this is revlog specific and should not be exposed. |
1170 TODO this is revlog specific and should not be exposed. |
1112 """) |
1171 """ |
|
1172 ) |
1113 |
1173 |
1114 version = interfaceutil.Attribute( |
1174 version = interfaceutil.Attribute( |
1115 """Revlog version number. |
1175 """Revlog version number. |
1116 |
1176 |
1117 TODO this is revlog specific and should not be exposed. |
1177 TODO this is revlog specific and should not be exposed. |
1118 """) |
1178 """ |
|
1179 ) |
1119 |
1180 |
1120 _generaldelta = interfaceutil.Attribute( |
1181 _generaldelta = interfaceutil.Attribute( |
1121 """Whether generaldelta storage is being used. |
1182 """Whether generaldelta storage is being used. |
1122 |
1183 |
1123 TODO this is revlog specific and should not be exposed. |
1184 TODO this is revlog specific and should not be exposed. |
1124 """) |
1185 """ |
|
1186 ) |
1125 |
1187 |
1126 fulltextcache = interfaceutil.Attribute( |
1188 fulltextcache = interfaceutil.Attribute( |
1127 """Dict with cache of fulltexts. |
1189 """Dict with cache of fulltexts. |
1128 |
1190 |
1129 TODO this doesn't feel appropriate for the storage interface. |
1191 TODO this doesn't feel appropriate for the storage interface. |
1130 """) |
1192 """ |
|
1193 ) |
1131 |
1194 |
1132 def __len__(): |
1195 def __len__(): |
1133 """Obtain the number of revisions stored for this manifest.""" |
1196 """Obtain the number of revisions stored for this manifest.""" |
1134 |
1197 |
1135 def __iter__(): |
1198 def __iter__(): |
1272 paths must be inspected; this is an optimization and can be safely |
1338 paths must be inspected; this is an optimization and can be safely |
1273 ignored. Note that the storage must still be able to reproduce a full |
1339 ignored. Note that the storage must still be able to reproduce a full |
1274 manifest including files that did not match. |
1340 manifest including files that did not match. |
1275 """ |
1341 """ |
1276 |
1342 |
1277 def storageinfo(exclusivefiles=False, sharedfiles=False, |
1343 def storageinfo( |
1278 revisionscount=False, trackedsize=False, |
1344 exclusivefiles=False, |
1279 storedsize=False): |
1345 sharedfiles=False, |
|
1346 revisionscount=False, |
|
1347 trackedsize=False, |
|
1348 storedsize=False, |
|
1349 ): |
1280 """Obtain information about storage for this manifest's data. |
1350 """Obtain information about storage for this manifest's data. |
1281 |
1351 |
1282 See ``ifilestorage.storageinfo()`` for a description of this method. |
1352 See ``ifilestorage.storageinfo()`` for a description of this method. |
1283 This one behaves the same way, except for manifest data. |
1353 This one behaves the same way, except for manifest data. |
1284 """ |
1354 """ |
|
1355 |
1285 |
1356 |
1286 class imanifestlog(interfaceutil.Interface): |
1357 class imanifestlog(interfaceutil.Interface): |
1287 """Interface representing a collection of manifest snapshots. |
1358 """Interface representing a collection of manifest snapshots. |
1288 |
1359 |
1289 Represents the root manifest in a repository. |
1360 Represents the root manifest in a repository. |
1347 """Obtain a filelog for a tracked path. |
1419 """Obtain a filelog for a tracked path. |
1348 |
1420 |
1349 The returned type conforms to the ``ifilestorage`` interface. |
1421 The returned type conforms to the ``ifilestorage`` interface. |
1350 """ |
1422 """ |
1351 |
1423 |
|
1424 |
1352 class ilocalrepositorymain(interfaceutil.Interface): |
1425 class ilocalrepositorymain(interfaceutil.Interface): |
1353 """Main interface for local repositories. |
1426 """Main interface for local repositories. |
1354 |
1427 |
1355 This currently captures the reality of things - not how things should be. |
1428 This currently captures the reality of things - not how things should be. |
1356 """ |
1429 """ |
1357 |
1430 |
1358 supportedformats = interfaceutil.Attribute( |
1431 supportedformats = interfaceutil.Attribute( |
1359 """Set of requirements that apply to stream clone. |
1432 """Set of requirements that apply to stream clone. |
1360 |
1433 |
1361 This is actually a class attribute and is shared among all instances. |
1434 This is actually a class attribute and is shared among all instances. |
1362 """) |
1435 """ |
|
1436 ) |
1363 |
1437 |
1364 supported = interfaceutil.Attribute( |
1438 supported = interfaceutil.Attribute( |
1365 """Set of requirements that this repo is capable of opening.""") |
1439 """Set of requirements that this repo is capable of opening.""" |
|
1440 ) |
1366 |
1441 |
1367 requirements = interfaceutil.Attribute( |
1442 requirements = interfaceutil.Attribute( |
1368 """Set of requirements this repo uses.""") |
1443 """Set of requirements this repo uses.""" |
|
1444 ) |
1369 |
1445 |
1370 features = interfaceutil.Attribute( |
1446 features = interfaceutil.Attribute( |
1371 """Set of "features" this repository supports. |
1447 """Set of "features" this repository supports. |
1372 |
1448 |
1373 A "feature" is a loosely-defined term. It can refer to a feature |
1449 A "feature" is a loosely-defined term. It can refer to a feature |
1381 |
1457 |
1382 Features are similar to ``requirements``. The main difference is that |
1458 Features are similar to ``requirements``. The main difference is that |
1383 requirements are stored on-disk and represent requirements to open the |
1459 requirements are stored on-disk and represent requirements to open the |
1384 repository. Features are more run-time capabilities of the repository |
1460 repository. Features are more run-time capabilities of the repository |
1385 and more granular capabilities (which may be derived from requirements). |
1461 and more granular capabilities (which may be derived from requirements). |
1386 """) |
1462 """ |
|
1463 ) |
1387 |
1464 |
1388 filtername = interfaceutil.Attribute( |
1465 filtername = interfaceutil.Attribute( |
1389 """Name of the repoview that is active on this repo.""") |
1466 """Name of the repoview that is active on this repo.""" |
|
1467 ) |
1390 |
1468 |
1391 wvfs = interfaceutil.Attribute( |
1469 wvfs = interfaceutil.Attribute( |
1392 """VFS used to access the working directory.""") |
1470 """VFS used to access the working directory.""" |
|
1471 ) |
1393 |
1472 |
1394 vfs = interfaceutil.Attribute( |
1473 vfs = interfaceutil.Attribute( |
1395 """VFS rooted at the .hg directory. |
1474 """VFS rooted at the .hg directory. |
1396 |
1475 |
1397 Used to access repository data not in the store. |
1476 Used to access repository data not in the store. |
1398 """) |
1477 """ |
|
1478 ) |
1399 |
1479 |
1400 svfs = interfaceutil.Attribute( |
1480 svfs = interfaceutil.Attribute( |
1401 """VFS rooted at the store. |
1481 """VFS rooted at the store. |
1402 |
1482 |
1403 Used to access repository data in the store. Typically .hg/store. |
1483 Used to access repository data in the store. Typically .hg/store. |
1404 But can point elsewhere if the store is shared. |
1484 But can point elsewhere if the store is shared. |
1405 """) |
1485 """ |
|
1486 ) |
1406 |
1487 |
1407 root = interfaceutil.Attribute( |
1488 root = interfaceutil.Attribute( |
1408 """Path to the root of the working directory.""") |
1489 """Path to the root of the working directory.""" |
1409 |
1490 ) |
1410 path = interfaceutil.Attribute( |
1491 |
1411 """Path to the .hg directory.""") |
1492 path = interfaceutil.Attribute("""Path to the .hg directory.""") |
1412 |
1493 |
1413 origroot = interfaceutil.Attribute( |
1494 origroot = interfaceutil.Attribute( |
1414 """The filesystem path that was used to construct the repo.""") |
1495 """The filesystem path that was used to construct the repo.""" |
|
1496 ) |
1415 |
1497 |
1416 auditor = interfaceutil.Attribute( |
1498 auditor = interfaceutil.Attribute( |
1417 """A pathauditor for the working directory. |
1499 """A pathauditor for the working directory. |
1418 |
1500 |
1419 This checks if a path refers to a nested repository. |
1501 This checks if a path refers to a nested repository. |
1420 |
1502 |
1421 Operates on the filesystem. |
1503 Operates on the filesystem. |
1422 """) |
1504 """ |
|
1505 ) |
1423 |
1506 |
1424 nofsauditor = interfaceutil.Attribute( |
1507 nofsauditor = interfaceutil.Attribute( |
1425 """A pathauditor for the working directory. |
1508 """A pathauditor for the working directory. |
1426 |
1509 |
1427 This is like ``auditor`` except it doesn't do filesystem checks. |
1510 This is like ``auditor`` except it doesn't do filesystem checks. |
1428 """) |
1511 """ |
|
1512 ) |
1429 |
1513 |
1430 baseui = interfaceutil.Attribute( |
1514 baseui = interfaceutil.Attribute( |
1431 """Original ui instance passed into constructor.""") |
1515 """Original ui instance passed into constructor.""" |
1432 |
1516 ) |
1433 ui = interfaceutil.Attribute( |
1517 |
1434 """Main ui instance for this instance.""") |
1518 ui = interfaceutil.Attribute("""Main ui instance for this instance.""") |
1435 |
1519 |
1436 sharedpath = interfaceutil.Attribute( |
1520 sharedpath = interfaceutil.Attribute( |
1437 """Path to the .hg directory of the repo this repo was shared from.""") |
1521 """Path to the .hg directory of the repo this repo was shared from.""" |
1438 |
1522 ) |
1439 store = interfaceutil.Attribute( |
1523 |
1440 """A store instance.""") |
1524 store = interfaceutil.Attribute("""A store instance.""") |
1441 |
1525 |
1442 spath = interfaceutil.Attribute( |
1526 spath = interfaceutil.Attribute("""Path to the store.""") |
1443 """Path to the store.""") |
1527 |
1444 |
1528 sjoin = interfaceutil.Attribute("""Alias to self.store.join.""") |
1445 sjoin = interfaceutil.Attribute( |
|
1446 """Alias to self.store.join.""") |
|
1447 |
1529 |
1448 cachevfs = interfaceutil.Attribute( |
1530 cachevfs = interfaceutil.Attribute( |
1449 """A VFS used to access the cache directory. |
1531 """A VFS used to access the cache directory. |
1450 |
1532 |
1451 Typically .hg/cache. |
1533 Typically .hg/cache. |
1452 """) |
1534 """ |
|
1535 ) |
1453 |
1536 |
1454 wcachevfs = interfaceutil.Attribute( |
1537 wcachevfs = interfaceutil.Attribute( |
1455 """A VFS used to access the cache directory dedicated to working copy |
1538 """A VFS used to access the cache directory dedicated to working copy |
1456 |
1539 |
1457 Typically .hg/wcache. |
1540 Typically .hg/wcache. |
1458 """) |
1541 """ |
|
1542 ) |
1459 |
1543 |
1460 filteredrevcache = interfaceutil.Attribute( |
1544 filteredrevcache = interfaceutil.Attribute( |
1461 """Holds sets of revisions to be filtered.""") |
1545 """Holds sets of revisions to be filtered.""" |
1462 |
1546 ) |
1463 names = interfaceutil.Attribute( |
1547 |
1464 """A ``namespaces`` instance.""") |
1548 names = interfaceutil.Attribute("""A ``namespaces`` instance.""") |
1465 |
1549 |
1466 def close(): |
1550 def close(): |
1467 """Close the handle on this repository.""" |
1551 """Close the handle on this repository.""" |
1468 |
1552 |
1469 def peer(): |
1553 def peer(): |
1473 """Obtain an unfiltered/raw view of this repo.""" |
1557 """Obtain an unfiltered/raw view of this repo.""" |
1474 |
1558 |
1475 def filtered(name, visibilityexceptions=None): |
1559 def filtered(name, visibilityexceptions=None): |
1476 """Obtain a named view of this repository.""" |
1560 """Obtain a named view of this repository.""" |
1477 |
1561 |
1478 obsstore = interfaceutil.Attribute( |
1562 obsstore = interfaceutil.Attribute("""A store of obsolescence data.""") |
1479 """A store of obsolescence data.""") |
1563 |
1480 |
1564 changelog = interfaceutil.Attribute("""A handle on the changelog revlog.""") |
1481 changelog = interfaceutil.Attribute( |
|
1482 """A handle on the changelog revlog.""") |
|
1483 |
1565 |
1484 manifestlog = interfaceutil.Attribute( |
1566 manifestlog = interfaceutil.Attribute( |
1485 """An instance conforming to the ``imanifestlog`` interface. |
1567 """An instance conforming to the ``imanifestlog`` interface. |
1486 |
1568 |
1487 Provides access to manifests for the repository. |
1569 Provides access to manifests for the repository. |
1488 """) |
1570 """ |
1489 |
1571 ) |
1490 dirstate = interfaceutil.Attribute( |
1572 |
1491 """Working directory state.""") |
1573 dirstate = interfaceutil.Attribute("""Working directory state.""") |
1492 |
1574 |
1493 narrowpats = interfaceutil.Attribute( |
1575 narrowpats = interfaceutil.Attribute( |
1494 """Matcher patterns for this repository's narrowspec.""") |
1576 """Matcher patterns for this repository's narrowspec.""" |
|
1577 ) |
1495 |
1578 |
1496 def narrowmatch(match=None, includeexact=False): |
1579 def narrowmatch(match=None, includeexact=False): |
1497 """Obtain a matcher for the narrowspec.""" |
1580 """Obtain a matcher for the narrowspec.""" |
1498 |
1581 |
1499 def setnarrowpats(newincludes, newexcludes): |
1582 def setnarrowpats(newincludes, newexcludes): |