Show More
@@ -315,14 +315,14 class localrepository(object): | |||
|
315 | 315 | |
|
316 | 316 | def _applyrequirements(self, requirements): |
|
317 | 317 | self.requirements = requirements |
|
318 |
self.s |
|
|
318 | self.svfs.options = dict((r, 1) for r in requirements | |
|
319 | 319 | if r in self.openerreqs) |
|
320 | 320 | chunkcachesize = self.ui.configint('format', 'chunkcachesize') |
|
321 | 321 | if chunkcachesize is not None: |
|
322 |
self.s |
|
|
322 | self.svfs.options['chunkcachesize'] = chunkcachesize | |
|
323 | 323 | maxchainlen = self.ui.configint('format', 'maxchainlen') |
|
324 | 324 | if maxchainlen is not None: |
|
325 |
self.s |
|
|
325 | self.svfs.options['maxchainlen'] = maxchainlen | |
|
326 | 326 | |
|
327 | 327 | def _writerequirements(self): |
|
328 | 328 | reqfile = self.vfs("requires", "w") |
@@ -414,7 +414,7 class localrepository(object): | |||
|
414 | 414 | if defaultformat is not None: |
|
415 | 415 | kwargs['defaultformat'] = defaultformat |
|
416 | 416 | readonly = not obsolete.isenabled(self, obsolete.createmarkersopt) |
|
417 |
store = obsolete.obsstore(self.s |
|
|
417 | store = obsolete.obsstore(self.svfs, readonly=readonly, | |
|
418 | 418 | **kwargs) |
|
419 | 419 | if store and readonly: |
|
420 | 420 | # message is rare enough to not be translated |
@@ -424,7 +424,7 class localrepository(object): | |||
|
424 | 424 | |
|
425 | 425 | @storecache('00changelog.i') |
|
426 | 426 | def changelog(self): |
|
427 |
c = changelog.changelog(self.s |
|
|
427 | c = changelog.changelog(self.svfs) | |
|
428 | 428 | if 'HG_PENDING' in os.environ: |
|
429 | 429 | p = os.environ['HG_PENDING'] |
|
430 | 430 | if p.startswith(self.root): |
@@ -433,7 +433,7 class localrepository(object): | |||
|
433 | 433 | |
|
434 | 434 | @storecache('00manifest.i') |
|
435 | 435 | def manifest(self): |
|
436 |
return manifest.manifest(self.s |
|
|
436 | return manifest.manifest(self.svfs) | |
|
437 | 437 | |
|
438 | 438 | @repofilecache('dirstate') |
|
439 | 439 | def dirstate(self): |
@@ -782,7 +782,7 class localrepository(object): | |||
|
782 | 782 | def file(self, f): |
|
783 | 783 | if f[0] == '/': |
|
784 | 784 | f = f[1:] |
|
785 |
return filelog.filelog(self.s |
|
|
785 | return filelog.filelog(self.svfs, f) | |
|
786 | 786 | |
|
787 | 787 | def changectx(self, changeid): |
|
788 | 788 | return self[changeid] |
@@ -910,7 +910,7 class localrepository(object): | |||
|
910 | 910 | renames = [(vfs, x, undoname(x)) for vfs, x in self._journalfiles()] |
|
911 | 911 | rp = report and report or self.ui.warn |
|
912 | 912 | vfsmap = {'plain': self.vfs} # root of .hg/ |
|
913 |
tr = transaction.transaction(rp, self.s |
|
|
913 | tr = transaction.transaction(rp, self.svfs, vfsmap, | |
|
914 | 914 | "journal", |
|
915 | 915 | aftertrans(renames), |
|
916 | 916 | self.store.createmode) |
@@ -941,17 +941,17 class localrepository(object): | |||
|
941 | 941 | "%d\n%s\n" % (len(self), desc)) |
|
942 | 942 | self.vfs.write("journal.bookmarks", |
|
943 | 943 | self.vfs.tryread("bookmarks")) |
|
944 |
self.s |
|
|
945 |
self.s |
|
|
944 | self.svfs.write("journal.phaseroots", | |
|
945 | self.svfs.tryread("phaseroots")) | |
|
946 | 946 | |
|
947 | 947 | def recover(self): |
|
948 | 948 | lock = self.lock() |
|
949 | 949 | try: |
|
950 | 950 | if self.svfs.exists("journal"): |
|
951 | 951 | self.ui.status(_("rolling back interrupted transaction\n")) |
|
952 |
vfsmap = {'': self.s |
|
|
952 | vfsmap = {'': self.svfs, | |
|
953 | 953 | 'plain': self.vfs,} |
|
954 |
transaction.rollback(self.s |
|
|
954 | transaction.rollback(self.svfs, vfsmap, "journal", | |
|
955 | 955 | self.ui.warn) |
|
956 | 956 | self.invalidate() |
|
957 | 957 | return True |
@@ -1008,7 +1008,7 class localrepository(object): | |||
|
1008 | 1008 | parents = self.dirstate.parents() |
|
1009 | 1009 | self.destroying() |
|
1010 | 1010 | vfsmap = {'plain': self.vfs} |
|
1011 |
transaction.rollback(self.s |
|
|
1011 | transaction.rollback(self.svfs, vfsmap, 'undo', ui.warn) | |
|
1012 | 1012 | if self.vfs.exists('undo.bookmarks'): |
|
1013 | 1013 | self.vfs.rename('undo.bookmarks', 'bookmarks') |
|
1014 | 1014 | if self.svfs.exists('undo.phaseroots'): |
@@ -1693,7 +1693,7 class localrepository(object): | |||
|
1693 | 1693 | self.ui.debug('adding %s (%s)\n' % |
|
1694 | 1694 | (name, util.bytecount(size))) |
|
1695 | 1695 | # for backwards compat, name was partially encoded |
|
1696 |
ofp = self.s |
|
|
1696 | ofp = self.svfs(store.decodedir(name), 'w') | |
|
1697 | 1697 | for chunk in util.filechunkiter(fp, limit=size): |
|
1698 | 1698 | handled_bytes += len(chunk) |
|
1699 | 1699 | self.ui.progress(_('clone'), handled_bytes, |
General Comments 0
You need to be logged in to leave comments.
Login now