Eric Kow <[email protected]> added the comment: 8 patches for repository http://darcs.net/releases/branch-2.5:
Wed Aug 11 15:19:03 BST 2010 Eric Kow <[email protected]> * Accept issue1898: set-default notification system. Thu Aug 12 16:26:37 BST 2010 Eric Kow <[email protected]> * Accept issue1875: darcs does not honor no-set-default on fetch. Thu Aug 12 16:48:27 BST 2010 Eric Kow <[email protected]> * Generalise issue1875 test on not setting default. Thu Aug 12 16:48:47 BST 2010 Eric Kow <[email protected]> * Resolve issue1875: avoid accidentally setting default. Two cases fixed: - setting default on dry-run - setting default on darcs get --no-set-default Thu Aug 12 16:09:20 BST 2010 Eric Kow <[email protected]> * Fix the remote-repo flag if it's not a URL. The word 'fix' here refers to the filepath canonicalisation mechanism that makes it easier to check filepath equality. Thu Aug 12 16:59:01 BST 2010 Eric Kow <[email protected]> * Resolve issue1898: notify user when they can use set-default. Sun Aug 15 21:22:23 BST 2010 Eric Kow <[email protected]> * Fix tests that were broken by issue1875 fix. The tests were assuming --set-default. As these are artifical repositories for test cases, we sometimes have cases where we pull/push from freshly created repositories with no defaultrepo. Sun Aug 15 21:25:29 BST 2010 Eric Kow <[email protected]> * Fix tests that were broken by issue1898 fix. These tests were confused by Darcs UI messages. __________________________________ Darcs bug tracker <[email protected]> <http://bugs.darcs.net/patch345> __________________________________
New patches: [Accept issue1898: set-default notification system. Eric Kow <[email protected]>**20100811141903 Ignore-this: d33212de428eaf5e2fd85aa4a6cc644a ] addfile ./tests/failing-issue1898-set-default.sh hunk ./tests/failing-issue1898-set-default.sh 1 +#!/usr/bin/env bash +## Test for issue1898 - set-default mechanism +## +## Copyright (C) 2010 Eric Kow +## +## 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. +rm -rf R0 R1 R2 S # Another script may have left a mess. +darcs init --repo R0 # Create our test repos. + +darcs get R0 R1 +darcs get R0 R2 +darcs get R0 S + +cd S +# default to no-set-default +darcs push ../R1 > log +grep '/R0$' _darcs/prefs/defaultrepo +# notification when using no-set-default +grep "set-default" log +# set-default works +darcs push ../R1 --set-default > log +grep '/R1$' _darcs/prefs/defaultrepo +# no notification when already using --set-default +not grep "set-default" log +# no notification when already pushing to the default repo +darcs push > log +not grep "set-default" log +# no notification when it's just the --remote-repo +darcs push --remote-repo ../R1 > log +not grep "set-default" log +# but... notification still works in presence of remote-repo +darcs push --remote-repo ../R1 ../R2 > log +grep "set-default" log +cd .. [Accept issue1875: darcs does not honor no-set-default on fetch. Eric Kow <[email protected]>**20100812152637 Ignore-this: 32573c47c25ec3e5ad187a5537f50c73 ] addfile ./tests/failing-issue1875-honor-no-set-default.sh hunk ./tests/failing-issue1875-honor-no-set-default.sh 1 +#!/usr/bin/env bash +## Test for issue1875 - darcs should honor no-set-default even +## in corner cases. +## +## Copyright (C) 2010 Eric Kow +## +## 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. +rm -rf R S # Another script may have left a mess. +darcs init --repo R # Create our test repos. +darcs get R S --no-set-default +not find S/_darcs/prefs/defaultrepo [Generalise issue1875 test on not setting default. Eric Kow <[email protected]>**20100812154827 Ignore-this: 127842d85545f411ce71e8d065d2c268 ] hunk ./tests/failing-issue1875-honor-no-set-default.sh 2 #!/usr/bin/env bash -## Test for issue1875 - darcs should honor no-set-default even -## in corner cases. +## Test for issue1875 - corner cases in which darcs may accidentally +## set default even though it's not supposed to ## ## Copyright (C) 2010 Eric Kow ## hunk ./tests/failing-issue1875-honor-no-set-default.sh 32 darcs init --repo R # Create our test repos. darcs get R S --no-set-default not find S/_darcs/prefs/defaultrepo +rm -rf S + +darcs init --repo S +cd S +darcs push ../R --dry-run +not grep '/R$' _darcs/prefs/defaultrepo +darcs push ../R +cd .. [Resolve issue1875: avoid accidentally setting default. Eric Kow <[email protected]>**20100812154847 Ignore-this: d03cfc6111805515ae4f1ca467beab2c Two cases fixed: - setting default on dry-run - setting default on darcs get --no-set-default ] move ./tests/failing-issue1875-honor-no-set-default.sh ./tests/issue1875-honor-no-set-default.sh hunk ./src/Darcs/Repository/Prefs.lhs 450 defaultrepo _ _ r = return r setDefaultrepo :: String -> [DarcsFlag] -> IO () -setDefaultrepo r opts = do doit <- if (NoSetDefault `notElem` opts && DryRun `notElem` opts && r_is_not_tmp) - then return True - else do olddef <- - getPreflist "defaultrepo" - return (olddef == []) +setDefaultrepo r opts = do olddef <- getPreflist "defaultrepo" + let doit = NoSetDefault `notElem` opts + && wetRun + && not rIsTmp + && (olddef /= [r] || olddef == []) when doit (setPreflist "defaultrepo" [r]) addToPreflist "repos" r hunk ./src/Darcs/Repository/Prefs.lhs 460 `catchall` return () -- we don't care if this fails! where - r_is_not_tmp = not $ r `elem` [x | RemoteRepo x <- opts] + wetRun = DryRun `notElem` opts + rIsTmp = r `elem` [x | RemoteRepo x <- opts] \end{code} \paragraph{email} [Fix the remote-repo flag if it's not a URL. Eric Kow <[email protected]>**20100812150920 Ignore-this: 10082e2dc200ece25ece1519242962e2 The word 'fix' here refers to the filepath canonicalisation mechanism that makes it easier to check filepath equality. ] hunk ./src/Darcs/Arguments.lhs 28 maxCount, isin, arein, definePatches, defineChanges, - fixFilePathOrStd, fixUrl, + fixFilePathOrStd, fixUrl, fixUrlFlag, fixSubPaths, areFileArgs, DarcsAtomicOption( .. ), atomicOptions, DarcsOption( .. ), optionFromDarcsOption, hunk ./src/Darcs/Arguments.lhs 476 Nothing -> bug "Can't fix path in fixFilePathOrStd" Just (_,o) -> withCurrentDirectory o $ ioAbsoluteOrStd f +fixUrlFlag :: [DarcsFlag] -> DarcsFlag -> IO DarcsFlag +fixUrlFlag opts (RemoteRepo f) = RemoteRepo `fmap` fixUrl opts f +fixUrlFlag _ f = return f + fixUrl :: [DarcsFlag] -> String -> IO String fixUrl opts f = if isFile f then toFilePath `fmap` fixFilePath opts f hunk ./src/Darcs/RunCommand.hs 29 import Darcs.Arguments ( DarcsFlag(..), help, + fixUrlFlag, optionFromDarcsOption, listOptions, nubOptions ) import Darcs.ArgumentDefaults ( getDefaultFlags ) hunk ./src/Darcs/RunCommand.hs 144 if preHookExitCode /= ExitSuccess then exitWith preHookExitCode else do let fixFlag = FixFilePath here cwd - (commandCommand cmd) (fixFlag : os) ex + fixedOs <- mapM (fixUrlFlag [fixFlag]) os + (commandCommand cmd) (fixFlag : fixedOs) ex postHookExitCode <- runPosthook os here exitWith postHookExitCode [Resolve issue1898: notify user when they can use set-default. Eric Kow <[email protected]>**20100812155901 Ignore-this: 638b575b32d700cfae9f057293cd5aa8 ] move ./tests/failing-issue1898-set-default.sh ./tests/issue1898-set-default-notification.sh hunk ./src/Darcs/Repository/Prefs.lhs 451 setDefaultrepo :: String -> [DarcsFlag] -> IO () setDefaultrepo r opts = do olddef <- getPreflist "defaultrepo" - let doit = NoSetDefault `notElem` opts - && wetRun - && not rIsTmp - && (olddef /= [r] || olddef == []) - when doit - (setPreflist "defaultrepo" [r]) + let doit = NoSetDefault `notElem` opts && greenLight + greenLight = wetRun + && not rIsTmp + && (olddef /= [r] || olddef == []) + if doit + then setPreflist "defaultrepo" [r] + else when greenLight $ putStr . unlines $ + -- the nuance here is that we should only notify when the + -- reason we're not setting default is the --no-set-default + -- flag, not the various automatic show stoppers + [ "Note: if you want to change the default remote repository to" + , r ++ "," + , "quit now and issue the same command with the --set-default flag." + ] addToPreflist "repos" r `catchall` return () -- we don't care if this fails! where [Fix tests that were broken by issue1875 fix. Eric Kow <[email protected]>**20100815202223 Ignore-this: bd6e7066799e39f3529a485f6fbeed42 The tests were assuming --set-default. As these are artifical repositories for test cases, we sometimes have cases where we pull/push from freshly created repositories with no defaultrepo. ] hunk ./tests/pull.sh 28 darcs add one; darcs record --patch-name uno --all cd .. # now outside of any repo -darcs pull --repodir temp1 --all temp2 | grep -i 'Finished pulling.' # temp2 is not relative to temp1 +darcs pull --set-default --repodir temp1 --all temp2 | grep -i 'Finished pulling.' # temp2 is not relative to temp1 # set up server repo date > temp2/one/date.t hunk ./tests/pull_binary.sh 22 mkdir temp2 cd temp2 darcs init -echo yn | darcs pull ../temp1 +echo yn | darcs pull --set-default ../temp1 rm foo darcs pull -a cd .. hunk ./tests/utf8.sh 169 # and that it doesn't get mangled on push rm -rf temp2 mkdir temp2; darcs init --repodir temp2 -darcs push --repodir temp1 -a temp2 +darcs push --repodir temp1 -a temp2 --set-default darcs changes --repodir temp1 --xml > temp1/changes.xml darcs changes --repodir temp2 --xml > temp2/changes.xml diff temp1/changes.xml temp2/changes.xml [Fix tests that were broken by issue1898 fix. Eric Kow <[email protected]>**20100815202529 Ignore-this: f25c2aaed8c0063cee2f31c179345190 These tests were confused by Darcs UI messages. ] hunk ./tests/output.sh 33 diff -u ../patchfile ../correct rm ../patchfile -darcs send -a --dont-edit-description -o - ../../temp2 > ../patchfile +darcs send -a --set-default --dont-edit-description -o - ../../temp2 > ../patchfile grep -v Creating ../patchfile | diff -u ../correct - darcs apply --repodir=../../temp2 --dry-run ../patchfile > out hunk ./tests/pull.sh 122 darcs record -am newdir cd ../temp2 mkdir newdir -darcs pull -a ../temp1 &> out2 +darcs pull -a --set-default ../temp1 &> out2 cat out grep Backing out2 grep 'Finished pulling' out2 Context: [Resolve issue1909: generate correct context in unpull -O. Petr Rockai <[email protected]>**20100807171552 Ignore-this: 8d66f660e691ffe76a8da1eab9e5dcc9 ] [Accept issue1909: unrecord -O in a tagged repo makes a bad bundle. Petr Rockai <[email protected]>**20100807171245 Ignore-this: d8b2d7563cd4612814a209a515358cb4 ] [Also set binary mode on stderr (duplicate for 2.5 branch) Reinier Lamers <[email protected]>**20100810193256 Ignore-this: 5f1ed1efaff91967b340cfc51afa6ac5 ] [Export usageHelper Joachim Breitner <[email protected]>**20100803173150 Ignore-this: 763398f4ab6b99a59de7666940103daa usage is darcs-specific, while usageHelper is not. ipatch could use usageHelper. ] [Make Darcs.RunCommand independent of Darcs.Commands.Help Joachim Breitner <[email protected]>**20100803165917 Ignore-this: 744025a59cdd9ad52595b65d989a638a by passing commandControlList via main.hs. This allows re-use of Darcs.RunCommand by other binaries with a different set of commands. ] [Do not fail when there's debris in tests directory. Petr Rockai <[email protected]>**20100807192133 Ignore-this: d1fdf93fbed39e3a20bb8d4129dbd4d4 ] [Restyle issue1873 test and make it run in darcs 2.4. Eric Kow <[email protected]>**20100807171741 Ignore-this: 32d1c90bbb45ab91fd3803dc513bc751 Just to confirm the regression... ] [Add test for issue1873 (failed to read patch during apply). Petr Rockai <[email protected]>**20100807163013 Ignore-this: 2396ff7f429204f6f10079fb32799e32 ] [Resolve issue1873: give nicer error when apply fails due to missing patches. Petr Rockai <[email protected]>**20100804204010 Ignore-this: b3ddfddeaa7e089717256aa2344ba78c ] [remove dead code Ganesh Sittampalam <[email protected]>**20100708055640 Ignore-this: 86104cf3f14952869be820f66f156fbb ] [Rename findCommonAndUncommon to findUncommon (it does not find common). Petr Rockai <[email protected]>**20100804195738 Ignore-this: 8257db493418179be45fad17ab6ffd8e ] [Remove unused imports in Darcs.Commands.Changes Reinier Lamers <[email protected]>**20100802181249 Ignore-this: 87d2c72fc74e4442f146d896296fb0db ] [Resolve issue1888: fix changes --context. Petr Rockai <[email protected]>**20100729185143 Ignore-this: eed1a926b468492198547c438a85e2c9 ] [TAG 2.4.98.2 Reinier Lamers <[email protected]>**20100726184946 Ignore-this: 43a9f17e811c2172be76fb1b19aa1497 ] [Disable optimize --http for Darcs 2.5 release. Eric Kow <[email protected]>**20100726111249 Ignore-this: 92b75e71ac3041eee76762bf8042b02c ] [Disable packs for darcs 2.5. Eric Kow <[email protected]>**20100724155438 Ignore-this: 3b9a6e7b3bede56651a5f6f1b728cfb5 The packs feature is not sufficiently stable for release. ] [resolve issue1716: allow mail header lines of all whitespace in test Reinier Lamers <[email protected]>**20100722191846 Ignore-this: 24a12e1cf2631b5363636cf32cf5e8da Reading RFC822, it seems all-whitespace lines are allowed in the header section when you've got trailing space that doesn't fit on the line before. ] [Rollback change that allowed --exact-version without context in release Reinier Lamers <[email protected]>**20100725131540 Ignore-this: d2e471bfb2edfc664697154519674f3a ] [Bump version number to 2.4.98.2 Reinier Lamers <[email protected]>**20100725125520 Ignore-this: daa7f079bf12a4809705d1d8ff3cc681 ] [Resolve issue1892: Improve safety of makeBundle* and fix a couple of related bugs. Petr Rockai <[email protected]>**20100715093842 Ignore-this: 9eaa26edfdda09ac444f124130b9e74b ] [Remove [DarcsFlag] usage from Darcs.Patch.Bundle. Petr Rockai <[email protected]>**20100715081908 Ignore-this: 62297671dea56fdc0a1cac42f79d6d29 ] [resolve issue1893: move fields of conditional builds within scope of condition Ganesh Sittampalam <[email protected]>**20100716192642 Ignore-this: 5eb1c376138534dd55190e06be701588 This helps to work around a bug/misfeature in Cabal where it collects up things like build-depends without looking at whether the thing they apply to is actually buildable ] [add comment about why we're using a deprecated option Ganesh Sittampalam <[email protected]>**20100707061805 Ignore-this: eb1ec29ce345f96689d39f8f9638987c ] [standardize GHC options Ganesh Sittampalam <[email protected]>**20100707180210 Ignore-this: b088f0ece12b86980225d81b37d89251 ] [move main unit testing code into module with proper name (not Main) Ganesh Sittampalam <[email protected]>**20100707180600 Ignore-this: 9c44b4ab083ba44afc9ecaf0752cd130 This is enable other things than the unit executable to import it ] [Update link to Darcs repository browser. Eric Kow <[email protected]>**20100713174550 Ignore-this: 3546359aec588d1262d6335b033331d0 ] [Fix conflict in Distribution.ShellHarness. Eric Kow <[email protected]>**20100712132814 Ignore-this: bfde365cf2d74b05d29ed457b5382f46 Was between extended test defaults and Control.OldException removal. ] [Avoid a haddock parse error. Eric Kow <[email protected]>**20100712142926 Ignore-this: 97dc0a40b82f9360d374917e243e0490 ] [Fix tests in light of recent default flag changes. Petr Rockai <[email protected]>**20100708195100 Ignore-this: b8764f2105ed6e7870f4853041b90f9e ] [Correctly handle conflicts arising from DarcsMutuallyExclusive options. Petr Rockai <[email protected]>**20100708194904 Ignore-this: b6607175899ad6f63044adae7442fd6d ] [Avoid adding noCache twice to parameter lists. Petr Rockai <[email protected]>**20100708195014 Ignore-this: 59cf4dc50edb4c08367cbc29f321e431 ] [Make --no-cache an advanced option in all commands. Eric Kow <[email protected]>**20100701161428 Ignore-this: 99ea6f8e2235bfdab407a1af9fcfb5cc ] [Do not set default repo by default in push, pull, send, fetch. Eric Kow <[email protected]>**20100701160352 Ignore-this: 611fe6db2e2fe4d6ad70758d4dfb63de As discussed during the 2010-03 sprint and documented in http://wiki.darcs.net/DefaultSwitches ] [Express --{no-,}set-default as a mutually exclusive option. Eric Kow <[email protected]>**20100701160138 Ignore-this: 189522de144a9b9b81239f4a5ff545f0 ] [Make --edit-description the default. Eric Kow <[email protected]>**20100701155253 Ignore-this: ed99469237da51949d915a8dda13706e ] [Express --{no-,}edit-description as a mutually exclusive option. Eric Kow <[email protected]>**20100701155045 Ignore-this: 419cc3945f89953e33400172d51453e9 ] [Add a notion of mutually exclusive options with a default. Eric Kow <[email protected]>**20100701155041 Ignore-this: e3a29afebe21c9ec6ce355040260e8b ] [General purpose function for setting defaults. Eric Kow <[email protected]>**20100701151816 Ignore-this: d76a09aa70eba9694d3649300ef7720d ] [Fix use of atomicOptions in Darcs.ArgumentDefaults. Eric Kow <[email protected]>**20100701144916 Ignore-this: 4fc1df15e34b5c63c47e4c12c4f5963 ] [Update optimizeHTTP for new two-layer DarcsOption. Eric Kow <[email protected]>**20100701142543 Ignore-this: d892c6787ba0aa93a0b36c1e7a79b756 ] [Refactor traversal of atomic options in DarcsOption. Eric Kow <[email protected]>**20100621003601 Ignore-this: 9425a65b80f075e684fd7edaf9b5b868 ] [Better use of Data.Maybe helpers in Darcs.Arguments. Eric Kow <[email protected]>**20100621002200 Ignore-this: 46feb16524e1d61495a7ead46cce1e55 ] [Flatten DarcsOption type. Eric Kow <[email protected]>**20100621001926 Ignore-this: 34a3e0c2a9e989f0f35774d742607c93 Distinguish between DarcsAtomicOptions and DarcsOption. ] [Fix missing type signature. Eric Kow <[email protected]>**20100701153511 Ignore-this: a0669588aca19f0c45326c1244e1c766 ] [Rename optionFromDarcsoption to optionFromDarcsOption. Eric Kow <[email protected]>**20100621000207 Ignore-this: d1c5a5cb84264a404b9b07c9094f96aa ] [stop using Control.OldException in Setup.lhs + deps Ganesh Sittampalam <[email protected]>**20100707060932 Ignore-this: ab49b67e05941402304aed3a8b55f52f ] [Fix haddock error. Eric Kow <[email protected]>**20100712145740 Ignore-this: 2e41b55e17020543744a06ef57cdc599 The main problem is that bug is a cpp macro, which gets expanded out. We just work around this for now. ] [Resolve issue1887: add a missing newline to --list-options output. Petr Rockai <[email protected]>**20100711193535 Ignore-this: 912b18e8f89be19d186332f5f98a8083 ] [Fix test issue1865-get-context.sh Thorkil Naur <[email protected]>**20100711121938 Ignore-this: c68995d55efb6095ada7c24ce0909716 ] [remove redundant and accidentally checked in definition Ganesh Sittampalam <[email protected]>**20100709214141 Ignore-this: d8ad150be87b467f92721c8079158541 ] [TAG 2.4.98.1 Reinier Lamers <[email protected]>**20100711120953 Ignore-this: 6955d46fb3e48bc5bb0f622e495eae1f ] Patch bundle hash: 235490a3195e77492f7232cd4c321d1613e426fe
unnamed
Description: Binary data
_______________________________________________ darcs-users mailing list [email protected] http://lists.osuosl.org/mailman/listinfo/darcs-users
