Changes between Version 14 and Version 15 of DarcsEvaluation


Ignore:
Timestamp:
Jul 23, 2008 9:40:11 PM (7 years ago)
Author:
igloo
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • DarcsEvaluation

    v14 v15  
    8383 
    8484# repo2's and repo3's file now contains lines 1,3,4,5,7 
     85}}} 
     86 
     87=== Cherry-picking during record === 
     88 
     89In this example, we want to record just the fixes we have made, and not the debugging prints. We want something similar for: 
     90 * reverting just the debugging prints, and not the fixes 
     91 * in the middle of doing a large change, discovering a little bug and wanting to fix and record it 
     92 
     93{{{ 
     94# Make a repo with a single file with lines 1,3,5,7,9 in 
     95 
     96mkdir repo1 
     97cd repo1 
     98darcs init 
     99printf 'Line1\nLine3\nLine5\nLine7\nLine9\n' > file 
     100darcs record --all --look-for-adds -m patch1 -A [email protected] 
     101 
     102# Now we fix a bug, and in the process add some debugging prints. 
     103 
     104printf 'Line1\nFix2\nLine3\nDebug4\nLine5\nFix6\nLine7\nDebug8\nLine9\n' > file 
     105 
     106# We want to record our fix, but not the debugging prints. 
     107 
     108darcs rec -m the_fix 
     109y 
     110n 
     111y 
     112n 
     113 
     114# Get rid of the debug prints 
     115 
     116darcs revert -a 
     117 
     118# Now file contains lines 1,2,3,5,6,7,9 
    85119}}} 
    86120