Sat Mar 15 2025
tucker.mcknight@gmail.com
A command for cloning the repo is shown on the main repo page, and a command for pulling a specific patch is shown on each patch's page.
54e819394adf99affda3cbf535f16ee26450a7d1
.clone {
border: 1px solid black;
padding: 0.5rem;
width: fit-content;
}
.clone #clone-command {
display: inline;
margin-right: 0.5rem;
}
<div class="clone">
{% set url = [darcsConfig.baseUrl, "/repos/", patchInfo.repoName | slugify] | join | url %}
<pre id="clone-command">darcs pull {{ url }} -h {{patchInfo.patch.hash}}</pre>
<button id="repo-clone" onclick="copyCommand()">Copy</buton>
</div>
<script>
const copyCommand = () => {
const text = document.getElementById("clone-command").textContent
const button = document.getElementById("repo-clone")
navigator.clipboard.writeText(text).then(() => {
button.innerText = "Copied"
})
}
</script>
<div class="clone">
{% set url = [darcsConfig.baseUrl, "/repos/", repo | slugify] | join | url %}
<pre id="clone-command">darcs clone {{ url }}</pre>
<button id="repo-clone" onclick="copyCommand()">Copy</buton>
</div>
<script>
const copyCommand = () => {
const text = document.getElementById("clone-command").textContent
const button = document.getElementById("repo-clone")
navigator.clipboard.writeText(text).then(() => {
button.innerText = "Copied"
})
}
</script>