... | ... | @@ -53,39 +53,39 @@ ToDo. Compare workflows using darcs with the same workflow in other systems. |
|
|
This is how we maintain the stable GHC branch. Particular fixes are pulled from the HEAD. When the desired patches don't depend on undesired patches, darcs takes care of this automatically, as demonstrated below. Otherwise, with darcs, the patch has to be merged by hand.
|
|
|
|
|
|
```wiki
|
|
|
# Make a repo with a single file with lines 1,3,5,7 in
|
|
|
# Make a repo with a single file with lines 1,3,5,7 in
|
|
|
|
|
|
mkdir repo1
|
|
|
cd repo1
|
|
|
darcs init
|
|
|
printf 'Line1\nLine3\nLine5\nLine7\n' > file
|
|
|
darcs record --all --look-for-adds -m patch1 -A igloo@earth.li
|
|
|
cd ..
|
|
|
mkdir repo1
|
|
|
cd repo1
|
|
|
darcs init
|
|
|
printf 'Line1\nLine3\nLine5\nLine7\n' > file
|
|
|
darcs record --all --look-for-adds -m patch1 -A igloo@earth.li
|
|
|
cd ..
|
|
|
|
|
|
# Check out 2 copies of the repo
|
|
|
# Check out 2 copies of the repo
|
|
|
|
|
|
darcs get repo1 repo2
|
|
|
darcs get repo1 repo3
|
|
|
darcs get repo1 repo2
|
|
|
darcs get repo1 repo3
|
|
|
|
|
|
# Add a patch that adds lines 2 and 6, then another that adds line 4
|
|
|
# Add a patch that adds lines 2 and 6, then another that adds line 4
|
|
|
|
|
|
cd repo1
|
|
|
printf 'Line1\nLine2\nLine3\nLine5\nLine6\nLine7\n' > file
|
|
|
darcs record --all -m patch2
|
|
|
printf 'Line1\nLine2\nLine3\nLine4\nLine5\nLine6\nLine7\n' > file
|
|
|
darcs record --all -m patch3
|
|
|
cd repo1
|
|
|
printf 'Line1\nLine2\nLine3\nLine5\nLine6\nLine7\n' > file
|
|
|
darcs record --all -m patch2
|
|
|
printf 'Line1\nLine2\nLine3\nLine4\nLine5\nLine6\nLine7\n' > file
|
|
|
darcs record --all -m patch3
|
|
|
|
|
|
# Pull the line 4 patch, but not the lines 2 and 6 patch, into the
|
|
|
# other repos non-interactively and interactively
|
|
|
# Pull the line 4 patch, but not the lines 2 and 6 patch, into the
|
|
|
# other repos non-interactively and interactively
|
|
|
|
|
|
cd ../repo2
|
|
|
darcs pull --all --patches patch3
|
|
|
cd ../repo3
|
|
|
darcs pull
|
|
|
n
|
|
|
y
|
|
|
cd ../repo2
|
|
|
darcs pull --all --patches patch3
|
|
|
cd ../repo3
|
|
|
darcs pull
|
|
|
n
|
|
|
y
|
|
|
|
|
|
# repo2's and repo3's file now contains lines 1,3,4,5,7
|
|
|
# repo2's and repo3's file now contains lines 1,3,4,5,7
|
|
|
```
|
|
|
|
|
|
## Darcs alternatives still in the running
|
... | ... | |