Thursday, September 24, 2015

darcs hacking sprint 9 report

After a one year and a half absence, the Darcs Hacking Sprint returned!

Once again, the event occurred at the IRILL (Innovation and Research Initiative for Free Software) in Paris, on September 18th to 20th.

The sprint had 7 participants: Danill Frumin, Eric Kow, Florent Becker, Ganesh Sittampalam, Guillaume Hoffmann, Thomas Miedema and Vinh Dang.

Darcs and GHC 8

Thomas Miedema is a Haskell and GHC hacker, and came on the first day of the sprint. Since Darcs is a system that aims at supporting the various GHC versions out there, Thomas helped us preparing for GHC 8, the next major version. He explained us one issue of GHC 8 that got triggered by Darcs: a bug with the PatternSynonyms extension. Fortunately it seems that the bug will be fixed in GHC HEAD. (First release candidate is planned for December).


Thomas explaining PatternSynonyms to Eric and Ganesh

Diving into SelectChanges and PatchChoices code

On the first day I (Guillaume) claimed the "rollback takes ages" bug, which made me look into SelectChanges and PatchChoices code. The result is that I still haven't yet fixed the bug, but I discovered that patch matching was unnecessarily strict, which I could fix easily. Internally, there are two interesting patch types when it comes to matching:
  • NamedPatch: represent the contents of a patch file in _darcs/patches, that is, its info and its contents
  • PatchInfoAnd: represents the info of a patch as read from an inventory file (from _darcs/inventories or _darcs/hashed_inventory) and a lazy field to its corresponding NamedPatch.
Now, getting the NamedPatch for some patch is then obviously more costly than a PatchInfoAnd. You may even have to download the patch file in order to read it (in the case of lazy repositories). Moreover,  the majority of matchers only need the patch info (or metadata), not its actual contents. Only two matchers (hunk and touch) need to actually read the patch file, while matching or a patch name for instance (probably the most common operation) does not.

So, before the sprint, as soon as you wanted to match on a patch file, you had to open (and maybe download) its file, even if this was useless. With my change (mostly in Darcs.Patch.Match) we gained a little more laziness; and the unreasonably slow command "rollback -p ." passes from 2 minutes to ~15 seconds on my laptop. I hope to push this change into Darcs 2.10.2.

Eric, Guillaume and Vinh

Now, the real source of the "rollback -p ." slowness is that patch selection is done on FL's (Forward List), while commands like rollback and obliterate naturally work backwards in time on RL. Currently, an RL is inverted and then given to the patch selection code, which is not convenient at all! Moreover, the actual representation of history of a Darcs repository is (close to being) an RL. So it seems like a proper fix for the bug is to generalize the patch selection code to also work on RL's; which may involve a good amount of typeclass'ing in the relevant modules. I think this will be too big/risky to port to the 2.10 branch, so it will wait for Darcs 2.12.

Ganesh's new not-yet-officially-named stash command


A few days before the sprint, Ganesh unveiled his "stash" branch. It feature a refactoring that enables to suspend patches (ie, put them into a state such that they have no effect in the working copy) but without changing their identity (which is currently what occurs with the darcs rebase command). This enables to implement a git-stash-like feature.

The sprinters (IRL and on IRC) discussed the possible name of the command that should encapsulate this stash feature. More importantly, on the last day we discussed what would be the actual UI of such a feature. As always when a new feature is coming to darcs, we want to make the UI as darcsy as possible :-)

Coming back to the code, Ganesh's refactoring, if extensive, will also simplify the existing types for suspended patches. We decided to go with it.

Dan's den


Dan demonstrating den (on the left: Florent)
Daniil Frumin was this years Google Summer of Code student for Darcs. Mentored by Ganesh, he brought improvements to Darcsden, many of them being already deployed. Among them, it is possible to launch a local instance of Darcsden (using an executable called den), not unlike Mercurial's "serve" command.

Dan tells more about his work and this sprint in his latest blog post.

A better website and documentation

As a newcomer to the project, Vinh took a look at the documentation, especially the website of the project. He implemented changes to make the front page less intimidating and more organized. He also had a fresh look at our "quickstart" and proposed improvements which we felt were much needed!

