[Pkg-bazaar-commits] ./bzr/unstable r47: notes on more good bits from darcs: partial commit, etc

mbp at sourcefrog.net mbp at sourcefrog.net
Fri Apr 10 07:26:28 UTC 2009


------------------------------------------------------------
revno: 47
committer: mbp at sourcefrog.net
timestamp: Tue 2005-03-15 16:03:33 +1100
message:
  notes on more good bits from darcs: partial commit, etc
modified:
  doc/darcs.txt
  doc/thanks.txt
-------------- next part --------------
=== modified file 'doc/darcs.txt'
--- a/doc/darcs.txt	2005-03-09 04:51:05 +0000
+++ b/doc/darcs.txt	2005-03-15 05:03:33 +0000
@@ -17,14 +17,16 @@
 
 Written in Haskell.
 
-Breaking commits into hunks at commit time is interesting, but I think
-not totally necessary.  Sometimes it won't break hunks where you want
-it. 
-
 A really simple pre-commit check hook is remarkably useful.
 
 http://www.scannedinavian.org/DarcsWiki/DifferencesFromArch
 
+
+
+Sometimes useful to be able to set email per-branch, for people who
+work on different projects under different personas.
+
+
 Token replace
 -------------
 
@@ -37,3 +39,33 @@
 
 This can perhaps be inferred by a smart 3-way merge tool.  Certainly
 you could have it do sub-line merges.
+
+Partial commit
+--------------
+
+darcs allows you to commit only some of the changes to a single file.
+This is like the common feature of commiting only a subset of changed
+files, but taken to a higher level.
+
+It is useful more often than one might think: it is common to fix some
+documentation 'on the wing' and while strictly it should be in a
+separate commit it is not always worth the hassle to back out changes,
+fix the docs, then do the real change.  Similarly for making a
+separate branch.
+
+Although the idea is very good, the current darcs implementation is
+limited to selecting by patch hunk, which means that neighbouring
+changes cannot be separated.  Fixing this probably means having some
+kind of pluggable GUI to build the file-to-be-committed or an edited
+patch, possibly using something like meld, emacs, or dirdiff.  Another
+approach some people might like is editing the diff file to chop out
+hunks.
+
+I don't think this needs to be on by default, as it is in darcs.  It
+is usual to commit all the changes.
+
+For this to work safely, it is good to have a commit hook that
+builds/tests the tree.  Of course this needs to be evaluated against
+the tree as it will be committed (taking account of partial commits),
+not the working tree.
+

=== modified file 'doc/thanks.txt'
--- a/doc/thanks.txt	2005-03-14 02:55:39 +0000
+++ b/doc/thanks.txt	2005-03-15 05:03:33 +0000
@@ -17,6 +17,7 @@
 * Faheem Mitha
 * Luke Gorrie
 * Dan Nicolaescu
+* Tim Parkin
 
 Sponsor
 -------



More information about the Pkg-bazaar-commits mailing list