darcs

Patch 1042 failing test for issue2303, a patch index diagnostic

Title failing test for issue2303, a patch index diagnostic
Superseder Nosy List markstos
Related Issues
Status accepted Assigned To
Milestone

Created on 2013-02-17.01:19:28 by markstos, last changed 2013-10-10.16:11:27 by gh.

See mailing list archives for discussion on individual patches.
Messages
msg16670 (view) Author: markstos Date: 2013-02-17.01:19:26
1 patch for repository http://darcs.net:

Sat Feb 16 20:16:07 EST 2013  Mark Stosberg <mark@stosberg.com>
  * new failing test for issue2303 - illustrates a Patch Index diagnostic that can be improved.


New patches:

[new failing test for issue2303 - illustrates a Patch Index diagnostic that can be improved.
Mark Stosberg <mark@stosberg.com>**20130217011607
 Ignore-this: c8acc18cb112ed06ec1c4c5d69a45897
] addfile ./tests/failing-issue2303-diagnostic-for-bad-patch-index-permissions.sh
hunk ./tests/failing-issue2303-diagnostic-for-bad-patch-index-permissions.sh 1
+#!/usr/bin/env bash
+## Test for issue2303 - diagnostics for patch index should be clear there's a permission problem
+##
+## Copyright (C) 2013 Mark Stosberg
+##
+## Permission is hereby granted, free of charge, to any person
+## obtaining a copy of this software and associated documentation
+## files (the "Software"), to deal in the Software without
+## restriction, including without limitation the rights to use, copy,
+## modify, merge, publish, distribute, sublicense, and/or sell copies
+## of the Software, and to permit persons to whom the Software is
+## furnished to do so, subject to the following conditions:
+##
+## The above copyright notice and this permission notice shall be
+## included in all copies or substantial portions of the Software.
+##
+## THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+## EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+## MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+## NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+## BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+## ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+## CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+## SOFTWARE.
+
+. lib                           # Load some portability helpers.
+
+darcs init      --repo R        # Create our test repos.
+cd R
+touch t.txt
+darcs add t.txt
+darcs record -am 'initial record' t.txt
+darcs optimize --patch-index
+
+chmod -w _darcs/patch_index
+
+# We expect this command to fail because the patch index isn't writable
+# and give a reasonable diagnostic that explains this. It should mention that
+# the permission problem is the _darcs/patch_index directory.
+not darcs oblit -a | grep '_darcs/patch_index';
+
+
+cd ../

Context:

