Eric Kow <[email protected]> writes:
>> I'm trying to switch from HG to Darcs, but I'm failing miserably in getting
>> the same productivity. I often do bad checkins with Darcs, merely because
>> the amount of information I get from Darcs is overwhelming and I don't have
>> time to read the details of the large set of commands.
>> With Mercurial, here's my basic workflow:
>>
>> 1) hg st
darcs w -l
>> 2) modify .hgignore to make sure only these files are added that are part of
editor _darcs/prefs/boring
(Or "darcs setpref boring .darcsignore" and "mv _darcs/prefs/boring
.darcsignore", which allows you to version control the boring file.)
>> 3) hg addrem
darcs add -r .
>> 4) hg commit -m "message"
darcs rec -am message
(Or if you skip step #3, change -am to -lam.)
>> 5) hg pull -u
darcs pull -as
Or if you want to use meld as the graphical merge tool:
darcs pull -as --external-merge 'sh -c '\''meld "$1" "$2" "$3" && cp -f "$2"
"$4"'\'' -- %1 %a %2 %o'
Unfortunately you can't just say --external-merge meld, because darcs
expects a fourth "copy the merge file to this place" argument. So our
merge command is a two-command shell script that runs meld, then does
the copy.
You can make that enabled by default by adding the following line to
~/.darcs/defaults (create it if it doesn't exist):
pull external-merge sh -c "meld \"$1\" \"$2\" \"$3\" && cp -f \"$2\"
\"$4\"" -- %1 %a %2 %o
>> 6) hg commit -m "merged"
darcs rec -am merged
Note that if there are no conflicts, Darcs considers that there is
no "merging" step to record. This is different to hg.
Also note that "hg fetch" will combine pull -u and commit, using an
automated commit message.
>> hg push
darcs push -as
>> It would be nice to know how to do this using darcs, or if a better way
>> exists using darcs, that would be handy too :)
As for "better" ways, I generally prefer not to use the -l and -a
switches you see above. So rather than doing an "hg diff" to check what
I'm going to commit, then running "hg ci", I instead will just run
"darcs record" and use "q" if I am not ready to check in.
Also, "hg record" is interactive like "darcs record", but it breaks the
mtime metadata on files and generally annoys me (no bac[k] key).
_______________________________________________
darcs-users mailing list
[email protected]
http://lists.osuosl.org/mailman/listinfo/darcs-users