Show More
@@ -2640,6 +2640,31 b' def debugsetparents(ui, repo, rev1, rev2' | |||||
2640 | with repo.wlock(): |
|
2640 | with repo.wlock(): | |
2641 | repo.setparents(node1, node2) |
|
2641 | repo.setparents(node1, node2) | |
2642 |
|
2642 | |||
|
2643 | @command('debugsidedata', cmdutil.debugrevlogopts, _('-c|-m|FILE REV')) | |||
|
2644 | def debugsidedata(ui, repo, file_, rev=None, **opts): | |||
|
2645 | """dump the side data for a cl/manifest/file revision""" | |||
|
2646 | opts = pycompat.byteskwargs(opts) | |||
|
2647 | if opts.get('changelog') or opts.get('manifest') or opts.get('dir'): | |||
|
2648 | if rev is not None: | |||
|
2649 | raise error.CommandError('debugdata', _('invalid arguments')) | |||
|
2650 | file_, rev = None, file_ | |||
|
2651 | elif rev is None: | |||
|
2652 | raise error.CommandError('debugdata', _('invalid arguments')) | |||
|
2653 | r = cmdutil.openstorage(repo, 'debugdata', file_, opts) | |||
|
2654 | r = getattr(r, '_revlog', r) | |||
|
2655 | try: | |||
|
2656 | sidedata = r.sidedata(r.lookup(rev)) | |||
|
2657 | except KeyError: | |||
|
2658 | raise error.Abort(_('invalid revision identifier %s') % rev) | |||
|
2659 | if sidedata: | |||
|
2660 | sidedata = list(sidedata.items()) | |||
|
2661 | sidedata.sort() | |||
|
2662 | ui.write(('%d sidedata entries\n' % len(sidedata))) | |||
|
2663 | for key, value in sidedata: | |||
|
2664 | ui.write((' entry-%04o size %d\n' % (key, len(value)))) | |||
|
2665 | if ui.verbose: | |||
|
2666 | ui.write((' %s\n' % repr(value))) | |||
|
2667 | ||||
2643 | @command('debugssl', [], '[SOURCE]', optionalrepo=True) |
|
2668 | @command('debugssl', [], '[SOURCE]', optionalrepo=True) | |
2644 | def debugssl(ui, repo, source=None, **opts): |
|
2669 | def debugssl(ui, repo, source=None, **opts): | |
2645 | '''test a secure connection to a server |
|
2670 | '''test a secure connection to a server |
@@ -124,6 +124,7 b' Show debug commands if there are no othe' | |||||
124 | debugrevspec |
|
124 | debugrevspec | |
125 | debugserve |
|
125 | debugserve | |
126 | debugsetparents |
|
126 | debugsetparents | |
|
127 | debugsidedata | |||
127 | debugssl |
|
128 | debugssl | |
128 | debugsub |
|
129 | debugsub | |
129 | debugsuccessorssets |
|
130 | debugsuccessorssets | |
@@ -305,6 +306,7 b' Show all commands + options' | |||||
305 | debugrevspec: optimize, show-revs, show-set, show-stage, no-optimized, verify-optimized |
|
306 | debugrevspec: optimize, show-revs, show-set, show-stage, no-optimized, verify-optimized | |
306 | debugserve: sshstdio, logiofd, logiofile |
|
307 | debugserve: sshstdio, logiofd, logiofile | |
307 | debugsetparents: |
|
308 | debugsetparents: | |
|
309 | debugsidedata: changelog, manifest, dir | |||
308 | debugssl: |
|
310 | debugssl: | |
309 | debugsub: rev |
|
311 | debugsub: rev | |
310 | debugsuccessorssets: closest |
|
312 | debugsuccessorssets: closest |
@@ -1048,6 +1048,8 b' Test list of internal help commands' | |||||
1048 | debugserve run a server with advanced settings |
|
1048 | debugserve run a server with advanced settings | |
1049 | debugsetparents |
|
1049 | debugsetparents | |
1050 | manually set the parents of the current working directory |
|
1050 | manually set the parents of the current working directory | |
|
1051 | debugsidedata | |||
|
1052 | dump the side data for a cl/manifest/file revision | |||
1051 | debugssl test a secure connection to a server |
|
1053 | debugssl test a secure connection to a server | |
1052 | debugsub (no help text available) |
|
1054 | debugsub (no help text available) | |
1053 | debugsuccessorssets |
|
1055 | debugsuccessorssets |
@@ -21,6 +21,25 b' Check data can be written/read from side' | |||||
21 | $ echo xxx >> a |
|
21 | $ echo xxx >> a | |
22 | $ hg commit -m aa |
|
22 | $ hg commit -m aa | |
23 |
|
23 | |||
|
24 | $ hg debugsidedata -c 0 | |||
|
25 | 2 sidedata entries | |||
|
26 | entry-0001 size 4 | |||
|
27 | entry-0002 size 32 | |||
|
28 | $ hg debugsidedata -c 1 -v | |||
|
29 | 2 sidedata entries | |||
|
30 | entry-0001 size 4 | |||
|
31 | '\x00\x00\x006' | |||
|
32 | entry-0002 size 32 | |||
|
33 | '\x98\t\xf9\xc4v\xf0\xc5P\x90\xf7wRf\xe8\xe27e\xfc\xc1\x93\xa4\x96\xd0\x1d\x97\xaaG\x1d\xd7t\xfa\xde' | |||
|
34 | $ hg debugsidedata -m 2 | |||
|
35 | 2 sidedata entries | |||
|
36 | entry-0001 size 4 | |||
|
37 | entry-0002 size 32 | |||
|
38 | $ hg debugsidedata a 1 | |||
|
39 | 2 sidedata entries | |||
|
40 | entry-0001 size 4 | |||
|
41 | entry-0002 size 32 | |||
|
42 | ||||
24 | Check upgrade behavior |
|
43 | Check upgrade behavior | |
25 |
===================== |
|
44 | ====================== | |
26 |
|
45 |
General Comments 0
You need to be logged in to leave comments.
Login now