Run.clone.weigh: def of ezx@1.11.0.0 Import: import ezx@1.11.0.0/src/lock/run.bend as Run Lines 201-209 of ezx@1.11.0.0/src/lock/run.bend: https://jend.leeeet.dev/read.txt?path=ezx@1.11.0.0/src/lock/run.bend&start_line=201&end_line=209 import Base import snap@1.4.0.0/main.bend as R import ezx@1.11.0.0/src/git/exec.bend as GX import ezx@1.11.0.0/src/pkg/path.bend as P import ezx@1.11.0.0/src/share/say.bend as Say import ezx@1.11.0.0/src/share/spin.bend as Spin import ezx@1.11.0.0/src/lock/world.bend as W # the checkout, weighed and walked def clone.weigh(+work: String, +url: String, +rev: String, +entry: String) -> IO(W.Answer): do IO: _dg : String <- R.exec(["rm", "-rf", work ++ "/.git"]) +s : Say.Spin <- Spin.hold(Say.hashing(rev)) +nar : String <- GX.nar(work) Spin.done(s) +ck : String <- R.exec(["test", "-f", P.join(work, entry)]) clone.entry(R.ok(ck), work, entry, url, rev, nar) Uses (16): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=IO https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=IO.bind https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String.append https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Unit https://jend.leeeet.dev/definition.txt?path=ezx@1.11.0.0/src/git/exec.bend&name=nar https://jend.leeeet.dev/definition.txt?path=ezx@1.11.0.0/src/lock/run.bend&name=clone.entry https://jend.leeeet.dev/definition.txt?path=ezx@1.11.0.0/src/lock/world.bend&name=Answer https://jend.leeeet.dev/definition.txt?path=ezx@1.11.0.0/src/pkg/path.bend&name=join https://jend.leeeet.dev/definition.txt?path=ezx@1.11.0.0/src/share/say.bend&name=Spin https://jend.leeeet.dev/definition.txt?path=ezx@1.11.0.0/src/share/say.bend&name=hashing https://jend.leeeet.dev/definition.txt?path=ezx@1.11.0.0/src/share/spin.bend&name=done https://jend.leeeet.dev/definition.txt?path=ezx@1.11.0.0/src/share/spin.bend&name=hold https://jend.leeeet.dev/definition.txt?path=snap@1.4.0.0/main.bend&name=exec https://jend.leeeet.dev/definition.txt?path=snap@1.4.0.0/main.bend&name=ok