New submission from Gian Piero Carrubba <[email protected]>: 3 patches for repository http://darcs.net/screened:
patch 282a9313fbc9a5be66c395235c0adfedacd62e3f Author: Gian Piero Carrubba <[email protected]> Date: Sun Jul 19 21:16:13 CEST 2026 * accept issue2742: clone --no-working-dir doesn't correctly populate pristine dir patch 5c5e12a1d4968f9fbbf2aa8f15fb3a826c15d67d Author: Gian Piero Carrubba <[email protected]> Date: Mon Jul 20 08:38:14 CEST 2026 * resolve issue2742: create full pristine tree when --no-working-dir is in place This patche passes the test suite, but the comment for writePristine in Repository/Pristine.hs is quite scary. createPristineDirectoryTree is also invoked by darcs test (which should be fine) and darcs import (which maybe also is?). Either this patch is fine, or we miss some tests. patch 6231dd4a6915306a1973e9d1dc0c45f92f58ca94 Author: Gian Piero Carrubba <[email protected]> Date: Mon Jul 20 13:27:19 CEST 2026 * accept issue2743: repair --dry-run modifies the pristine dir ---------- files: accept-issue2742_-clone-__no_working_dir-doesn_t-correctly-populate-pristine-dir.dpatch, patch-preview.txt messages: 24216 nosy: gpiero status: needs-screening title: accept issue2742: clone --no-working-dir... (and 2 more) __________________________________ Darcs bug tracker <[email protected]> <https://bugs.darcs.net/patch2461> __________________________________
[accept issue2742: clone --no-working-dir doesn't correctly populate pristine dir Gian Piero Carrubba <[email protected]>**20260719191613 Ignore-this: 33e156d477650a818730b6d92e16a6314687b9af338af510d0ed61b52eb62f6094e7135424856671 ] addfile ./tests/failing-issue2742-clone_no-working-dir.sh hunk ./tests/failing-issue2742-clone_no-working-dir.sh 1 +#!/usr/bin/env bash +## Test for issue2742 - When invoked with --no-working-dir option, +## clone does not create all the pristin.hashed/ files + +# every test script MUST source lib +. lib + +# every test script should remove directories before creating them +rm -rf R S +darcs init R + +cd R +# change the working tree +# The issue only appears wrt the content of files, so `touch f` would succeed +echo 'Example content.' > f +darcs record -lam 'Add file f' +cd .. + +darcs clone --no-working-dir R S +R_COUNT=$(ls -1 R/_darcs/pristine.hashed | wc -l) +S_COUNT=$(ls -1 S/_darcs/pristine.hashed | wc -l) +# The number of files in _darcs/pristine.hashed should be the same +test $R_COUNT -eq $S_COUNT [resolve issue2742: create full pristine tree when --no-working-dir is in place Gian Piero Carrubba <[email protected]>**20260720063814 Ignore-this: 94b4f1a22fa44be98f97618eb38c2dc937581f8cfaa7053fc284ffc38638ef7961e3962c20ac9548 This patche passes the test suite, but the comment for writePristine in Repository/Pristine.hs is quite scary. createPristineDirectoryTree is also invoked by darcs test (which should be fine) and darcs import (which maybe also is?). Either this patch is fine, or we miss some tests. ] move ./tests/failing-issue2742-clone_no-working-dir.sh ./tests/issue2742-clone_no-working-dir.sh hunk ./src/Darcs/Repository/Pristine.hs 136 - -- evaluate the tree to force copying of pristine files - _ <- darcsAddMissingHashes tree + _ <- writePristine r tree [accept issue2743: repair --dry-run modifies the pristine dir Gian Piero Carrubba <[email protected]>**20260720112719 Ignore-this: 6d43f38c01680183c4b1fbe293f25effd89664949227f3c6ba1e4b15d985487c8bbd453c883fb739 ] addfile ./tests/failing-issue2743-repair_dry-run_modifies_pristine_dir.sh hunk ./tests/failing-issue2743-repair_dry-run_modifies_pristine_dir.sh 1 +#!/usr/bin/env bash +## Test for issue2743 - repair recreates the pristine tree even when called +## with --dry-run (and also claims it did nothing: "The repository is +## consistent!") + +# every test script MUST source lib +. lib + +# every test script should remove directories before creating them +rm -rf R +darcs init R + +filename='foobar-issue2743' +pristine_dir='_darcs/pristine.hashed/' + +cd R +# change the working tree +echo "Example content." > "$filename" +darcs record -lam "Add file '$filename'" + +hash=$(darcs show pristine | grep "$filename" | cut -d' ' -f1) +test -n "$hash" + +pristine_file="${pristine_dir}/${hash}" +rm -f "$pristine_file" +darcs repair --dry-run + +not ls "$pristine_file" +cd ..
accept-issue2742_-clone-__no_working_dir-doesn_t-correctly-populate-pristine-dir.dpatch
Description: application/darcs-patch
_______________________________________________ darcs-devel mailing list [email protected] https://lists.darcs.net/mailman/listinfo/darcs-devel