[make rebase reify/inject hidden
Ganesh Sittampalam <ganesh@earth.li>**20130216231325
 Ignore-this: 219d9871a1e6061e65f71b494b132a8d
] 
[Resolve issue2277: rebase suspend and unsuspend supports --summary.
Radoslav Dorcik <dixiecko@gmail.com>**20130216173412
 Ignore-this: 8bdb7d6780b68a45e9fa28309f62b1dc
] 
[document DARCS_GET_FOO and DARCS_APPLY_FOO
Guillaume Hoffmann <guillaumh@gmail.com>**20130216182453
 Ignore-this: 84c7d9747cc99b247fb7feaa9d18588b
] 
[include patterns help to help markdown output
Guillaume Hoffmann <guillaumh@gmail.com>**20130216170523
 Ignore-this: c1e21f71dc2df97acdfdea3a1bb4af32
] 
[fix markdown and titles in help markdown
Guillaume Hoffmann <guillaumh@gmail.com>**20130216164807
 Ignore-this: d4b36955464f2e581c90a20a5767aa86
] 
[DARCS_SLOPPY_LOCKS help
Guillaume Hoffmann <guillaumh@gmail.com>**20130216162518
 Ignore-this: 83990c62c4b11a981d2a84fc86af6636
] 
[include environment variables in `darcs help markdown` output.
Radoslav Dorcik <dixiecko@gmail.com>**20130216162603
 Ignore-this: 1d6f0a4944364765439b15070fbd7efb
] 
[Ressurection of environment vars desciption from the manual.
Radoslav Dorcik <dixiecko@gmail.com>**20130216154507
 Ignore-this: 301bf7378fc283b5dd14adf7e9136c81
] 
[resolve issue2227: move the rebase patch to the end before an amend-record
Ganesh Sittampalam <ganesh@earth.li>**20130216174740
 Ignore-this: b3626bf0607894741568534b97ddd2ba
] 
[simplify test case
Ganesh Sittampalam <ganesh@earth.li>**20130216145748
 Ignore-this: 27349b484ebf0cc9a6fbab66b795b461
] 
[issue1932 test: we can still test the remote parts on Windows
Ganesh Sittampalam <ganesh@earth.li>**20130216153600
 Ignore-this: 2d01f21f42cbf51c9aefa716d4e5b892
] 
[reintroduce missing when
Guillaume Hoffmann <guillaumh@gmail.com>**20130216141136
 Ignore-this: e17f32c37f3f9f754a92111f24995716
] 
[facility for getting unique path name based on base name (<base>_<n>)
Radoslav Dorcik <dixiecko@gmail.com>**20130216145609
 Ignore-this: b9b816e1d59dfbe51982151b27ba47f1
] 
[test for issue2287 is successful.
Radoslav Dorcik <dixiecko@gmail.com>**20130216111321
 Ignore-this: 3896a8357a1f8b083354eac05efab805
] 
[Resolve issue2287: obliterate -O doesn't overwrite existing file.
Radoslav Dorcik <dixiecko@gmail.com>**20130216011859
 Ignore-this: 324202a42db62f960d27e43902d00b19
] 
[Get command uses new unique name facility.
Radoslav Dorcik <dixiecko@gmail.com>**20130216011850
 Ignore-this: a812b76afb53f5f83ee216cd7d45b523
] 
[Add failing test for issue2287
Radoslav Dorcik <dixiecko@gmail.com>**20130216002720
 Ignore-this: 7f361935d2ad648980cfe2fea855ad9d
] 
[resolve issue2282: don't allow remote operations to copy the rebase patch
Ganesh Sittampalam <ganesh@earth.li>**20130216134245
 Ignore-this: 426064878381bbee4c030dc6b03ff7bb
] 
[Accept issue2256 - diff with empty arg string causes failure in updateIndex
Owen Stephens <darcs@owenstephens.co.uk>**20130216094324
 Ignore-this: 5482ba4271cf086137612b6900106653
] 
[disable join tests on Prim.V3 patches as it doesn't support join yet
Ganesh Sittampalam <ganesh@earth.li>**20130215184331
 Ignore-this: 4418addfe889f8a8ed1bc4a2be04744c
] 
[remove a couple of quickCheck tests that can never work
Ganesh Sittampalam <ganesh@earth.li>**20130215181129
 Ignore-this: cebae3f09a27ef940a244f3b0b155d99
] 
[fix network tests that did not find the right darcs executable
Guillaume Hoffmann <guillaumh@gmail.com>**20130215182240
 Ignore-this: dbc51c9b03966d0dae97ad332978f1f6
] 
[no longer enable changes and annotate to create patch index
Guillaume Hoffmann <guillaumh@gmail.com>**20130215181459
 Ignore-this: 955a099130488abd1b7ada6854182058
 This also removes the test that ensures the darcs changes
 creates the patch index.
] 
[Resolve issue2274: create patch index only with commands that take a lock
Guillaume Hoffmann <guillaumh@gmail.com>**20130215163050
 Ignore-this: dd65303a8ec0e308118f0e3dca9df14b
] 
[switch from sleep to threadDelay to fix warning
Ganesh Sittampalam <ganesh@earth.li>**20130215152655
 Ignore-this: cafddee75d9bbf80f14edcb23861dfc5
 threadDelay doesn't have a concept of being interrupted so the code now
 just continues unconditionally
] 
[get rid of withGutsOf which is now redundant
Ganesh Sittampalam <ganesh@earth.li>**20130215145126
 Ignore-this: 966c3a53ae46e2e123e43085e66ed7c1
] 
[update lazy-get.sh test to an existing small remote repo
Guillaume Hoffmann <guillaumh@gmail.com>**20130215141854
 Ignore-this: fd70bb1654e8b146a9161a5806b6f3fb
] 
[rename iconv functions imported from haskeline to avoid name clash
Ganesh Sittampalam <ganesh@earth.li>**20130215140115
 Ignore-this: cf72e6103ddcfd29f2c447ed43e7d187
 haskeline < 0.7 still has these symbols itself so ghci doesn't work
] 
[Resolve issue904: Fix record on Linux/FUSE/sshfs (fall back to sloppy locks automatically)
Nathaniel Filardo <nwf@cs.jhu.edu>**20080711051714
 Ignore-this: acdc2639207ccb4f73042397b549dc4b
] 
[add a few more tests of darcs changes with moved files
Ganesh Sittampalam <ganesh@earth.li>**20130215102601
 Ignore-this: 82bef0c003b15250c4307e5711924d4a
] 
[cosmetic cleanups: remove unnecessary -A in test script and trailing whitespace
Ganesh Sittampalam <ganesh@earth.li>**20130214200424
 Ignore-this: 7947ef6679415637549aac714b9035dc
] 
[Add failing test for issue1579
Radoslav Dorcik <dixiecko@gmail.com>**20130214223720
 Ignore-this: b301af6d4ea2daec7b554f31b0f9d7d2
] 
[Add some trivial haddocks to V1/Commute
Owen Stephens <darcs@owenstephens.co.uk>**20130108031210
 Ignore-this: f892be63eac2262197d2f32ecd0562bc
] 
[Windows fix for issue2270 test
Ganesh Sittampalam <ganesh@earth.li>**20130214191336
 Ignore-this: 763678c5769245b06d538019e5095c33
] 
[resolve issue2270: fixed darcs changes -i --only-to-files
Sebastian Fischer <mail@sebfisch.de>**20130210143244
 Ignore-this: 73eaf3b88fb7eb74f08a6924d904d7c7
 
 `darcs changes --interactive --only-to-files` now only shows changes
 to relevant files.
 
 The options `--interactive` and `--verbose` now use the same filtering
 code in presence of `--only-to-files`, so interactively shown changes
 are the same as verbosely shown changes: with `--only-to-files` only
 changes to the listed files are shown, without this option all changes
 to files recorded together with listed files are shown.
 
] 
[added tests for issue 2270
Sebastian Fischer <mail@sebfisch.de>**20130210142357
 Ignore-this: 49ccbcf526253d0311426ee56ce3829a
 
 I have added a test script for issue 2270: darcs change should only
 show changes to relevant files.
   
 Currently, `darcs changes --interactive --only-to-files` shows changes
 to files not asked for.
   
 To avoid regressions when fixing this bug, I have also added tests for
 `--interactive`, `--verbose`, and `--verbose --only-to-files` as well
 as tests to check the handling of moved files.
 
 
] 
[accept issue2293: patch index update reads too much of the repo
Ganesh Sittampalam <ganesh@earth.li>**20130124070606
 Ignore-this: 22ddb7fd30efc6a20f937ac7cc2ec7c
] 
[resolve issue2248: always clean up rebase-in-progress state
Ganesh Sittampalam <ganesh@earth.li>**20130122175603
 Ignore-this: f2815d49b46eb9ab1f8b01480a08187c
] 
[add --ignore-times option to rebase commands that read the working dir
Ganesh Sittampalam <ganesh@earth.li>**20130122074553
 Ignore-this: 1e981ea48aea661650f542c28d276b70
 This is important for any clients that script darcs, including the
 test harness; otherwise darcs can incorrectly assume there are no
 conflicts with working. Darcs then fails when it actually tries to
 update working.
] 
[fix copy-and-paste error in filterOutConflicts refactoring
Ganesh Sittampalam <ganesh@earth.li>**20130120215010
 Ignore-this: 7bf5b7bc8a6262ff7c8c475511604169
] 
[add copyright notices for the imported haskeline code
Ganesh Sittampalam <ganesh@earth.li>**20130119163610
 Ignore-this: afcdc8048f8b3233fa17d3ab0c9c311f
 licence/copyright taken from haskeline 0.6.4.7:
 BSD3, copyright Judah Jacobson
] 
[import encoding code from haskeline: move source into Darcs.Util
Ganesh Sittampalam <ganesh@earth.li>**20130118230238
 Ignore-this: 652ed9a9af9d75d0561834dc47ec042b
] 
[import encoding code from haskeline: switch over
Ganesh Sittampalam <ganesh@earth.li>**20130118230119
 Ignore-this: cc351ba8a9dc4fb32c33b4c557019c35
] 
[import encoding code from haskeline: source files
Ganesh Sittampalam <ganesh@earth.li>**20130118225947
 Ignore-this: c2d1e228fa4cce3e66e90a14fa2f3200
] 
[import encoding code from haskeline: cabal changes
Ganesh Sittampalam <ganesh@earth.li>**20130118073557
 Ignore-this: 70e13cbcc14ef925498283210bce9f25
] 
[import encoding code from haskeline: Setup.lhs changes
Ganesh Sittampalam <ganesh@earth.li>**20130115181040
 Ignore-this: 31ccdca76001bff769464fb7a8e574e9
] 
[Resolve issue2155: Expurgate the non-functional annotate --xml-output option
Dave Love <fx@gnu.org>**20130113154549
 Ignore-this: a63a067b4bc5525c780f053286fbfe0d
] 
[rollback patch index creation code at repo init
Guillaume Hoffmann <guillaumh@gmail.com>**20130119010731
 Ignore-this: 7719538939a726dddd1c0e48a4972820
] 
[Remove FixFilePath from DarcsFlag
Guillaume Hoffmann <guillaumh@gmail.com>**20130115064314
 Ignore-this: da0032bfff6b5898005a0f44999d667a
 By passing the paths explicitly we can remove a few partial functions
 and statically ensure the commands get the paths they need.
 Original patch by Jason Dagit.
] 
[darcs-test UI: print Darcs1 in place of Hashed
Guillaume Hoffmann <guillaumh@gmail.com>**20130114173028
 Ignore-this: 790072f039a5183f95476eed60dbb194
] 
[fix tests after changing --hashed into --darcs-1
Guillaume Hoffmann <guillaumh@gmail.com>**20130114171810
 Ignore-this: 54d9720397c097b63f591c9b815ed5c5
] 
[rename init --hashed into init --darcs-1
Guillaume Hoffmann <guillaumh@gmail.com>**20130113040449
 Ignore-this: 1aacf8d514317ae69d63cee74cbc5791
] 
[hlint Repository
Guillaume Hoffmann <guillaumh@gmail.com>**20130113034110
 Ignore-this: 27e661f26025da262efc076b944c754
] 
[inline goToChosenVersion into copyRepoAndGoToChosenVersion
Guillaume Hoffmann <guillaumh@gmail.com>**20130113033157
 Ignore-this: ecf179238541c40d540ebc0541f9a5d6
] 
[inline copyRepository into copyRepoAndGoToChosenVersion
Guillaume Hoffmann <guillaumh@gmail.com>**20130113032517
 Ignore-this: c2d69eca208a662dc26c60c64d370077
] 
[fix repo init message by moving it to UI code
Guillaume Hoffmann <guillaumh@gmail.com>**20130113031636
 Ignore-this: b6d8dbb8e278fdf3adf5bde5a65366bd
] 
[move repository cloning code from UI.Commands.Get to Repository
Guillaume Hoffmann <guillaumh@gmail.com>**20130113023838
 Ignore-this: d8619bad13125c88a2dbc4ecf7ea4caa
] 
[move filterOutConflicts from UI.SelectChanges to Repository.State
Guillaume Hoffmann <guillaumh@gmail.com>**20130112214555
 Ignore-this: b3e026d21ed9e3d23f8b1b217d49e61a
] 
[make darcs init print a confirmation message when successful
Guillaume Hoffmann <guillaumh@gmail.com>**20130105183019
 Ignore-this: cc14b584264ad4ba8d7c0f279e0c4a47
] 
[remove empty Crypt directory
Guillaume Hoffmann <guillaumh@gmail.com>**20130104193304
 Ignore-this: 7d8e3346c88a1dd5fd3236d7555980a1
] 
[test for issue2286: make sure we can read repos with non-UTF8 metadata
Ganesh Sittampalam <ganesh@earth.li>**20130102222735
 Ignore-this: adc6165d5d5d991383ebf0e6547f7bf4
] 
[We can use chcp to switch encodings on Windows
Ganesh Sittampalam <ganesh@earth.li>**20130101122254
 Ignore-this: bc115467e31e144694a33e43dca3fb6c
 This means that the tests that require different encodings can run.
] 
[unsetting DARCS_TEST_PREFS_DIR in utf8 test doesn't seem to be necessary
Ganesh Sittampalam <ganesh@earth.li>**20130101120246
 Ignore-this: ed74710d8b358b920d742e86a7f008d8
 
 It was causing problems on Windows because getAppUserDataDirectory
 still returns the normal user directory.
 
 It also means that the repository type choice isn't picked up.
] 
[improve diagnostics when utf8 test fails
Ganesh Sittampalam <ganesh@earth.li>**20121231224600
 Ignore-this: 63db587bc36f8826c66dc6913a4fdb2d
] 
[windows test fix: replace shell script with a Haskell program
Ganesh Sittampalam <ganesh@earth.li>**20121231224332
 Ignore-this: de01ab8647e7d62c18d8c266d514b054
] 
[print out locale encoding when running tests
Ganesh Sittampalam <ganesh@earth.li>**20121230100809
 Ignore-this: 54248bb9409dc1278ac976d5cd4b7b6d
] 
[add some comments about "nearby" darcs, and print out the one that was found
Ganesh Sittampalam <ganesh@earth.li>**20121230083432
 Ignore-this: b5cea1b20e671bdff4d128eba7d59430
] 
[TAG 2.9.7
Ganesh Sittampalam <ganesh@earth.li>**20121229002458
 Ignore-this: 2b0af78f0bb7be3153407d4faeff22c4
] 
Patch bundle hash:
28d3af7bbb608a3fca608b91aa8b7a111f0b3099
msg17062 (view) Author: gh Date: 2013-10-10.16:11:27
Good to go.
History
Date User Action Args
2013-02-17 01:19:28markstoscreate
2013-06-14 22:13:45ghsetstatus: needs-screening -> needs-review
2013-10-10 16:11:27ghsetstatus: needs-review -> accepted
messages: + msg17062