Florent's projects

For this sprint, Florent was more an external visitor than a Darcs hacker. He talked about one of his current projects: Pijul, a version control system with another approach. Check out their website!

Conclusion and the next sprint

In the end this sprint turned out to be more productive and crowded than we initially thought! It has been a lot of time since the previous one, so we had a lot of things to share at first. Sprints do make synchronization between contributors more effective. They are also a moment when we can get more concentrated on the Darcs codebase, and spend more time tacking some issue.

Avenue d'Italie, Paris
We would like to thank the IRILL people for hosting the sprint for the third time and our generous donators to make travelling to sprints easier.

We already have a time and a place for the next sprint: Sevilla, Spain in January 2016! The exact moment will be announced later, but you can already start organizing yourself and tell us if you're going.

Thomas, Eric and Ganesh
From left to right: Vinh, Florent, Dan, Ganesh and Eric

Tuesday, September 1, 2015

Darcs News #111

News and discussions

  1. The next Darcs Sprint will take place in Paris on September 18-20th. Please add yourself to the wiki page if you're going!
  2. Darcs 2.10.1 has been released (bugfixes, dependency versions bump):

Issues resolved (19)

issue2102 Guillaume Hoffmann
issue2307 Daniil Frumin
issue2308 Ben Franksen
issue2327 Alain91
issue2420 Ben Franksen
issue2421 Guillaume Hoffmann
issue2423 Alain91
issue2433 Guillaume Hoffmann
issue2438 Guillaume Hoffmann
issue2444 Ben Franksen
issue2446 Guillaume Hoffmann
issue2447 Ben Franksen
issue2448 Gian Piero Carrubba
issue2449 Ganesh Sittampalam
issue2451 Ben Franksen
issue2457 Ben Franksen
issue2461 Ben Franksen
issue2461 Ben Franksen
issue2463 Joachim Breitner

Patches applied (145)

See darcs wiki entry for details.

Thursday, July 9, 2015

darcs 2.10.1 release

Hi all,

The darcs team is pleased to announce the release of darcs 2.10.1 !

Downloading

