equal
deleted
inserted
replaced
26 repack, |
26 repack, |
27 shallowutil, |
27 shallowutil, |
28 ) |
28 ) |
29 |
29 |
30 def debugremotefilelog(ui, path, **opts): |
30 def debugremotefilelog(ui, path, **opts): |
31 decompress = opts.get('decompress') |
31 decompress = opts.get(r'decompress') |
32 |
32 |
33 size, firstnode, mapping = parsefileblob(path, decompress) |
33 size, firstnode, mapping = parsefileblob(path, decompress) |
34 |
34 |
35 ui.status(_("size: %s bytes\n") % (size)) |
35 ui.status(_("size: %s bytes\n") % (size)) |
36 ui.status(_("path: %s \n") % (path)) |
36 ui.status(_("path: %s \n") % (path)) |
87 |
87 |
88 return r |
88 return r |
89 |
89 |
90 def debugindex(orig, ui, repo, file_=None, **opts): |
90 def debugindex(orig, ui, repo, file_=None, **opts): |
91 """dump the contents of an index file""" |
91 """dump the contents of an index file""" |
92 if (opts.get('changelog') or |
92 if (opts.get(r'changelog') or |
93 opts.get('manifest') or |
93 opts.get(r'manifest') or |
94 opts.get('dir') or |
94 opts.get(r'dir') or |
95 not shallowutil.isenabled(repo) or |
95 not shallowutil.isenabled(repo) or |
96 not repo.shallowmatch(file_)): |
96 not repo.shallowmatch(file_)): |
97 return orig(ui, repo, file_, **opts) |
97 return orig(ui, repo, file_, **opts) |
98 |
98 |
99 r = buildtemprevlog(repo, file_) |
99 r = buildtemprevlog(repo, file_) |
152 if pp[1] != nullid: |
152 if pp[1] != nullid: |
153 ui.write("\t%d -> %d\n" % (r.rev(pp[1]), i)) |
153 ui.write("\t%d -> %d\n" % (r.rev(pp[1]), i)) |
154 ui.write("}\n") |
154 ui.write("}\n") |
155 |
155 |
156 def verifyremotefilelog(ui, path, **opts): |
156 def verifyremotefilelog(ui, path, **opts): |
157 decompress = opts.get('decompress') |
157 decompress = opts.get(r'decompress') |
158 |
158 |
159 for root, dirs, files in os.walk(path): |
159 for root, dirs, files in os.walk(path): |
160 for file in files: |
160 for file in files: |
161 if file == "repos": |
161 if file == "repos": |
162 continue |
162 continue |
211 for path in paths: |
211 for path in paths: |
212 if '.data' in path: |
212 if '.data' in path: |
213 path = path[:path.index('.data')] |
213 path = path[:path.index('.data')] |
214 ui.write("%s:\n" % path) |
214 ui.write("%s:\n" % path) |
215 dpack = datapack.datapack(path) |
215 dpack = datapack.datapack(path) |
216 node = opts.get('node') |
216 node = opts.get(r'node') |
217 if node: |
217 if node: |
218 deltachain = dpack.getdeltachain('', bin(node)) |
218 deltachain = dpack.getdeltachain('', bin(node)) |
219 dumpdeltachain(ui, deltachain, **opts) |
219 dumpdeltachain(ui, deltachain, **opts) |
220 return |
220 return |
221 |
221 |
222 if opts.get('long'): |
222 if opts.get(r'long'): |
223 hashformatter = hex |
223 hashformatter = hex |
224 hashlen = 42 |
224 hashlen = 42 |
225 else: |
225 else: |
226 hashformatter = short |
226 hashformatter = short |
227 hashlen = 14 |
227 hashlen = 14 |