Show More
@@ -17,7 +17,7 b' from mercurial import (' | |||
|
17 | 17 | for fp in (sys.stdin, sys.stdout, sys.stderr): |
|
18 | 18 | util.setbinary(fp) |
|
19 | 19 | |
|
20 |
opener = scmutil. |
|
|
20 | opener = scmutil.vfs('.', False) | |
|
21 | 21 | tr = transaction.transaction(sys.stderr.write, opener, {'store': opener}, |
|
22 | 22 | "undump.journal") |
|
23 | 23 | while True: |
@@ -1146,8 +1146,8 b' class svn_sink(converter_sink, commandli' | |||
|
1146 | 1146 | self.run0('checkout', path, wcpath) |
|
1147 | 1147 | |
|
1148 | 1148 | self.wc = wcpath |
|
1149 |
self.opener = scmutil. |
|
|
1150 |
self.wopener = scmutil. |
|
|
1149 | self.opener = scmutil.vfs(self.wc) | |
|
1150 | self.wopener = scmutil.vfs(self.wc) | |
|
1151 | 1151 | self.childmap = mapfile(ui, self.join('hg-childmap')) |
|
1152 | 1152 | if util.checkexec(self.wc): |
|
1153 | 1153 | self.is_exec = util.isexec |
@@ -144,7 +144,7 b' def openlfdirstate(ui, repo, create=True' | |||
|
144 | 144 | ''' |
|
145 | 145 | vfs = repo.vfs |
|
146 | 146 | lfstoredir = longname |
|
147 |
opener = scmutil. |
|
|
147 | opener = scmutil.vfs(vfs.join(lfstoredir)) | |
|
148 | 148 | lfdirstate = largefilesdirstate(opener, ui, repo.root, |
|
149 | 149 | repo.dirstate._validate) |
|
150 | 150 |
@@ -434,7 +434,7 b' class queue(object):' | |||
|
434 | 434 | except IOError: |
|
435 | 435 | curpath = os.path.join(path, 'patches') |
|
436 | 436 | self.path = patchdir or curpath |
|
437 |
self.opener = scmutil. |
|
|
437 | self.opener = scmutil.vfs(self.path) | |
|
438 | 438 | self.ui = ui |
|
439 | 439 | self.baseui = baseui |
|
440 | 440 | self.applieddirty = False |
@@ -60,7 +60,7 b' class transplants(object):' | |||
|
60 | 60 | self.opener = opener |
|
61 | 61 | |
|
62 | 62 | if not opener: |
|
63 |
self.opener = scmutil. |
|
|
63 | self.opener = scmutil.vfs(self.path) | |
|
64 | 64 | self.transplants = {} |
|
65 | 65 | self.dirty = False |
|
66 | 66 | self.read() |
@@ -103,7 +103,7 b' class transplanter(object):' | |||
|
103 | 103 | def __init__(self, ui, repo, opts): |
|
104 | 104 | self.ui = ui |
|
105 | 105 | self.path = repo.join('transplant') |
|
106 |
self.opener = scmutil. |
|
|
106 | self.opener = scmutil.vfs(self.path) | |
|
107 | 107 | self.transplants = transplants(self.path, 'transplants', |
|
108 | 108 | opener=self.opener) |
|
109 | 109 | def getcommiteditor(): |
@@ -249,7 +249,7 b' class fileit(object):' | |||
|
249 | 249 | |
|
250 | 250 | def __init__(self, name, mtime): |
|
251 | 251 | self.basedir = name |
|
252 |
self.opener = scmutil. |
|
|
252 | self.opener = scmutil.vfs(self.basedir) | |
|
253 | 253 | |
|
254 | 254 | def addfile(self, name, mode, islink, data): |
|
255 | 255 | if islink: |
@@ -583,7 +583,7 b' def openrevlog(repo, cmd, file_, opts):' | |||
|
583 | 583 | raise error.CommandError(cmd, _('invalid arguments')) |
|
584 | 584 | if not os.path.isfile(file_): |
|
585 | 585 | raise error.Abort(_("revlog '%s' not found") % file_) |
|
586 |
r = revlog.revlog(scmutil. |
|
|
586 | r = revlog.revlog(scmutil.vfs(pycompat.getcwd(), audit=False), | |
|
587 | 587 | file_[:-2] + ".i") |
|
588 | 588 | return r |
|
589 | 589 |
@@ -76,7 +76,7 b' def debugancestor(ui, repo, *args):' | |||
|
76 | 76 | """find the ancestor revision of two revisions in a given index""" |
|
77 | 77 | if len(args) == 3: |
|
78 | 78 | index, rev1, rev2 = args |
|
79 |
r = revlog.revlog(scmutil. |
|
|
79 | r = revlog.revlog(scmutil.vfs(pycompat.getcwd(), audit=False), index) | |
|
80 | 80 | lookup = r.lookup |
|
81 | 81 | elif len(args) == 2: |
|
82 | 82 | if not repo: |
@@ -452,7 +452,7 b' def debugdag(ui, repo, file_=None, *revs' | |||
|
452 | 452 | spaces = opts.get('spaces') |
|
453 | 453 | dots = opts.get('dots') |
|
454 | 454 | if file_: |
|
455 |
rlog = revlog.revlog(scmutil. |
|
|
455 | rlog = revlog.revlog(scmutil.vfs(pycompat.getcwd(), audit=False), | |
|
456 | 456 | file_) |
|
457 | 457 | revs = set((int(r) for r in revs)) |
|
458 | 458 | def events(): |
@@ -449,7 +449,7 b' class abstractbackend(object):' | |||
|
449 | 449 | class fsbackend(abstractbackend): |
|
450 | 450 | def __init__(self, ui, basedir): |
|
451 | 451 | super(fsbackend, self).__init__(ui) |
|
452 |
self.opener = scmutil. |
|
|
452 | self.opener = scmutil.vfs(basedir) | |
|
453 | 453 | |
|
454 | 454 | def _join(self, f): |
|
455 | 455 | return os.path.join(self.opener.base, f) |
@@ -560,7 +560,7 b' class filestore(object):' | |||
|
560 | 560 | else: |
|
561 | 561 | if self.opener is None: |
|
562 | 562 | root = tempfile.mkdtemp(prefix='hg-patch-') |
|
563 |
self.opener = scmutil. |
|
|
563 | self.opener = scmutil.vfs(root) | |
|
564 | 564 | # Avoid filename issues with these simple names |
|
565 | 565 | fn = str(self.created) |
|
566 | 566 | self.opener.write(fn, data) |
@@ -437,7 +437,7 b' def simplemerge(ui, local, base, other, ' | |||
|
437 | 437 | |
|
438 | 438 | local = os.path.realpath(local) |
|
439 | 439 | if not opts.get('print'): |
|
440 |
opener = scmutil. |
|
|
440 | opener = scmutil.vfs(os.path.dirname(local)) | |
|
441 | 441 | out = opener(os.path.basename(local), "w", atomictemp=True) |
|
442 | 442 | else: |
|
443 | 443 | out = ui.fout |
@@ -73,7 +73,7 b' def basic(repo):' | |||
|
73 | 73 | # atomic replace file, size doesn't change |
|
74 | 74 | # hopefully st_mtime doesn't change as well so this doesn't use the cache |
|
75 | 75 | # because of inode change |
|
76 |
f = scmutil. |
|
|
76 | f = scmutil.vfs('.')('x', 'w', atomictemp=True) | |
|
77 | 77 | f.write('b') |
|
78 | 78 | f.close() |
|
79 | 79 | |
@@ -97,7 +97,7 b' def basic(repo):' | |||
|
97 | 97 | # should recreate the object |
|
98 | 98 | repo.cached |
|
99 | 99 | |
|
100 |
f = scmutil. |
|
|
100 | f = scmutil.vfs('.')('y', 'w', atomictemp=True) | |
|
101 | 101 | f.write('B') |
|
102 | 102 | f.close() |
|
103 | 103 | |
@@ -105,10 +105,10 b' def basic(repo):' | |||
|
105 | 105 | print("* file y changed inode") |
|
106 | 106 | repo.cached |
|
107 | 107 | |
|
108 |
f = scmutil. |
|
|
108 | f = scmutil.vfs('.')('x', 'w', atomictemp=True) | |
|
109 | 109 | f.write('c') |
|
110 | 110 | f.close() |
|
111 |
f = scmutil. |
|
|
111 | f = scmutil.vfs('.')('y', 'w', atomictemp=True) | |
|
112 | 112 | f.write('C') |
|
113 | 113 | f.close() |
|
114 | 114 |
General Comments 0
You need to be logged in to leave comments.
Login now