The easiest way to install darcs 2.10.1 from source is by first installing the Haskell Platform (http://www.haskell.org/platform). If you have installed the Haskell Platform or cabal-install, you can install this release by doing:

$ cabal update
$ cabal install darcs-2.10.1

Alternatively, you can download the tarball from http://darcs.net/releases/darcs-2.10.1.tar.gz and build it by hand as explained in the README file.

The 2.10 branch is also available as a darcs repository from http://darcs.net/releases/branch-2.10

What's new in darcs 2.10.1 (since darcs 2.10.0)



  • support terminfo 0.4, network 2.6, zlib 0.6, quickcheck 2.8 and attoparsec 0.13
  • errorDoc now prints a stack trace (if profiling was enabled) (Ben Franksen)
  • beautified error messages for command line and default files (Ben Franksen)
  • generalized doFastZip for darcsden support
  • fixed the following bugs:
    • issue2449: test harness/shelly: need to handle mis-encoded/binary data (Ganesh Sittampalam)
    • issue2423: diff only respecting --diff-command when a diff.exe is present (Alain91)
    • issue2447: get contents of deleted file (Ben Franksen)
    • issue2307: add information about 'darcs help manpage' and 'darcs help markdown' (Dan Frumin)
    • issue2461: darcs log --repo=remoterepo creates and populates _darcs (Ben Franksen)
    • issue2459: cloning remote repo fails to use packs if cache is on a different partition (Ben Franksen)

Feedback

If you have an issue with darcs 2.10.1, you can report it on http://bugs.darcs.net/ . You can also report bugs by email to bugs@darcs.net, or come to #darcs on irc.freenode.net.

Sunday, April 19, 2015

darcs 2.10.0 release

Hi all,

The darcs team is pleased to announce the release of darcs 2.10.0.

Downloading

The easiest way to install darcs 2.10.0 from source is by first installing the Haskell Platform (http://www.haskell.org/platform). If you have installed the Haskell Platform or cabal-install, you can install this release by doing:

$ cabal update
$ cabal install darcs-2.10.0

Alternatively, you can download the tarball from http://darcs.net/releases/darcs-2.10.0.tar.gz and build it by hand as explained in the README file.

The 2.10 branch is also available as a darcs repository from http://darcs.net/releases/branch-2.10

Feedback

If you have an issue with darcs 2.10.0, you can report it via the web on http://bugs.darcs.net/ . You can also report bugs by email to bugs at darcs.net, or come to #darcs on irc.freenode.net.

What's new since darcs 2.8.5

New features

  • darcs rebase: enable deep amending of history (Ganesh Sittampalam)
  • darcs pull --reorder: keep local-only patches on top of mainstream patches (Ale Gadea, Ganesh Sittampalam)
  • darcs dist --zip: generate a zip archive from a repository (Guillaume Hoffmann)
  • patch bundle contexts are minimized by default. Enables bundles to be applied to more repositories. (Guillaume Hoffmann)
  • darcs convert export/import for conversion to/from VCSes supporting the fast-export protocol (Petr Rockai, Owen Stephens, Guillaume Hoffmann, Lele Gaifax, Ben Franksen)
  • darcs test --backoff: exponential backoff test strategy, faster than bisect on big repositories (Michael Hendricks)
  • work normally on sshfs-mounted repositories (Nathaniel Filardo)
  • automatic detection of file/directory moves, and of token replaces (Jose Neder)
  • patience diff algorithm by default (Jose Neder)
  • interactive mode for whatsnew (Dan Frumin)
  • tag --ask-deps to create tags that may not include some patches (Ganesh Sittampalam)

User Interface

  • add a last question after all patches have been selected to confirm the whole selection (Florent Becker)
  • command names:
    • clone is the new name of get and put
    • log is the new name of changes
    • amend is the new name of amend-record
  • show output of log into a pager by default (Guillaume Hoffmann)
  • the output of log is more similar to git's:
    • show patch hash in UI (hash of the patch's metadata)
    • put author and date on separate lines (Guillaume Hoffmann)
  • enable to match on patch hash prefix with -h and --hash (Guillaume Hoffmann, Gian Piero Carrubba)
  • better messages:
    • better error messages for http and ssh errors (Ernesto Rodriguez)
    • init, add, remove, move and replace print confirmation messages (Guillaume Hoffmann)
  • rollback only happens in the working copy (Florent Becker, Guillaume Hoffmann)
  • darcs send no longer tries to send a mail by default (Eric Kow)
  • when no patch name given, directly invoke text editor (Jose Neder, Guillaume Hoffmann)
  • use nano as default text editor instead of vi (Guillaume Hoffmann)
  • keep log files for patch name and mail content in _darcs (Ale Gadea)
  • optimize and convert are now supercommands (Guillaume Hoffmann)
  • improve darcs help environment and darcs help markdown (Radoslav Dorcik, Guillaume Hoffmann)
  • warn about duplicate tags when creating a new one (Ale Gadea)
  • allow darcs mv into known, but deleted in working, file (Owen Stephens)
  • improve--not-in-remote, allowing multiple repos and use default (Owen Stephens)

Performance

  • faster darcs diff (Petr Rockai)
  • faster log and annotate thanks to patch index data structure (BSRK Aditya, Benedikt Schmidt, Eric Kow, Guillaume Hoffmann, Ganesh Sittampalam)
  • faster push via ssh by using compression (Ben Franksen)
  • cloning to an ssh destination (formerly darcs put) is more efficient (Guillaume Hoffmann)
  • faster internal representation of patch hashes (Guillaume Hoffmann)
  • when cloning from http, use packs in a more predictable way (Guillaume Hoffmann)
  • store global cache in bucketed format (Marcio Diaz)
  • require and support GHC 7.4 to 7.10 (Ganesh Sittampalam)
  • replace type witness CPP macros with plain Haskell (Eric Kow)
  • hashed-storage is bundled into darcs (Ganesh Sittampalam)
  • replace C SHA256 bindings with external libraries (Ganesh Sittampalam)
  • move the bits of the datetime package we need into Darcs.Util.DateTime (Ganesh Sittampalam)
  • build Darcs once rather than thrice. (Eric Kow)
  • remove home page and manual from darcs' repository (Guillaume Hoffmann)
  • run tests through cabal test (Ryan Desfosses)
  • run fewer darcs-1 related tests in testsuite (Ganesh Sittampalam)
  • Use custom replHook to fix cabal repl (Owen Stephens)
  • darcs.cabal: make Haskell2010 the default-language for all stanzas (Ben Franksen)
  • always compile with mmap support (Ganesh Sittampalam)
  • new options subsystem (Ben Franksen)
  • various cleanups, code restructurations and refactoring, haddocks (Will Langstroth, Owen Stephens, Florent Becker, Guillaume Hoffmann, Michael Hendricks, Eric Kow, Dan Frumin, Ganesh Sittampalam)

Issues resolved in Darcs 2.10

  • issue346: implement "patience diff" from bzr (Jose Neder)
  • issue642: Automatic detection of file renames (Jose Neder)
  • issue822: generalized the IO Type for better error messages and exception handling (Ernesto Rodriguez)
  • issue851: interactive mode for whatsnew (Dan Frumin)
  • issue904: Fix record on Linux/FUSE/sshfs (fall back to sloppy locks automatically) (Nathaniel Filardo)
  • issue1066: clone to ssh URL by locally cloning then copying by scp (Guillaume Hoffmann)
  • issue1268: enable to write darcs init x (Radoslav Dorcik)
  • issue1416: put log files in tempdir instead of in working dir (Ale Gadea)
  • issue1514: send --minimize-context flag for send (Guillaume Hoffmann)
  • issue1624: bucketed cache (Marcio Diaz)
  • issue1828: file listing and working --dry-run for mark-conflicts (Guillaume Hoffmann)
  • issue1987: Garbage collection for inventories and patches (Marcio Diaz)
  • issue2181: put cache in $XDG_CACHE_HOME (~/.cache by default) (Guillaume Hoffmann)
  • issue2193: make that finalizeTentativeChanges no longer run tests (Guillaume Hoffmann)
  • issue2198: move repo testing code to Darcs.Repository.Test (Guillaume Hoffmann)
  • issue2200: darcs replace complains if no filepaths given (Owen Stephens)
  • issue2204: do not send mail by default (Eric Kow)
  • issue2237: prevent patch index creation for non-hashed repos (Owen Stephens)
  • issue2235: Accept RFC2822 dates (Dave Love)
  • issue2246: add default boring entry for emacs session save files (Owen Stephens)
  • issue2253: attempting to use the patch index shouldn't create it on OF repos (Owen Stephens)
  • Issue2278: Document default value for --keep-date / --no-keep-date (Mark Stosberg)
  • issue2199: getMatchingTag needs to commute for dirty tags (Ganesh Sittampalam)
  • issue2247: move patch index creation into the job running code (Ganesh Sittampalam)
  • issue2238: let optsModifier remove all occurrences of LookForAdds (Gian Piero Carrubba)
  • issue2236: make 'n' an alias for 'q' in lastregret questions (Gian Piero Carrubba)
  • issue2155: Expurgate the non-functional annotate --xml-output option (Dave Love)
  • issue2248: always clean up rebase-in-progress state (Ganesh Sittampalam)
  • issue2270: fixed darcs changes -i --only-to-files (Sebastian Fischer)
  • issue2282: don't allow remote operations to copy the rebase patch (Ganesh Sittampalam)
  • issue2287: obliterate -O doesn't overwrite existing file. (Radoslav Dorcik)
  • issue2227: move the rebase patch to the end before an amend-record (Ganesh Sittampalam)
  • issue2277: rebase suspend and unsuspend supports --summary. (Radoslav Dorcik)
  • issue2311: posthook for 'get' should run in created repo (Sebastian Fischer)
  • issue2312: posthooks for 'record' and 'amend-record' should receive DARCS_PATCHES (Sebastian Fischer)
  • issue2163: new option for amend, select author for patch stealing. (Radoslav Dorcik)
  • issue2321: when no patch name given, directly invoke text editor (Jose Neder)
  • issue2320: save prompted author name in ~/.darcs/author instead of ./_darcs/prefs/author (Jose Neder)
  • issue2250: tabbing in usageHelper - pad by max length of command name (BSRK Aditya)
  • issue2309: annotate includes line numbers (Owen Stephens)
  • issue2334: fix win32 build removing file permission functions (Guillaume Hoffmann)
  • issue2343: darcs amend-record does not record my change (Jose Neder)
  • issue2335: one liner when adding tracked files if not verbose (Guillaume Hoffmann)
  • issue2313: whatsnew -l: Stack space overflow (Jose Neder)
  • issue2347: fix amend-record --prompt-long-comment (Guillaume Hoffmann)
  • issue2348: switch to cabal's test framework (Ryan Desfosses)
  • issue2209: Automatically detect replace (Jose Neder)
  • issue2332: ignore case of characters in prompt (Guillaume Hoffmann)
  • issue2263: Option --set-scripts-executable is not properly documented (Ale Gadea)
  • issue2367: rename amend-record to amend, make --unrecord more visible (Guillaume Hoffmann)
  • issue2345: solution using cabal's checkForeignDeps (Dan Frumin)
  • issue2357: switching to regex-compat-tdfa for unicode support (Dan Frumin)
  • issue2379: only use packs to copy pristine when up-to-date (Guillaume Hoffmann)
  • issue2365: correctly copy pristine in no-working-dir clones (Guillaume Hoffmann)
  • issue2244: darcs tag should warn about duplicate tags (Ale Gadea)
  • issue2364: don't break list of 'bad sources' (Sergei Trofimovich)
  • issue2361: optimize --reorder runs forever with one repository (Ale Gadea)
  • issue2364: fix file corruption on double fetch (Sergei Trofimovich)
  • issue2394: make optimize a supercommand (Guillaume Hoffmann)
  • issue2396: make convert a supercommand and enhance help strings (Guillaume Hoffmann)
  • issue2314: output-auto-name in defaults file (Ben Franksen)
  • issue2388: check if inventories dir has been created (Owen Stephens)
  • issue2249: Rename isFile to isValidLocalPath and WorkRepoURL to WorkRepoPossibleURL (Mateusz Lenik)
  • issue2153: allow skipping backwards through depended-upon patches (Andreas Brandt)
  • issue2380: allow darcs mv into known, but deleted in working, file (Owen Stephens)
  • issue2403: need to avoid moving the rebase patch to the end (Ganesh Sittampalam)
  • issue2409: implement darcs rebase apply (Ganesh Sittampalam)
  • issue2385: invoke pager without temporary file (Guillaume Hoffmann)
  • issue2333: better error message when pushing and darcs not in path (Ben Franksen)

Known issues

These are known new issues in darcs 2.10.0:
  • issue2269: rebase should warn about stolen patches at suspend, not unsuspend
  • issue2272: darcs rebase unsuspend should automate or semi-automate handling unrecorded changes
  • issue2276: darcs rebase unsuspend needs UI improvements for "You are not... Amend anyway?"
  • issue2359: convert --export mishandles Unicode filenames
  • issue2372: Please remove "HINT: I could not reach..." message
  • issue2423: diff only respecting --diff-command when a diff.exe is present
  • issue2436: rollback --patches takes ages before first prompt
  • issue2445: internal error if suspended patch is pulled into repository again
  • issue2449: test harness/shelly: need to handle mis-encoded/binary data

Wednesday, March 4, 2015

Darcs News #110

News and discussions

  1. The Darcs 2.10 release is near! Please test the release branch and tell us if you find a bug.
  2. Joachim Breitner has shut down his darcswatch service after 7 years of activity:

Issues resolved (11)

issue822 Ernesto Rodriguez
issue2260 Ganesh Sittampalam
issue2385 Guillaume Hoffmann
issue2410 Guillaume Hoffmann
issue2411 Guillaume Hoffmann
issue2414 Guillaume Hoffmann
issue2418 Guillaume Hoffmann
issue2422 Ganesh Sittampalam
issue2427 Ben Franksen
issue2431 Ben Franksen
issue2432 Ganesh Sittampalam
issue2437 Guillaume Hoffmann

Patches applied (111)

See darcs wiki entry for details.

Followers