##// END OF EJS Templates
merge with stable
Martin von Zweigbergk -
r44314:5606e1cb merge default
parent child Browse files
Show More
@@ -229,7 +229,7 b" configitem(b'repack', b'chainorphansbysi"
229 configitem(b'packs', b'maxpacksize', default=0)
229 configitem(b'packs', b'maxpacksize', default=0)
230 configitem(b'packs', b'maxchainlen', default=1000)
230 configitem(b'packs', b'maxchainlen', default=1000)
231
231
232 configitem(b'devel', b'remotefilelog.ensurestart', default=False)
232 configitem(b'devel', b'remotefilelog.bg-wait', default=False)
233
233
234 # default TTL limit is 30 days
234 # default TTL limit is 30 days
235 _defaultlimit = 60 * 60 * 24 * 30
235 _defaultlimit = 60 * 60 * 24 * 30
@@ -1080,26 +1080,19 b' def pull(orig, ui, repo, *pats, **opts):'
1080 prefetchrevset = ui.config(b'remotefilelog', b'pullprefetch')
1080 prefetchrevset = ui.config(b'remotefilelog', b'pullprefetch')
1081 bgrepack = repo.ui.configbool(b'remotefilelog', b'backgroundrepack')
1081 bgrepack = repo.ui.configbool(b'remotefilelog', b'backgroundrepack')
1082 bgprefetch = repo.ui.configbool(b'remotefilelog', b'backgroundprefetch')
1082 bgprefetch = repo.ui.configbool(b'remotefilelog', b'backgroundprefetch')
1083 ensurestart = repo.ui.configbool(b'devel', b'remotefilelog.ensurestart')
1084
1083
1085 if prefetchrevset:
1084 if prefetchrevset:
1086 ui.status(_(b"prefetching file contents\n"))
1085 ui.status(_(b"prefetching file contents\n"))
1087 revs = scmutil.revrange(repo, [prefetchrevset])
1086 revs = scmutil.revrange(repo, [prefetchrevset])
1088 base = repo[b'.'].rev()
1087 base = repo[b'.'].rev()
1089 if bgprefetch:
1088 if bgprefetch:
1090 repo.backgroundprefetch(
1089 repo.backgroundprefetch(prefetchrevset, repack=bgrepack)
1091 prefetchrevset, repack=bgrepack, ensurestart=ensurestart
1092 )
1093 else:
1090 else:
1094 repo.prefetch(revs, base=base)
1091 repo.prefetch(revs, base=base)
1095 if bgrepack:
1092 if bgrepack:
1096 repackmod.backgroundrepack(
1093 repackmod.backgroundrepack(repo, incremental=True)
1097 repo, incremental=True, ensurestart=ensurestart
1098 )
1099 elif bgrepack:
1094 elif bgrepack:
1100 repackmod.backgroundrepack(
1095 repackmod.backgroundrepack(repo, incremental=True)
1101 repo, incremental=True, ensurestart=ensurestart
1102 )
1103
1096
1104 return result
1097 return result
1105
1098
@@ -1250,13 +1243,9 b' def prefetch(ui, repo, *pats, **opts):'
1250 revs = scmutil.revrange(repo, opts.get(b'rev'))
1243 revs = scmutil.revrange(repo, opts.get(b'rev'))
1251 repo.prefetch(revs, opts.get(b'base'), pats, opts)
1244 repo.prefetch(revs, opts.get(b'base'), pats, opts)
1252
1245
1253 ensurestart = repo.ui.configbool(b'devel', b'remotefilelog.ensurestart')
1254
1255 # Run repack in background
1246 # Run repack in background
1256 if opts.get(b'repack'):
1247 if opts.get(b'repack'):
1257 repackmod.backgroundrepack(
1248 repackmod.backgroundrepack(repo, incremental=True)
1258 repo, incremental=True, ensurestart=ensurestart
1259 )
1260
1249
1261
1250
1262 @command(
1251 @command(
@@ -1276,12 +1265,10 b' def prefetch(ui, repo, *pats, **opts):'
1276 )
1265 )
1277 def repack_(ui, repo, *pats, **opts):
1266 def repack_(ui, repo, *pats, **opts):
1278 if opts.get('background'):
1267 if opts.get('background'):
1279 ensurestart = repo.ui.configbool(b'devel', b'remotefilelog.ensurestart')
1280 repackmod.backgroundrepack(
1268 repackmod.backgroundrepack(
1281 repo,
1269 repo,
1282 incremental=opts.get('incremental'),
1270 incremental=opts.get('incremental'),
1283 packsonly=opts.get('packsonly', False),
1271 packsonly=opts.get('packsonly', False),
1284 ensurestart=ensurestart,
1285 )
1272 )
1286 return
1273 return
1287
1274
@@ -36,9 +36,7 b' class RepackAlreadyRunning(error.Abort):'
36 pass
36 pass
37
37
38
38
39 def backgroundrepack(
39 def backgroundrepack(repo, incremental=True, packsonly=False):
40 repo, incremental=True, packsonly=False, ensurestart=False
41 ):
42 cmd = [procutil.hgexecutable(), b'-R', repo.origroot, b'repack']
40 cmd = [procutil.hgexecutable(), b'-R', repo.origroot, b'repack']
43 msg = _(b"(running background repack)\n")
41 msg = _(b"(running background repack)\n")
44 if incremental:
42 if incremental:
@@ -48,7 +46,11 b' def backgroundrepack('
48 cmd.append(b'--packsonly')
46 cmd.append(b'--packsonly')
49 repo.ui.warn(msg)
47 repo.ui.warn(msg)
50 # We know this command will find a binary, so don't block on it starting.
48 # We know this command will find a binary, so don't block on it starting.
51 procutil.runbgcommand(cmd, encoding.environ, ensurestart=ensurestart)
49 kwargs = {}
50 if repo.ui.configbool(b'devel', b'remotefilelog.bg-wait'):
51 kwargs['record_wait'] = repo.ui.atexit
52
53 procutil.runbgcommand(cmd, encoding.environ, ensurestart=False, **kwargs)
52
54
53
55
54 def fullrepack(repo, options=None):
56 def fullrepack(repo, options=None):
@@ -215,13 +215,7 b' def wraprepo(repo):'
215 )
215 )
216
216
217 def backgroundprefetch(
217 def backgroundprefetch(
218 self,
218 self, revs, base=None, repack=False, pats=None, opts=None
219 revs,
220 base=None,
221 repack=False,
222 pats=None,
223 opts=None,
224 ensurestart=False,
225 ):
219 ):
226 """Runs prefetch in background with optional repack
220 """Runs prefetch in background with optional repack
227 """
221 """
@@ -232,8 +226,12 b' def wraprepo(repo):'
232 cmd += [b'-r', revs]
226 cmd += [b'-r', revs]
233 # We know this command will find a binary, so don't block
227 # We know this command will find a binary, so don't block
234 # on it starting.
228 # on it starting.
229 kwargs = {}
230 if repo.ui.configbool(b'devel', b'remotefilelog.bg-wait'):
231 kwargs['record_wait'] = repo.ui.atexit
232
235 procutil.runbgcommand(
233 procutil.runbgcommand(
236 cmd, encoding.environ, ensurestart=ensurestart
234 cmd, encoding.environ, ensurestart=False, **kwargs
237 )
235 )
238
236
239 def prefetch(self, revs, base=None, pats=None, opts=None):
237 def prefetch(self, revs, base=None, pats=None, opts=None):
@@ -540,12 +540,18 b' if pycompat.iswindows:'
540 )
540 )
541
541
542 def runbgcommand(
542 def runbgcommand(
543 script, env, shell=False, stdout=None, stderr=None, ensurestart=True
543 script,
544 env,
545 shell=False,
546 stdout=None,
547 stderr=None,
548 ensurestart=True,
549 record_wait=None,
544 ):
550 ):
545 '''Spawn a command without waiting for it to finish.'''
551 '''Spawn a command without waiting for it to finish.'''
546 # we can't use close_fds *and* redirect stdin. I'm not sure that we
552 # we can't use close_fds *and* redirect stdin. I'm not sure that we
547 # need to because the detached process has no console connection.
553 # need to because the detached process has no console connection.
548 subprocess.Popen(
554 p = subprocess.Popen(
549 tonativestr(script),
555 tonativestr(script),
550 shell=shell,
556 shell=shell,
551 env=tonativeenv(env),
557 env=tonativeenv(env),
@@ -554,46 +560,64 b' if pycompat.iswindows:'
554 stdout=stdout,
560 stdout=stdout,
555 stderr=stderr,
561 stderr=stderr,
556 )
562 )
563 if record_wait is not None:
564 record_wait(p.wait)
557
565
558
566
559 else:
567 else:
560
568
561 def runbgcommand(
569 def runbgcommand(
562 cmd, env, shell=False, stdout=None, stderr=None, ensurestart=True
570 cmd,
571 env,
572 shell=False,
573 stdout=None,
574 stderr=None,
575 ensurestart=True,
576 record_wait=None,
563 ):
577 ):
564 '''Spawn a command without waiting for it to finish.'''
578 '''Spawn a command without waiting for it to finish.
579
580
581 When `record_wait` is not None, the spawned process will not be fully
582 detached and the `record_wait` argument will be called with a the
583 `Subprocess.wait` function for the spawned process. This is mostly
584 useful for developers that need to make sure the spawned process
585 finished before a certain point. (eg: writing test)'''
565 # double-fork to completely detach from the parent process
586 # double-fork to completely detach from the parent process
566 # based on http://code.activestate.com/recipes/278731
587 # based on http://code.activestate.com/recipes/278731
567 pid = os.fork()
588 if record_wait is None:
568 if pid:
589 pid = os.fork()
569 if not ensurestart:
590 if pid:
591 if not ensurestart:
592 return
593 # Parent process
594 (_pid, status) = os.waitpid(pid, 0)
595 if os.WIFEXITED(status):
596 returncode = os.WEXITSTATUS(status)
597 else:
598 returncode = -(os.WTERMSIG(status))
599 if returncode != 0:
600 # The child process's return code is 0 on success, an errno
601 # value on failure, or 255 if we don't have a valid errno
602 # value.
603 #
604 # (It would be slightly nicer to return the full exception info
605 # over a pipe as the subprocess module does. For now it
606 # doesn't seem worth adding that complexity here, though.)
607 if returncode == 255:
608 returncode = errno.EINVAL
609 raise OSError(
610 returncode,
611 b'error running %r: %s'
612 % (cmd, os.strerror(returncode)),
613 )
570 return
614 return
571 # Parent process
572 (_pid, status) = os.waitpid(pid, 0)
573 if os.WIFEXITED(status):
574 returncode = os.WEXITSTATUS(status)
575 else:
576 returncode = -(os.WTERMSIG(status))
577 if returncode != 0:
578 # The child process's return code is 0 on success, an errno
579 # value on failure, or 255 if we don't have a valid errno
580 # value.
581 #
582 # (It would be slightly nicer to return the full exception info
583 # over a pipe as the subprocess module does. For now it
584 # doesn't seem worth adding that complexity here, though.)
585 if returncode == 255:
586 returncode = errno.EINVAL
587 raise OSError(
588 returncode,
589 b'error running %r: %s' % (cmd, os.strerror(returncode)),
590 )
591 return
592
615
593 returncode = 255
616 returncode = 255
594 try:
617 try:
595 # Start a new session
618 if record_wait is None:
596 os.setsid()
619 # Start a new session
620 os.setsid()
597
621
598 stdin = open(os.devnull, b'r')
622 stdin = open(os.devnull, b'r')
599 if stdout is None:
623 if stdout is None:
@@ -603,7 +627,7 b' else:'
603
627
604 # connect stdin to devnull to make sure the subprocess can't
628 # connect stdin to devnull to make sure the subprocess can't
605 # muck up that stream for mercurial.
629 # muck up that stream for mercurial.
606 subprocess.Popen(
630 p = subprocess.Popen(
607 cmd,
631 cmd,
608 shell=shell,
632 shell=shell,
609 env=env,
633 env=env,
@@ -612,6 +636,8 b' else:'
612 stdout=stdout,
636 stdout=stdout,
613 stderr=stderr,
637 stderr=stderr,
614 )
638 )
639 if record_wait is not None:
640 record_wait(p.wait)
615 returncode = 0
641 returncode = 0
616 except EnvironmentError as ex:
642 except EnvironmentError as ex:
617 returncode = ex.errno & 0xFF
643 returncode = ex.errno & 0xFF
@@ -624,4 +650,5 b' else:'
624 finally:
650 finally:
625 # mission accomplished, this child needs to exit and not
651 # mission accomplished, this child needs to exit and not
626 # continue the hg process here.
652 # continue the hg process here.
627 os._exit(returncode)
653 if record_wait is None:
654 os._exit(returncode)
@@ -1,11 +1,9 b''
1 #require no-windows
1 #require no-windows
2
2
3 $ . "$TESTDIR/remotefilelog-library.sh"
3 $ . "$TESTDIR/remotefilelog-library.sh"
4 # devel.remotefilelog.ensurestart: reduce race condition with
5 # waiton{repack/prefetch}
6 $ cat >> $HGRCPATH <<EOF
4 $ cat >> $HGRCPATH <<EOF
7 > [devel]
5 > [devel]
8 > remotefilelog.ensurestart=True
6 > remotefilelog.bg-wait=True
9 > EOF
7 > EOF
10
8
11 $ hg init master
9 $ hg init master
@@ -78,8 +76,6 b''
78 new changesets 6b4b6f66ef8c
76 new changesets 6b4b6f66ef8c
79 (run 'hg update' to get a working copy)
77 (run 'hg update' to get a working copy)
80 prefetching file contents
78 prefetching file contents
81 $ sleep 0.5
82 $ hg debugwaitonprefetch >/dev/null 2>%1
83 $ find $CACHEDIR -type f | sort
79 $ find $CACHEDIR -type f | sort
84 $TESTTMP/hgcache/master/11/f6ad8ec52a2984abaafd7c3b516503785c2072/ef95c5376f34698742fe34f315fd82136f8f68c0
80 $TESTTMP/hgcache/master/11/f6ad8ec52a2984abaafd7c3b516503785c2072/ef95c5376f34698742fe34f315fd82136f8f68c0
85 $TESTTMP/hgcache/master/95/cb0bfd2977c761298d9624e4b4d4c72a39974a/076f5e2225b3ff0400b98c92aa6cdf403ee24cca
81 $TESTTMP/hgcache/master/95/cb0bfd2977c761298d9624e4b4d4c72a39974a/076f5e2225b3ff0400b98c92aa6cdf403ee24cca
@@ -107,11 +103,6 b''
107 new changesets 6b4b6f66ef8c
103 new changesets 6b4b6f66ef8c
108 (run 'hg update' to get a working copy)
104 (run 'hg update' to get a working copy)
109 prefetching file contents
105 prefetching file contents
110 $ sleep 0.5
111 $ hg debugwaitonprefetch >/dev/null 2>%1
112 $ sleep 0.5
113 $ hg debugwaitonrepack >/dev/null 2>%1
114 $ sleep 0.5
115 $ find $CACHEDIR -type f | sort
106 $ find $CACHEDIR -type f | sort
116 $TESTTMP/hgcache/master/packs/6e8633deba6e544e5f8edbd7b996d6e31a2c42ae.histidx
107 $TESTTMP/hgcache/master/packs/6e8633deba6e544e5f8edbd7b996d6e31a2c42ae.histidx
117 $TESTTMP/hgcache/master/packs/6e8633deba6e544e5f8edbd7b996d6e31a2c42ae.histpack
108 $TESTTMP/hgcache/master/packs/6e8633deba6e544e5f8edbd7b996d6e31a2c42ae.histpack
@@ -143,11 +134,6 b''
143 $ hg up -r 0
134 $ hg up -r 0
144 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
135 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
145 * files fetched over * fetches - (* misses, 0.00% hit ratio) over *s (glob)
136 * files fetched over * fetches - (* misses, 0.00% hit ratio) over *s (glob)
146 $ sleep 1
147 $ hg debugwaitonprefetch >/dev/null 2>%1
148 $ sleep 1
149 $ hg debugwaitonrepack >/dev/null 2>%1
150 $ sleep 1
151 $ find $CACHEDIR -type f | sort
137 $ find $CACHEDIR -type f | sort
152 $TESTTMP/hgcache/master/packs/8f1443d44e57fec96f72fb2412e01d2818767ef2.histidx
138 $TESTTMP/hgcache/master/packs/8f1443d44e57fec96f72fb2412e01d2818767ef2.histidx
153 $TESTTMP/hgcache/master/packs/8f1443d44e57fec96f72fb2412e01d2818767ef2.histpack
139 $TESTTMP/hgcache/master/packs/8f1443d44e57fec96f72fb2412e01d2818767ef2.histpack
@@ -195,11 +181,6 b''
195 $ hg commit -qAm b
181 $ hg commit -qAm b
196 * files fetched over 1 fetches - (* misses, 0.00% hit ratio) over *s (glob)
182 * files fetched over 1 fetches - (* misses, 0.00% hit ratio) over *s (glob)
197 $ hg bookmark temporary
183 $ hg bookmark temporary
198 $ sleep 1
199 $ hg debugwaitonprefetch >/dev/null 2>%1
200 $ sleep 1
201 $ hg debugwaitonrepack >/dev/null 2>%1
202 $ sleep 1
203 $ find $CACHEDIR -type f | sort
184 $ find $CACHEDIR -type f | sort
204 $TESTTMP/hgcache/master/packs/8f1443d44e57fec96f72fb2412e01d2818767ef2.histidx
185 $TESTTMP/hgcache/master/packs/8f1443d44e57fec96f72fb2412e01d2818767ef2.histidx
205 $TESTTMP/hgcache/master/packs/8f1443d44e57fec96f72fb2412e01d2818767ef2.histpack
186 $TESTTMP/hgcache/master/packs/8f1443d44e57fec96f72fb2412e01d2818767ef2.histpack
@@ -237,19 +218,14 b''
237 # background prefetch with repack on rebase when wcprevset configured
218 # background prefetch with repack on rebase when wcprevset configured
238
219
239 $ hg up -r 2
220 $ hg up -r 2
240 3 files updated, 0 files merged, 3 files removed, 0 files unresolved
221 3 files updated, 0 files merged, 2 files removed, 0 files unresolved
241 (leaving bookmark temporary)
222 (leaving bookmark temporary)
242 $ clearcache
223 $ clearcache
243 $ find $CACHEDIR -type f | sort
224 $ find $CACHEDIR -type f | sort
244 $ hg rebase -s temporary -d foo
225 $ hg rebase -s temporary -d foo
245 rebasing 3:58147a5b5242 "b" (temporary tip)
226 rebasing 3:d9cf06e3b5b6 "b" (temporary tip)
246 saved backup bundle to $TESTTMP/shallow/.hg/strip-backup/58147a5b5242-c3678817-rebase.hg
227 saved backup bundle to $TESTTMP/shallow/.hg/strip-backup/d9cf06e3b5b6-e5c3dc63-rebase.hg
247 3 files fetched over 1 fetches - (3 misses, 0.00% hit ratio) over *s (glob)
228 3 files fetched over 1 fetches - (3 misses, 0.00% hit ratio) over *s (glob)
248 $ sleep 1
249 $ hg debugwaitonprefetch >/dev/null 2>%1
250 $ sleep 1
251 $ hg debugwaitonrepack >/dev/null 2>%1
252 $ sleep 1
253
229
254 # Ensure that file 'y' was prefetched - it was not part of the rebase operation and therefore
230 # Ensure that file 'y' was prefetched - it was not part of the rebase operation and therefore
255 # could only be downloaded by the background prefetch
231 # could only be downloaded by the background prefetch
@@ -281,7 +257,7 b''
281 # Check that foregound prefetch with no arguments blocks until background prefetches finish
257 # Check that foregound prefetch with no arguments blocks until background prefetches finish
282
258
283 $ hg up -r 3
259 $ hg up -r 3
284 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
260 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
285 $ clearcache
261 $ clearcache
286 $ hg prefetch --repack
262 $ hg prefetch --repack
287 waiting for lock on prefetching in $TESTTMP/shallow held by process * on host * (glob) (?)
263 waiting for lock on prefetching in $TESTTMP/shallow held by process * on host * (glob) (?)
@@ -289,10 +265,6 b''
289 (running background incremental repack)
265 (running background incremental repack)
290 * files fetched over 1 fetches - (* misses, 0.00% hit ratio) over *s (glob) (?)
266 * files fetched over 1 fetches - (* misses, 0.00% hit ratio) over *s (glob) (?)
291
267
292 $ sleep 0.5
293 $ hg debugwaitonrepack >/dev/null 2>%1
294 $ sleep 0.5
295
296 $ find $CACHEDIR -type f | sort
268 $ find $CACHEDIR -type f | sort
297 $TESTTMP/hgcache/master/packs/8f1443d44e57fec96f72fb2412e01d2818767ef2.histidx
269 $TESTTMP/hgcache/master/packs/8f1443d44e57fec96f72fb2412e01d2818767ef2.histidx
298 $TESTTMP/hgcache/master/packs/8f1443d44e57fec96f72fb2412e01d2818767ef2.histpack
270 $TESTTMP/hgcache/master/packs/8f1443d44e57fec96f72fb2412e01d2818767ef2.histpack
@@ -333,9 +305,6 b''
333 got lock after * seconds (glob) (?)
305 got lock after * seconds (glob) (?)
334 (running background incremental repack)
306 (running background incremental repack)
335 * files fetched over 1 fetches - (* misses, 0.00% hit ratio) over *s (glob) (?)
307 * files fetched over 1 fetches - (* misses, 0.00% hit ratio) over *s (glob) (?)
336 $ sleep 0.5
337 $ hg debugwaitonrepack >/dev/null 2>%1
338 $ sleep 0.5
339
308
340 $ find $CACHEDIR -type f | sort
309 $ find $CACHEDIR -type f | sort
341 $TESTTMP/hgcache/master/packs/8f1443d44e57fec96f72fb2412e01d2818767ef2.histidx
310 $TESTTMP/hgcache/master/packs/8f1443d44e57fec96f72fb2412e01d2818767ef2.histidx
@@ -40,8 +40,6 b''
40 $ hg prefetch
40 $ hg prefetch
41 2 files fetched over 1 fetches - (2 misses, 0.00% hit ratio) over *s (glob)
41 2 files fetched over 1 fetches - (2 misses, 0.00% hit ratio) over *s (glob)
42 $ hg repack
42 $ hg repack
43 $ sleep 0.5
44 $ hg debugwaitonrepack >/dev/null 2>%1
45
43
46 $ find $CACHEDIR | sort | egrep ".datapack|.histpack"
44 $ find $CACHEDIR | sort | egrep ".datapack|.histpack"
47 $TESTTMP/hgcache/master/packs/7bcd2d90b99395ca43172a0dd24e18860b2902f9.histpack
45 $TESTTMP/hgcache/master/packs/7bcd2d90b99395ca43172a0dd24e18860b2902f9.histpack
@@ -73,8 +71,6 b''
73 > EOF
71 > EOF
74
72
75 $ hg repack
73 $ hg repack
76 $ sleep 0.5
77 $ hg debugwaitonrepack >/dev/null 2>%1
78
74
79 $ find $CACHEDIR | sort | egrep ".datapack|.histpack"
75 $ find $CACHEDIR | sort | egrep ".datapack|.histpack"
80 $TESTTMP/hgcache/master/packs/7bcd2d90b99395ca43172a0dd24e18860b2902f9.histpack
76 $TESTTMP/hgcache/master/packs/7bcd2d90b99395ca43172a0dd24e18860b2902f9.histpack
@@ -101,8 +97,6 b''
101 $ hg prefetch
97 $ hg prefetch
102 2 files fetched over 1 fetches - (2 misses, 0.00% hit ratio) over *s (glob)
98 2 files fetched over 1 fetches - (2 misses, 0.00% hit ratio) over *s (glob)
103 $ hg repack
99 $ hg repack
104 $ sleep 0.5
105 $ hg debugwaitonrepack >/dev/null 2>%1
106
100
107 $ find $CACHEDIR | sort | egrep ".datapack|.histpack"
101 $ find $CACHEDIR | sort | egrep ".datapack|.histpack"
108 $TESTTMP/hgcache/master/packs/7bcd2d90b99395ca43172a0dd24e18860b2902f9.histpack
102 $TESTTMP/hgcache/master/packs/7bcd2d90b99395ca43172a0dd24e18860b2902f9.histpack
@@ -135,8 +129,6 b''
135 > EOF
129 > EOF
136
130
137 $ hg repack
131 $ hg repack
138 $ sleep 0.5
139 $ hg debugwaitonrepack >/dev/null 2>%1
140
132
141 $ find $CACHEDIR | sort | egrep ".datapack|.histpack"
133 $ find $CACHEDIR | sort | egrep ".datapack|.histpack"
142 $TESTTMP/hgcache/master/packs/7bcd2d90b99395ca43172a0dd24e18860b2902f9.histpack
134 $TESTTMP/hgcache/master/packs/7bcd2d90b99395ca43172a0dd24e18860b2902f9.histpack
@@ -1,13 +1,12 b''
1 #require no-windows
1 #require no-windows
2
2
3 $ . "$TESTDIR/remotefilelog-library.sh"
3 $ . "$TESTDIR/remotefilelog-library.sh"
4 # devel.remotefilelog.ensurestart: reduce race condition with
4
5 # waiton{repack/prefetch}
6 $ cat >> $HGRCPATH <<EOF
5 $ cat >> $HGRCPATH <<EOF
7 > [remotefilelog]
6 > [remotefilelog]
8 > fastdatapack=True
7 > fastdatapack=True
9 > [devel]
8 > [devel]
10 > remotefilelog.ensurestart=True
9 > remotefilelog.bg-wait=True
11 > EOF
10 > EOF
12
11
13 $ hg init master
12 $ hg init master
@@ -142,8 +141,6 b''
142
141
143 $ hg repack --background
142 $ hg repack --background
144 (running background repack)
143 (running background repack)
145 $ sleep 0.5
146 $ hg debugwaitonrepack >/dev/null 2>&1
147 $ find $CACHEDIR -type f | sort
144 $ find $CACHEDIR -type f | sort
148 $TESTTMP/hgcache/master/packs/39443fa1064182e93d968b5cba292eb5283260d0.dataidx
145 $TESTTMP/hgcache/master/packs/39443fa1064182e93d968b5cba292eb5283260d0.dataidx
149 $TESTTMP/hgcache/master/packs/39443fa1064182e93d968b5cba292eb5283260d0.datapack
146 $TESTTMP/hgcache/master/packs/39443fa1064182e93d968b5cba292eb5283260d0.datapack
@@ -342,8 +339,6 b' Pull should run background repack'
342 searching for changes
339 searching for changes
343 no changes found
340 no changes found
344 (running background incremental repack)
341 (running background incremental repack)
345 $ sleep 0.5
346 $ hg debugwaitonrepack >/dev/null 2>&1
347 $ ls_l $TESTTMP/hgcache/master/packs/ | grep datapack
342 $ ls_l $TESTTMP/hgcache/master/packs/ | grep datapack
348 -r--r--r-- 303 156a6c1c83aeb69422d7936e0a46ba9bc06a71c0.datapack
343 -r--r--r-- 303 156a6c1c83aeb69422d7936e0a46ba9bc06a71c0.datapack
349 $ ls_l $TESTTMP/hgcache/master/packs/ | grep histpack
344 $ ls_l $TESTTMP/hgcache/master/packs/ | grep histpack
@@ -1,11 +1,9 b''
1 #require no-windows
1 #require no-windows
2
2
3 $ . "$TESTDIR/remotefilelog-library.sh"
3 $ . "$TESTDIR/remotefilelog-library.sh"
4 # devel.remotefilelog.ensurestart: reduce race condition with
5 # waiton{repack/prefetch}
6 $ cat >> $HGRCPATH <<EOF
4 $ cat >> $HGRCPATH <<EOF
7 > [devel]
5 > [devel]
8 > remotefilelog.ensurestart=True
6 > remotefilelog.bg-wait=True
9 > EOF
7 > EOF
10
8
11 $ hg init master
9 $ hg init master
@@ -152,8 +150,6 b''
152
150
153 $ hg repack --background
151 $ hg repack --background
154 (running background repack)
152 (running background repack)
155 $ sleep 0.5
156 $ hg debugwaitonrepack >/dev/null 2>&1
157 $ find $CACHEDIR -type f | sort
153 $ find $CACHEDIR -type f | sort
158 $TESTTMP/hgcache/master/packs/39443fa1064182e93d968b5cba292eb5283260d0.dataidx
154 $TESTTMP/hgcache/master/packs/39443fa1064182e93d968b5cba292eb5283260d0.dataidx
159 $TESTTMP/hgcache/master/packs/39443fa1064182e93d968b5cba292eb5283260d0.datapack
155 $TESTTMP/hgcache/master/packs/39443fa1064182e93d968b5cba292eb5283260d0.datapack
@@ -371,8 +367,6 b' Pull should run background repack'
371 searching for changes
367 searching for changes
372 no changes found
368 no changes found
373 (running background incremental repack)
369 (running background incremental repack)
374 $ sleep 0.5
375 $ hg debugwaitonrepack >/dev/null 2>&1
376 $ ls_l $TESTTMP/hgcache/master/packs/ | grep datapack
370 $ ls_l $TESTTMP/hgcache/master/packs/ | grep datapack
377 -r--r--r-- 303 156a6c1c83aeb69422d7936e0a46ba9bc06a71c0.datapack
371 -r--r--r-- 303 156a6c1c83aeb69422d7936e0a46ba9bc06a71c0.datapack
378 $ ls_l $TESTTMP/hgcache/master/packs/ | grep histpack
372 $ ls_l $TESTTMP/hgcache/master/packs/ | grep histpack
General Comments 0
You need to be logged in to leave comments. Login now