Changes between Version 34 and Version 35 of DarcsEvaluation


Ignore:
Timestamp:
Jul 24, 2008 2:49:20 PM (7 years ago)
Author:
simonmar
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • DarcsEvaluation

    v34 v35  
    249249I can't find a way to do this directly with Mercurial. You can of course do {{{hg rollback}}} and then add a new commit. The Mercurial Queues extension is also able to do this (hg qrefresh) but it is rather complicated to use.
    250250
    251 === Darcs vs Mercurial Overview ===
    252 
    253 Commands somehow different in behaviour between Hg and Darcs:
    254 {{{
    255 darcs whatsnew -> hg diff / hg status
    256 darcs record -> hg commit / hg record (record extension needed to allow cherrypicking)
    257 darcs pull -> hg pull -u / hg pull && hg update (hg pull does not modify the working copy by default)
    258 (automatic merging) -> hg merge && hg commit / hg fetch (fetch extension does pull/update/merge in one step, like Darcs)
    259 darcs unrecord -> hg rollback (works for just the most recent record/push, confusingly different from Darcs equivalent command)
    260 }}}
    261 
    262 Commands that differ essentialy only in name:
    263 {{{
    264 darcs rollback -> hg backout --merge (records an inverse changeset, go back as far as you like)
    265 darcs changes -> hg log
    266 darcs move <FILE> -> hg rename <FILE>
    267 darcs send -o <FILE> -> hg bundle <FILE>
    268 darcs apply <FILE> -> hg unbundle <FILE>
    269 }}}
    270 
    271 Commands the same between Hg and Darcs:
    272 {{{
    273 darcs push -> hg push
    274 darcs add/remove <FILE> -> hg add/remove <FILE>
    275 darcs revert -> hg revert
    276 darcs tag -> hg tag
    277 darcs annotate -> hg annotate
    278 }}}
    279 
    280 {{{hg addremove}}} adds untracked files and marks missing files as removed. hg commit -A does a similar thing at commit time
    281 
    282 Misc. differences from Darcs:
    283 
    284  * Don't have summary/message split: the first line of the message is the summary
    285 
    286  * Files are not automatically considered removed if you delete them. You need to run hg remove --after <FILE> to remove them from the repo as well
    287 
    288 To be able to use all the commands in the example above, you should create a .hgrc file in your home directory, looking something like this:
    289 {{{
    290 [extensions]
    291 hgext.record=
    292 transplant=
    293 
    294 [ui]
    295 username = My Name <[email protected]>
    296 }}}
    297 
    298 Other issues:
    299 
    300  * (Note: not nearly as bad as I first thought, this only applies to the use of an extension called win32text: There appears to be poor support for Windows with the transplant command [http://www.selenic.com/mercurial/bts/issue1077])
    301  
    302  * The transplant command wiki page [http://www.selenic.com/mercurial/wiki/index.cgi/TransplantExtension] contains the text "Three-way merge doesn't cope particularly well with transplanted patches - it will tend to generate false conflicts",
    303    which doesn't fill me with confidence. However, we only want to use transplant to maintain a branch (e.g. 6.8) which we won't merge back into the one we are pulling from (e.g. HEAD), so this may be a non-issue
    304 
    305 Setting up a Mercurial HTTP interface: [http://hgbook.red-bean.com/hgbookch6.html#x10-1310006.6]
    306 
    307 === Darcs / Git Command Comparison ===
    308 
    309 ||{{{darcs whatsnew -s}}}||{{{git status}}}||
    310 ||{{{darcs whatsnew}}}   ||{{{git diff}}}||
    311 ||{{{darcs record}}}     ||{{{git add --patch}}} (goes through all changes)/{{{git add -i}}} (starts with a file-based view) Git add only marks changes for commit.  This can be nicer if you want to check some things first before you commit them.||
    312 || ||{{{git commit}}} (do the actual commit)||
    313 ||{{{darcs record -a -m foo}}}||{{{git commit -a -m foo}}}||
    314 ||{{{darcs pull}}}||{{{git pull}}} then {{{git cherry-pick}}}/{{{gitk}}} + select patches using mouse.  It's probably best to have one local branch correspond to the remote branch and then cherry-pick from that.  You can also create local names for several remote repositories.||
    315 
    316251=== File renames ===
     252
     253We often want to cherry-pick a change where the file has been renamed on one branch or the other.  This should work without any extra intervention from the user, and does under darcs.
    317254
    318255Git doesn't handle file renames well.  Here's a script to demonstrate the problem:
     
    423360}}}
    424361
    425 and, of course, darcs has no difficulty either.
     362
     363=== Darcs vs Mercurial Overview ===
     364
     365Commands somehow different in behaviour between Hg and Darcs:
     366{{{
     367darcs whatsnew -> hg diff / hg status
     368darcs record -> hg commit / hg record (record extension needed to allow cherrypicking)
     369darcs pull -> hg pull -u / hg pull && hg update (hg pull does not modify the working copy by default)
     370(automatic merging) -> hg merge && hg commit / hg fetch (fetch extension does pull/update/merge in one step, like Darcs)
     371darcs unrecord -> hg rollback (works for just the most recent record/push, confusingly different from Darcs equivalent command)
     372}}}
     373
     374Commands that differ essentialy only in name:
     375{{{
     376darcs rollback -> hg backout --merge (records an inverse changeset, go back as far as you like)
     377darcs changes -> hg log
     378darcs move <FILE> -> hg rename <FILE>
     379darcs send -o <FILE> -> hg bundle <FILE>
     380darcs apply <FILE> -> hg unbundle <FILE>
     381}}}
     382
     383Commands the same between Hg and Darcs:
     384{{{
     385darcs push -> hg push
     386darcs add/remove <FILE> -> hg add/remove <FILE>
     387darcs revert -> hg revert
     388darcs tag -> hg tag
     389darcs annotate -> hg annotate
     390}}}
     391
     392{{{hg addremove}}} adds untracked files and marks missing files as removed. hg commit -A does a similar thing at commit time
     393
     394Misc. differences from Darcs:
     395
     396 * Don't have summary/message split: the first line of the message is the summary
     397
     398 * Files are not automatically considered removed if you delete them. You need to run hg remove --after <FILE> to remove them from the repo as well
     399
     400To be able to use all the commands in the example above, you should create a .hgrc file in your home directory, looking something like this:
     401{{{
     402[extensions]
     403hgext.record=
     404transplant=
     405
     406[ui]
     407username = My Name <[email protected]>
     408}}}
     409
     410Other issues:
     411
     412 * (Note: not nearly as bad as I first thought, this only applies to the use of an extension called win32text: There appears to be poor support for Windows with the transplant command [http://www.selenic.com/mercurial/bts/issue1077])
     413 
     414 * The transplant command wiki page [http://www.selenic.com/mercurial/wiki/index.cgi/TransplantExtension] contains the text "Three-way merge doesn't cope particularly well with transplanted patches - it will tend to generate false conflicts",
     415   which doesn't fill me with confidence. However, we only want to use transplant to maintain a branch (e.g. 6.8) which we won't merge back into the one we are pulling from (e.g. HEAD), so this may be a non-issue
     416
     417Setting up a Mercurial HTTP interface: [http://hgbook.red-bean.com/hgbookch6.html#x10-1310006.6]
     418
     419=== Darcs / Git Command Comparison ===
     420
     421||{{{darcs whatsnew -s}}}||{{{git status}}}||
     422||{{{darcs whatsnew}}}   ||{{{git diff}}}||
     423||{{{darcs record}}}     ||{{{git add --patch}}} (goes through all changes)/{{{git add -i}}} (starts with a file-based view) Git add only marks changes for commit.  This can be nicer if you want to check some things first before you commit them.||
     424|| ||{{{git commit}}} (do the actual commit)||
     425||{{{darcs record -a -m foo}}}||{{{git commit -a -m foo}}}||
     426||{{{darcs pull}}}||{{{git pull}}} then {{{git cherry-pick}}}/{{{gitk}}} + select patches using mouse.  It's probably best to have one local branch correspond to the remote branch and then cherry-pick from that.  You can also create local names for several remote repositories.||
     427
    426428
    427429== Darcs alternatives still in the running ==