[darcs-devel] [patch2027] fix creation of temporary directories

Ben Franksen ben.franksen at online.de
Sat Jul 11 16:20:44 UTC 2020


> That works.

Good! I have push the fix to screened now.

While we're at it, can you test the attached patch on Windows? It does
not replace all imports of the native System.FilePath, only those where
I am reasonably certain it should work (because it does in similar cases
elsewhere in Darcs). The (few) remaining ones are either tricky or
clearly require the native System.FilePath.
-------------- next part --------------
1 patch for repository http://darcs.net/screened:

patch 2bbd5f31120d744be56569e3dc04e64349a759b9
Author: Ben Franksen <ben.franksen at online.de>
Date:   Fri Jul 10 18:26:47 CEST 2020
  * WIP replace most uses of System.FilePath with System.FilePath.Posix
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256


New patches:

[WIP replace most uses of System.FilePath with System.FilePath.Posix
Ben Franksen <ben.franksen at online.de>**20200710162647
 Ignore-this: 9aefc791bf0b3051bbbd8ddbcdff5095979230e60f94a4855022d337f0f0377713e971a539ce2412
] hunk ./src/Darcs/Patch/Prim/V1/Coalesce.hs 14
- -import System.FilePath ( (</>) )
+import System.FilePath.Posix ( (</>) )
hunk ./src/Darcs/Repository/Clone.hs 13
- -import System.FilePath( (</>) )
+import System.FilePath.Posix( (</>) )
hunk ./src/Darcs/Repository/Packs.hs 46
- -import System.FilePath ( (</>)
+import System.FilePath.Posix ( (</>)
hunk ./src/Darcs/Repository/PatchIndex.hs 61
- -import System.FilePath( (</>) )
+import System.FilePath.Posix( (</>) )
hunk ./src/Darcs/Repository/Repair.hs 19
- -import System.FilePath ( (</>) )
+import System.FilePath.Posix ( (</>) )
hunk ./src/Darcs/UI/Commands/Repair.hs 27
- -import System.FilePath ( (<.>) )
+import System.FilePath.Posix ( (<.>) )
hunk ./src/Darcs/Util/Tree/Hashed.hs 32
- -import System.FilePath ( (</>) )
+import System.FilePath.Posix ( (</>) )
hunk ./src/Darcs/Util/Tree/Plain.hs 31
- -import System.FilePath( (</>) )
+import System.FilePath.Posix( (</>) )

Context:

[add NoImplicitPrelude for lib:darcs and exe:darcs
Ben Franksen <ben.franksen at online.de>**20190923175012
 Ignore-this: ce73d515b81f2f21e47dff174313e54a9bfa5ea8450ec0886a5fcfbbe95ee8670fc1d3d35c2e34ca
] 
[darcs.cabal: sort extensions except NoMonoLocalBinds
Ben Franksen <ben.franksen at online.de>**20190903125118
 Ignore-this: 7818d4b2d337f9ce585e165f8a22591c4f4697f3830f50f7f885cebc795bf2058f5bb7dcb61170d4
] 
[use StandaloneDeriving for some Show instances
Ganesh Sittampalam <ganesh at earth.li>**20190902221900
 Ignore-this: 8ab9c2769f4f3b5610c0ab1413347605
 
 This is possible in cases where all the directly included
 patches are concrete types rather than type variables.
 
 For example it works for
 
  data Foo p wX wY where
   Foo :: Named p wX wY -> Foo p wX wY
 
 but not for
 
  data Foo p wX wY where
   Foo :: p wX wY -> Foo p wX wY
] 
[reduce the Show1/Show2 boilerplate with DefaultSignatures
Ganesh Sittampalam <ganesh at earth.li>**20190902130857
 Ignore-this: ef867619eda2321368d1a6b2d5763aab
] 
[re-write Darcs.Patch.Bundle using Darcs.Util.Parser
Ben Franksen <ben.franksen at online.de>**20190902202035
 Ignore-this: 1c60e07d0a1752ff6ef1db0a27a975683b9f9f5241eef933e7b486a176fce4108c8a9c4ab3c53238
 
 This does not delete any of the old code yet. It merely renames the old
 parseBundle to parseBundleOld. The old code will be deleted in a later
 patch. It also doesn't re-implement scanContextFile yet.
] 
[fix interpretation of bundles as patchsets
Ben Franksen <ben.franksen at online.de>**20190901131900
 Ignore-this: 58d5603379eb21531c461e8838782a6bc9a8fcca9a7904a0d6a8bec33c420b67be6ded7f12b27847
 
 We previously created invalid patchsets when a tag was present in the
 context of a bundle. This worked (sort of) due to laziness but only if we
 actually have that tag in our repo. If we don't then this rather dirty hack
 interprets the bundle in a wrong context, i.e. Origin. Depending on how
 findCommonAndUncommon is implemented we either get immediate errors ("cannot
 commute common patches") or it hangs indefinitely trying to perform huge
 amounts of bugus commutes of patches that aren't in their rightful context.
 
 The same bug is still present in scanContextFile.
] 
[replace CommuteNoConflicts with CleanMerge for prim patch types
Ben Franksen <ben.franksen at online.de>**20190919164037
 Ignore-this: 797a05625580c7c277159ad6032779a61e7e3c80816b747ab4008d757d74d2b369656f19b9420aa0
 
 As a logical consequence this moves the definition of mergeList from
 D.P.CommuteNoConflicts to D.P.Merge. We also explicitly call error in
 definitions of cleanMerge and merge if the patch type has an Ident instance
 and we try to merge two identical patches, since this is an undefined
 operation.
] 
[turn PrimPatch into a constraint synonym
Ben Franksen <ben.franksen at online.de>**20190829163003
 Ignore-this: 47127bef77c142a41cf44ca6718902285224f089e8c325fd3873e10d9e5514942b3b4a30852ff04
] 
[add class CleanMerge & make it super class of Merge
Ben Franksen <ben.franksen at online.de>**20190919164037
 Ignore-this: 57e6cec77040c30342bfa0958009b7324dba5ffef0b7233d322d95ba303611777761da455ac8187d
 
 This does not yet replace CommuteNoConflicts. Instead, instances for
 CleanMerge are, for now, defined in terms of mergeNoConflicts.
] 
[remove lots of redundant constraints
Ben Franksen <ben.franksen at online.de>**20190919164036
 Ignore-this: e28236636e10b3110e59361106bdbeeba9c6f24d69af6e0ffdeec0f0afa2f23fa74fc335fc11245a
] 
[remove superclass Commute from class Merge
Ben Franksen <ben.franksen at online.de>**20190910100155
 Ignore-this: 7e6a752b226cbe930df0519e7a8ab63e80a02dc539e44e04ccb54e426ff3ee4a85c4b27b19220019
] 
[Invertible: allow showPatch etc of Rev patches
Ben Franksen <ben.franksen at online.de>**20190919164036
 Ignore-this: 392d0f4a4e5222b76dc0c22d1ddcbb0d4ff4dad2de874164879a26532e2c3a77515554ab39dc9261
 
 Instead of calling error for Rev patches, requiring that the calling code
 first re-inverts the patch, we now do that ourselves. This means a Rev patch
 is shown in exactly the same way as a Fwd patch. This removes the need for
 reInvert in Darcs.UI.SelectPatches.
] 
[possible fix for D.UI.SelectChanges.selected
Ben Franksen <ben.franksen at online.de>**20190919164036
 Ignore-this: 9fc482a1070d243f41ab1d2bb5b764f71de9258e27d99bb40b85fff7b428a0a82fdcc33c8c19798e
 
 This makes it actually do what the docs claim it does. I am not sure this is
 the correct behavior, though. It also renames it to getSelected to make its
 easier to see where it is used, since the word 'selected' appears in lots of
 places in this module, but getSelected is used only in printSelected.
] 
[rename repr to reInvert and fix its haddocks
Ben Franksen <ben.franksen at online.de>**20190830081513
 Ignore-this: 60877d2cf753e7bce24bb1cccbbe92ffabd5483c532104bc1642366516c0b5df28844d87f582ab56
] 
[remove reverse constructors from RebaseSelect and RebaseChange
Ben Franksen <ben.franksen at online.de>**20190919164036
 Ignore-this: c789b18be7b8e30590578aa59909f34f64afdb9a1bc967108609940d0f680fa2d76363c90da1e9e0
] 
[rewrite Summary RebaseChange to avoid force-commute
Ganesh Sittampalam <ganesh at earth.li>**20190911134024
 Ignore-this: 65e0c112000c4d3a1025ef3d211ed0e6
] 
[simplify instance Summary RebaseChange
Ganesh Sittampalam <ganesh at earth.li>**20190903140534
 Ignore-this: a5f0306c4213dcd701fb993f54e92e84
 
 I'm not sure why it was so complicated before. Perhaps
 changeAsMerge was used elsewhere at some point.
 
 Also removed the comment about resolveConflicts which
 doesn't make much sense now.
 
] 
[use Invertible when calling lookTouch in log command
Ben Franksen <ben.franksen at online.de>**20190919164036
 Ignore-this: 617804a94451acd6261c3a0ed6edc977d2d36c73c634547316909c6a5129480ea4a06e88d00fb717
 
 We call lookTouch with the patches inverted. To get rid of the Invert
 constraint, we wrap the patch as an Invertible patch.
] 
[use Invertible to generalize runSelection
Ben Franksen <ben.franksen at online.de>**20190919164036
 Ignore-this: bfcc3d4ab562293cf8c7bc66a0d11e6f006920d1d2fd920377c97784686249928227adc7fbb77d45
 
 The new runSelection no longer requires an Invert instance for the patches.
 This is done by wrapping them internally with Invertible. We keep the old
 function under the new name runInvertibleSelection so we can use it for
 selecting prims, since these are naturally invertible and we cannot and will
 not use Splitters with wrapped Invertible patches.
] 
[matching a patch should be invariant under inversion
Ben Franksen <ben.franksen at online.de>**20190830080459
 Ignore-this: a7321c90ead98c2d1dea84b7c2752a66c159531c2d4e2034406fdca5c2be9448b3285b846b3de41b
 
 This adds a property (only in the haddocks) to D.P.Match.matchAPatch and
 removes re-inversion of patches when we apply a match criterion from
 D.UI.SelectChanges.
] 
[import everything explicitly in D.P.Invertible
Ben Franksen <ben.franksen at online.de>**20190919221255
 Ignore-this: c8d3be0c8d4282db73bc9fb5380c4b1d635dae0f9a0f9c7d6af5dae7256733433d17d71e5e27529
] 
[remove import and re-export of Invert from D.P.RepoPatch
Ben Franksen <ben.franksen at online.de>**20190919211123
 Ignore-this: 8ac7e2db39a3450ae7ce27bdcdd25ea3f1182baafec618596c052e05e3e12c95c1f06bc8a2b8b961
 
 Invert is no longer needed to implement RepoPatch so this is obsolete.
] 
[add Darcs.Patch.Invertible
Ben Franksen <ben.franksen at online.de>**20190919164026
 Ignore-this: 40fd44bd46e5630779a3ecebc028a33c1147785ab56dff6d0b48bc2de34cfb75bfd817a7fdcb6b3b
 
 This is a wrapper type to make an arbitrary patch type formally invertible.
 We define only instances that will be needed to statisfy Invert constraints
 that are currently required in the Repository and UI subsystem. Some of the
 class methods defined for Invertible assume the patch is actually positive.
] 
[add unapply method to class Apply
Ben Franksen <ben.franksen at online.de>**20190919164009
 Ignore-this: 831f51055ca373b7d41be78e6c582dd68cf09d6c221a63a901417e8f8c4df7bdc5bda832dce6eea1
 
 The idea here is to allow to "inverse apply" a patch without that patch
 necessarily having an Invert instance.
] 
[remove Invert constraint from Matchable and MatchableRP
Ben Franksen <ben.franksen at online.de>**20190830221922
 Ignore-this: e87f1de33bae746920f91cd1fa065215918ea9ee74916ff4c4b7775e93d486ff7eed15c0464a8a1e
 
 This means we need to add it to a a few function that actually require it.
 We do this as a preparation for eventually removing Invert instances from
 all the higher level patch types.
] 
[re-export ShowPatchBasic from D.P.RepoPatch
Ben Franksen <ben.franksen at online.de>**20190919221152
 Ignore-this: fc000ea3bd5797ce3c97c92d02348180382bed3ddecd25819b4e08398c6a697cdb744768064ff577
] 
[re-export all imported classes (with members) from Darcs.Patch.RepoPatch
Ben Franksen <ben.franksen at online.de>**20190829163918
 Ignore-this: 25f54fe286b4efb9ae5bfb5d74bf47d94c263d06f762a26bda820efb7f44b1374cc8796efadbaebc
] 
[RepoPatchV3: import everything explicitly
Ben Franksen <ben.franksen at online.de>**20190919220153
 Ignore-this: 606fa7e0ae1ba41ea323e0bed6879e358137add6fe61ea9bc15ce5266766081ebcc92ef4b46d5674
] 
[make D.P.V3.Core independent of PrimPatchId/Prim.Named
Ganesh Sittampalam <ganesh at earth.li>**20190902092525
 Ignore-this: a782b2b5850976e382cf6f1f22af60c0
 
 This involves moving the FromPrim instance to V3.hs and
 generalising the pattern synonyms used by the test harness.
 
 We now expose the constructors of RepoPatchV3 from D.P.V3.Core
 (but not from D.P.V3, which is the intended external interface).
 
] 
[turn RepoPatch into a constraint synonym
Ben Franksen <ben.franksen at online.de>**20190829162443
 Ignore-this: 3925585e444f26e1b238e5a0df41e6aad5e9983bcce38194d0f8eb5c4bd6398ebed934ce6e95ffec
 
 This has a lot of advantages wrt maintenance and gets us rid of a few orphan
 instances. Also included a few minor cleanups in Darcs.Patch.RepoPatch.
] 
[use showPatch ForStorage in V3 error messages
Ben Franksen <ben.franksen at online.de>**20190901200334
 Ignore-this: bfe50cc9dddf0f58bd2256f84220419c7da06685d5e23e24b513e704ba1bb763e6c8ea92afdc52d2
] 
[introduce PrimWithName and make NamedPrim a type synonym
Ganesh Sittampalam <ganesh at earth.li>**20190827114448
 Ignore-this: 934632425eaa3bc82e5769dbee7549a9
] 
[use Darcs.Util.Graph.components for RepoPatchV3
Ben Franksen <ben.franksen at online.de>**20190825211920
 Ignore-this: a6991e94f26b09f302c3a51ea09171f8fa09c9c73caa3f701f752f00c76c8274761a2dd0bdbe3d86
 
 This required a few refactors and the introduction of a new data type for
 components. In particular, the ltmis algorithm needs to be adapted to
 working with just a subset of the vertices of a graph.
] 
[simplify and improve Darcs.Util.Graph.components
Ben Franksen <ben.franksen at online.de>**20190825162606
 Ignore-this: ed2245de76947994d2a937643fb3d6c406968d7c31f779733504ed605eb15302c6dc1a3703427567
 
 It wasn't incorrect (according to the spec) but it did not always return
 vertices ordered and also did a bit too much work.
] 
[move functions to generate graphs from harness to library
Ben Franksen <ben.franksen at online.de>**20190825162321
 Ignore-this: b31586463112c753be6a0112b555f7b7f848cc5c39470ede7701a94f2268d021c1000a45e0b093a5
] 
[add Darcs.Util.Graph.components with properties and tests
Ben Franksen <ben.franksen at online.de>**20190825123434
 Ignore-this: 3d7e63f134e3528d7d1d64973bc32fb8bbd6d5ba174423d72cd2bc34e02251119394633179e0fa59
] 
[replace quickcheck with leancheck for testing Graph properties
Ben Franksen <ben.franksen at online.de>**20190825133104
 Ignore-this: 6ef50b2fd5c131b28df5584f650b525b1e8ed1c5af17dc0a6c0ff4ecfb11022c3286e182fc8fffcd
 
 Calculating graph properties scales very badly because the specifications
 aren't optimised (naturally). Exhaustive testing with leancheck is a lot
 more effective here because we avoid testing with (too) large graphs.
 Unfortunately test-framework is a bit limited in that it doesn't allow to
 scale the number of tests, just to set them to a fixed value. We opt to
 set it to 0x8000 which covers all graphs up to size 6.
] 
[remove Darcs.Util.Graph.bk and some minor refactors
Ben Franksen <ben.franksen at online.de>**20190825123225
 Ignore-this: b3e8e66874b3692e2f417ba3c877d9573b6fc8b39507b1d28aacd80a087cd35705c524039ac64731
] 
[Darcs.Util.Graph: add hadocks
Ben Franksen <ben.franksen at online.de>**20190821084048
 Ignore-this: 7b7931bdd919da44e34ae60340f446783e1b5343dfe3aeca2b241d4b1ee25c7e514c35907bdc60ca
] 
[Darcs.Util.Graph: make helper functions local to ltmis
Ben Franksen <ben.franksen at online.de>**20190821083917
 Ignore-this: 7869236b4f6e283050b2195f54c2465091194278a9b32f210de5c6cb24b2a2f11b1f8b2a402084c6
] 
[Darcs.Util.Graph: add properties and test them
Ben Franksen <ben.franksen at online.de>**20190821104132
 Ignore-this: 51c2f7127ec6bf9366b0afc8a5aee83e602505c16a12d9d69623369cff58365cccef73d31b3bd3b5
] 
[Refactor the commute implementation for NamedPrims
Ganesh Sittampalam <ganesh at earth.li>**20190827113620
 Ignore-this: b1aabe8d5b3340a8a65a636460710dd8
 
 It now just relies on the Ident class instead of the internals.
 This also distinguishes a case that ought to be an internal error,
 but the unit tests seem to rely on it, so this is left as a
 TODO for now.
] 
[make sure we cancel pending download actions at exit
Ben Franksen <ben.franksen at online.de>**20190823093601
 Ignore-this: f68138eaa85e48755be17360846c9ebff2a676dd5c1fd9d57fd3f207cb139118fd7fb5a645d7c860
] 
[TAG 2.15.1
Ben Franksen <ben.franksen at online.de>**20190821065908
 Ignore-this: 4e9190f24c0c02b97865896d38e42743f7276dc9a3b28e0fa2a90086da5d6734cae6224e1a3141b5
] 
Patch bundle hash:
ae715f0c4c7c58149d46bd561bd1a1b3033f5958
-----BEGIN PGP SIGNATURE-----

iHUEAREIAB0WIQS1sLTEOCbYp4iyltnTbkUxbljMlwUCXwnlhwAKCRDTbkUxbljM
l/ljAQDqcVfnG7cXlmIm41z+NT50R9dyeK4F6dJED6ha/rRmVwEA4gZdl0tekLMn
rsJev97wgX/kFiyWhTHKUQ7pDGWF1W4=
=pXbo
-----END PGP SIGNATURE-----


More information about the darcs-devel mailing list