[darcs-users] darcs patch: split FileName into two modules. (and 1 more)

David Roundy droundy at darcs.net
Fri Sep 26 15:03:29 UTC 2008


Hi all,

Here's a proposed refactor.  It splits up the FileName module, and
deprecates one copy.  I think the long comments speak for themselves.
I'd like to get this into 2.1, just because I'm not entirely
comfortable with how Dmitry's change to drop_dotdots might affect the
darcs internals.  This way we can keep the patch theory itself frozen
unless bugs are found, while still reworking the UI.  And yes,
UglyFileName is a stupid name.  It's supposed to be stupid, so noone
will want to use it.

We could definitely do with a refactor of how
Darcs.Patch.FileName.FileNames are created, since we import fp2fn in
far too many places.  But that's definitely a post-2.1 rewrite.

David

Fri Sep 26 10:45:01 EDT 2008  David Roundy <droundy at darcs.net>
  * split FileName into two modules.
  This duplicates some code, and makes a Darcs.Patch.FileName into the
  module (which FileName originally was) for handling paths within a
  darcs repository.  Code that had gotten agglomerated into this module
  is now in UglyFileName.lhs, which I hope to eliminate.  I went through
  the imports of FileName and tried to separate them between those that
  use FileName to deal with paths in a repository and those that use the
  extra functions what were added there, and those that abuse FileName
  to handle other sorts of paths (absolute paths, in particular).

Fri Sep 26 10:50:13 EDT 2008  David Roundy <droundy at darcs.net>
  * Roll back Dmitry's drop_dotdot change in Darcs.Patch.Filename.  
  
  The key here is that he didn't want to change the internal
  patch-handling code, just the use of drop_dotdots in Darcs.RepoPath,
  which now uses UglyFileName for this purpose (which has Dmitry's code
  in it).
  
  rolling back:
  
  Thu Sep 25 13:57:11 EDT 2008  Dmitry Kurochkin <dmitry.kurochkin at gmail.com>
    * Make FileName.drop_dotdot work with absolute paths.
  
      M ./src/Darcs/Patch/FileName.lhs -7 +12

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: text/x-darcs-patch
Size: 40709 bytes
Desc: A darcs patch for your repository!
Url : http://lists.osuosl.org/pipermail/darcs-users/attachments/20080926/aa80c845/attachment-0001.bin 


More information about the darcs-users mailing list