Artifactspublic-v0

curl

master
ply4 git calls309 ms290 KiB2 cachedprotocol v2
363 lines10 KiBRaw
1$! Compare_curl_source.com
2$!
3$! This procedure compares the files in two directories and reports the
4$! differences. It is customized for the vmsports repository layout.
5$!
6$! It needs to be customized to the local site directories.
7$!
8$! This is used by me for these purposes:
9$! 1. Compare the original source of a project with an existing
10$! VMS port.
11$! 2. Compare the checked out repository of a project with the
12$! the local working copy to make sure they are in sync.
13$! 3. Keep a copy directory up to date. The third is needed by
14$! me because VMS Backup can create a saveset of files from a
15$! NFS mounted volume.
16$!
17$! First the files in the original source directory which is assumed to be
18$! under source code control are compared with the copy directory.
19$!
20$! Only files present in the copy directory are listed.
21$!
22$! Diagnostics are displayed about the files:
23$! 1. Files that are not generation 1.
24$! 2. Files missing in the copy directory.
25$! 3. Files in the copy directory not in the source directory.
26$! 4. Files different from the source directory.
27$! 5. Files that VMS DIFF can not process.
28$!
29$! This needs to be run on an ODS-5 volume.
30$!
31$! If UPDATE is given as a second parameter, files missing or different in the
32$! copy directory will be updated.
33$!
34$! By default:
35$! The directory src_root:[project_name] will be translated to something like
36$! DISK:[dir.dir.reference.project_name] and this will be used
37$! to calculate DISK:[dir.dir.vms_source.project_name] for the VMS specific
38$! source directory.
39$!
40$! The copy directory is vms_root:[project_name]
41$! The UPDATE parameter is ignored.
42$!
43$! This setting is used to make sure that the working vms directory
44$! and the repository checkout directory have the same contents.
45$!
46$! If P1 is "SRCBCK" then this
47$! The source directory tree is: src_root:[project_name]
48$! The copy directory is src_root1:[project_name]
49$!
50$! src_root1:[project_name] is used by me to work around that VMS backup will
51$! not use NFS as a source directory so I need to make a copy.
52$!
53$! This is to make sure that the backup save set for the unmodified
54$! source is up to date.
55$!
56$! If your repository checkout is not on an NFS mounted volume, you do not
57$! need to use this option or have the logical name src_root1 defined.
58$!
59$! If P1 is "VMSBCK" then this changes the two directories:
60$! The source directory is vms_root:[project_name]
61$! The copy directory is vms_root1:[project_name]
62$!
63$! vms_root:[project_name] is where I do the VMS specific edits.
64$! vms_root1:[project_name] is used by me to work around that VMS backup will
65$! not use NFS as a source directory so I need to make a copy.
66$!
67$! This is to make sure that the backup save set for the unmodified
68$! source is up to date.
69$!
70$! Copyright (C) John Malmberg
71$!
72$! Permission to use, copy, modify, and/or distribute this software for any
73$! purpose with or without fee is hereby granted, provided that the above
74$! copyright notice and this permission notice appear in all copies.
75$!
76$! THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
77$! WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
78$! MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
79$! ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
80$! WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
81$! ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
82$! OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
83$!
84$! SPDX-License-Identifier: ISC
85$!
86$!==========================================================================
87$!
88$! Update missing/changed files.
89$ update_file = 0
90$ if (p2 .eqs. "UPDATE")
91$ then
92$ update_file = 1
93$ endif
94$!
95$ myproc = f$environment("PROCEDURE")
96$ myprocdir = f$parse(myproc,,,"DIRECTORY") - "[" - "]" - "<" - ">"
97$ myprocdir = f$edit(myprocdir, "LOWERCASE")
98$ mydefault = f$environment("DEFAULT")
99$ mydir = f$parse(mydefault,,,"DIRECTORY")
100$ mydir = f$edit(mydir, "LOWERCASE")
101$ odelim = f$extract(0, 1, mydir)
102$ mydir = mydir - "[" - "]" - "<" - ">"
103$ mydev = f$parse(mydefault,,,"DEVICE")
104$!
105$ ref = ""
106$ if P1 .eqs. ""
107$ then
108$ ref_base_dir = myprocdir
109$ wrk_base_dir = mydir
110$ update_file = 0
111$ resultd = f$parse("src_root:",,,,"NO_CONCEAL")
112$ resultd = f$edit(resultd, "LOWERCASE")
113$ resultd = resultd - "][" - "><" - ".;" - ".."
114$ resultd_len = f$length(resultd) - 1
115$ delim = f$extract(resultd_len, 1, resultd)
116$ ref_root_base = mydir + delim
117$ resultd = resultd - ref_root_base - "reference." + "vms_source."
118$ ref = resultd + ref_base_dir
119$ wrk = "VMS_ROOT:" + odelim + wrk_base_dir
120$ resultd_len = f$length(resultd) - 1
121$ resultd = f$extract(0, resultd_len, resultd) + delim
122$ ref_root_dir = f$parse(resultd,,,"DIRECTORY")
123$ ref_root_dir = f$edit(ref_root_dir, "LOWERCASE")
124$ ref_root_dir = ref_root_dir - "[" - "]"
125$ ref_base_dir = ref_root_dir + "." + ref_base_dir
126$ endif
127$!
128$ if p1 .eqs. "SRCBCK"
129$ then
130$ ref_base_dir = "curl"
131$ wrk_base_dir = "curl"
132$ ref = "src_root:[" + ref_base_dir
133$ wrk = "src_root1:[" + wrk_base_dir
134$ if update_file
135$ then
136$ if f$search("src_root1:[000000]curl.dir") .eqs. ""
137$ then
138$ create/dir/prot=o:rwed src_root1:[curl]
139$ endif
140$ endif
141$ endif
142$!
143$!
144$ if p1 .eqs. "VMSBCK"
145$ then
146$ ref_base_dir = "curl"
147$ wrk_base_dir = "curl"
148$ ref = "vms_root:[" + ref_base_dir
149$ wrk = "vms_root1:[" + wrk_base_dir
150$ if update_file
151$ then
152$ if f$search("vms_root1:[000000]curl.dir") .eqs. ""
153$ then
154$ create/dir/prot=o:rwed vms_root1:[curl]
155$ endif
156$ endif
157$ endif
158$!
159$!
160$ if ref .eqs. ""
161$ then
162$ write sys$output "Unknown compare type specified!"
163$ exit 44
164$ endif
165$!
166$!
167$! Future - check the device types involved for the
168$! the syntax to check.
169$ ODS2_SYNTAX = 0
170$ NFS_MANGLE = 0
171$ PWRK_MANGLE = 0
172$!
173$ vax = f$getsyi("HW_MODEL") .lt. 1024
174$ if vax
175$ then
176$ ODS2_SYNTAX = 1
177$ endif
178$!
179$ report_missing = 1
180$!
181$ if .not. ODS2_SYNTAX
182$ then
183$ set proc/parse=extended
184$ endif
185$!
186$loop:
187$ ref_spec = f$search("''ref'...]*.*;",1)
188$ if ref_spec .eqs. "" then goto loop_end
189$!
190$ ref_dev = f$parse(ref_spec,,,"DEVICE")
191$ ref_dir = f$parse(ref_spec,,,"DIRECTORY")
192$ ref_dir = f$edit(ref_dir, "LOWERCASE")
193$ ref_name = f$parse(ref_spec,,,"NAME")
194$ ref_type = f$parse(ref_spec,,,"TYPE")
195$!
196$!
197$ rel_path = ref_dir - "[" - ref_base_dir
198$! rel_path_len = f$length(rel_path) - 1
199$! delim = f$extract(rel_path_len, 1, rel_path)
200$! rel_path = rel_path - ".]" - ".>" - "]" - ">"
201$! rel_path = rel_path + delim
202$!
203$ if ODS2_SYNTAX
204$ then
205$! if rel_path .eqs. ".examples.scripts^.noah]"
206$! then
207$! rel_path = ".examples.scripts_noah]"
208$! endif
209$! if rel_path .eqs. ".examples.scripts^.v2]"
210$! then
211$! rel_path = ".examples.scripts_v2]"
212$! endif
213$ endif
214$!
215$ wrk_path = wrk + rel_path
216$!
217$ ref_name_type = ref_name + ref_type
218$!
219$ if ODS2_SYNTAX
220$ then
221$ endif
222$!
223$ wrk_spec = wrk_path + ref_name_type
224$!
225$!
226$ wrk_chk = f$search(wrk_spec, 0)
227$ if wrk_chk .eqs. ""
228$ then
229$ if report_missing
230$ then
231$ write sys$output "''wrk_spec' is missing"
232$ endif
233$ if update_file
234$ then
235$ copy/log 'ref_spec' 'wrk_spec'
236$ endif
237$ goto loop
238$ endif
239$!
240$ wrk_name = f$parse(wrk_spec,,,"NAME")
241$ wrk_type = f$parse(wrk_spec,,,"TYPE")
242$ wrk_fname = wrk_name + wrk_type"
243$ ref_fname = ref_name + ref_type
244$!
245$ if ref_fname .nes. wrk_fname
246$ then
247$ write sys$output "''wrk_spc' wrong name, should be ""''ref_fname'"""
248$ endif
249$!
250$ ref_type = f$edit(ref_type, "UPCASE")
251$ if ref_type .eqs. ".DIR" then goto loop
252$!
253$ if ODS2_SYNTAX
254$ then
255$ ref_fname = f$edit(ref_fname, "LOWERCASE")
256$ endif
257$!
258$! These files are in the wrong format for VMS diff, and we do not change them.
259$ ref_skip = 0
260$ if ref_type .eqs. ".PDF" then ref_skip = 1
261$ if ref_type .eqs. ".HTML" then ref_skip = 1
262$ if ref_type .eqs. ".P12" then ref_skip = 1
263$ if ref_type .eqs. "."
264$ then
265$ if f$locate("test", ref_fname) .eq. 0 then ref_skip = 1
266$ if ref_fname .eqs. "configure." then ref_skip = 1
267$ endif
268$!
269$!
270$ if ref_skip .ne. 0
271$ then
272$ if report_missing
273$ then
274$ write sys$output "Skipping diff of ''ref_fname'"
275$ endif
276$ goto loop
277$ endif
278$!
279$!
280$ wrk_ver = f$parse(wrk_chk,,,"VERSION")
281$ if wrk_ver .nes. ";1"
282$ then
283$ write sys$output "Version for ''wrk_spec' is not 1"
284$ endif
285$ set noon
286$ diff/out=nl: 'wrk_spec' 'ref_spec'
287$ if $severity .nes. "1"
288$ then
289$ write sys$output "''wrk_spec' is different from ''ref_spec'"
290$ if update_file
291$ then
292$ delete 'wrk_spec';*
293$ copy/log 'ref_spec' 'wrk_spec'
294$ endif
295$ endif
296$ set on
298$!
299$ goto loop
300$loop_end:
301$!
302$!
303$missing_loop:
304$! For missing loop, check the latest generation.
305$ ref_spec = f$search("''wrk'...]*.*;")
306$ if ref_spec .eqs. "" then goto missing_loop_end
307$!
308$ ref_dev = f$parse(ref_spec,,,"DEVICE")
309$ ref_dir = f$parse(ref_spec,,,"DIRECTORY")
310$ ref_dir = f$edit(ref_dir, "LOWERCASE")
311$ ref_name = f$parse(ref_spec,,,"NAME")
312$ ref_type = f$parse(ref_spec,,,"TYPE")
313$ ref_name_type = ref_name + ref_type
314$!
315$ rel_path = ref_dir - "[" - wrk_base_dir
316$!
317$!
318$ wrk_path = ref + rel_path
319$ wrk_spec = wrk_path + ref_name + ref_type
320$ wrk_name = f$parse(wrk_spec,,,"NAME")
321$ wrk_type = f$parse(wrk_spec,,,"TYPE")
322$!
323$ wrk_fname = wrk_name + wrk_type"
324$ ref_fname = ref_name + ref_type
325$!
326$ wrk_skip = 0
327$ ref_utype = f$edit(ref_type,"UPCASE")
328$ ref_ufname = f$edit(ref_fname,"UPCASE")
329$!
330$ if wrk_skip .eq. 0
331$ then
332$ wrk_chk = f$search(wrk_spec, 0)
333$ if wrk_chk .eqs. ""
334$ then
335$ if report_missing
336$ then
337$ write sys$output "''wrk_spec' is missing"
338$ endif
339$ goto missing_loop
340$ endif
341$ else
342$ goto missing_loop
343$ endif
344$!
345$ if ref_fname .nes. wrk_fname
346$ then
347$ write sys$output "''wrk_spc' wrong name, should be ""''ref_fname'"""
348$ endif
349$!
350$ if ref_utype .eqs. ".DIR" then goto missing_loop
351$!
352$ wrk_ver = f$parse(wrk_chk,,,"VERSION")
353$ if wrk_ver .nes. ";1"
354$ then
355$ write sys$output "Version for ''wrk_spec' is not 1"
356$ endif
357$!
358$ goto missing_loop
359$!
360$!
361$missing_loop_end:
362$!
363$exit
Diagnostics4 git calls · 309 ms
CallStatusSizeTime0309 ms
discover200152 B2 ms
git.upload-pack discover
http.response.status_code=200
git.upstream.cf_ray=-
git.upstream.phase=ls-refs
git.upstream.dur_ms=2
git.response.bytes=152
git.server.agent=gitty/1.0
git.server.object_format=sha1
git.server.caps=agent ls-refs fetch object-format
git.server.fetch=shallow filter sideband-all
git.protocol.version=2
git.pkt.frames=8
git.pkt.data=6
git.pkt.flush=2
git.pkt.delim=0
git.pkt.bytes=152
git.pkt.payload.max=34
ls-refs200149 B · hit2 ms
git.upload-pack ls-refs
http.response.status_code=200
git.upstream.cf_ray=-
git.upstream.phase=ls-refs
git.upstream.dur_ms=2
git.response.bytes=149
git.response.cache=HIT
git.response.duration_ms=2
git.protocol.version=2
git.pkt.frames=3
git.pkt.data=2
git.pkt.flush=1
git.pkt.delim=0
git.pkt.bytes=149
git.pkt.payload.max=78
git.ls_refs.count=2
git.ls_refs.head=refs/heads/master
fetchblob:none · deepen 10200287 KiB · hit3 ms
git.upload-pack fetch
http.response.status_code=200
git.upstream.cf_ray=-
git.upstream.phase=fetch
git.upstream.dur_ms=3
git.response.bytes=293470
git.response.cache=HIT
git.response.duration_ms=3
git.fetch.filter=blob:none
git.fetch.filter.requested=tree:0
git.fetch.filter.fallback=blob:none
git.fetch.filter.learned=false
git.fetch.wants=31c911efe5652725e930f4d2e60c9060e5f6646d
git.fetch.haves.count=0
git.fetch.deepen=10
git.fetch.thin_pack=false
git.fetch.ofs_delta=true
git.protocol.version=2
git.pkt.frames=10
git.pkt.data=8
git.pkt.flush=1
git.pkt.delim=1
git.pkt.bytes=293470
git.pkt.payload.max=65516
git.sideband.band1.bytes=293354
git.sideband.band2.bytes=0
git.sideband.band3.bytes=0
git.pack.objects=87
git.pack.bytes=293354
git.pack.ofs_delta=0
git.pack.ref_delta=1
git.pack.chain.max=1
git.pack.trailer=6a646bcda6740bab42e321b51998b52ea15146c0
git.pack.full=86
Open pack map
fetch2003.1 KiB304 ms
git.upload-pack fetch
http.response.status_code=200
git.upstream.cf_ray=-
git.upstream.phase=fetch
git.upstream.dur_ms=304
git.response.bytes=3124
git.response.cache=MISS
git.response.duration_ms=304
git.fetch.wants=b63080620ec7f4188f31956281ed905d821efb06
git.fetch.haves.count=0
git.fetch.deepen=0
git.fetch.thin_pack=false
git.fetch.ofs_delta=true
git.protocol.version=2
git.pkt.frames=3
git.pkt.data=2
git.pkt.flush=1
git.pkt.delim=0
git.pkt.bytes=3124
git.pkt.payload.max=3103
git.sideband.band1.bytes=3102
git.sideband.band2.bytes=0
git.sideband.band3.bytes=0

Each row is one HTTP round trip ply made to the git server for this page, on one timeline. discover asks what the server speaks, ls-refs lists branch tips, fetch brings objects by id. A hit was served by Workers Cache. Tap a row for its wire details.

Remote
https://5ad2236b39de4c8bd8f6270ea63f3ea9.artifacts.cloudflare.net/git/public-v0/curl.git
Ref
refs/heads/master
Commit
31c911efe5652725e930f4d2e60c9060e5f6646d
cf-ray
a5e2cba4091c7929
Request
8de95698…
Protocol
v2 · sha1
Agent
gitty/1.0
Filter
advertised
Fetch
shallow filter sideband-all
Capabilities
agent ls-refs fetch object-format