git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Newbie grief

From
Felipe Contreras <felipe.contreras@gmail.com>
Date
May 4, 2012, 20:03 UTC
Message-ID
<CAMP44s2w9B0Jvcn44R5_-ptC=x+5=OgGF0n0SkH+t0JjomXsGA@mail.gmail.com>
In-Reply-To
<4FA2D8EA.7030809@palm.com>
On Thu, May 3, 2012 at 9:13 PM, Rich Pixley <rich.pixley@palm.com> wrote:
Show 7 quoted lines
> This is probably what I'm going to end up using.
>
> Just for comparison, here's a similar process in hg.
>
> Cache server:
>
>  $ hg clone $uri_for_central_repo
% git clone $uri_for_central_repo
> Machine A:
>
>  $ hg clone $uri_for_cache_repo
% git clone $uri_for_cache_repo
>  $ # ...do some work...
>  $ hg push
% git push
> Machine B:
>
>  $ hg clone $uri_for_cache_repo
% git clone $uri_for_cache_repo
>  $ # ...do some work...
>  $ hg push # assume this collides
% git push
Show 5 quoted lines
>  pushing to $uri_for_cache_repo
>  searching for changes
>  abort: push creates new remote head 6d2eb0a6a278!
>  (you should pull and merge or use push -f to force)
>  $ hg push -f # the pull and merge case parallels git, so let's use push -f.
This is stupid, why make everybody else's life difficult? Let's merge here.

% git pull % git push

> Any repo:
>
>  $ hg pull # pulls in all changes including the dual heads
% git pull
>  $ hg merge # collapses the dual heads
>  $ hg commit # commits the merge
>  $ hg push
No need for this, the guy that diverged did this (Machine B).

Plus, what happens if 3 other machines do this? You you have 3 merges, 2 would conflict, and then you would have useless recursive merges, or some people would have to revert. Why bother N people, when one guy can do it at the origin (Machine B)?

> Machine A:
>
>  $ hg pull # pulls in all changes so far
>  $ hg up
% git pull
>  $ #... do some work ...
>  $ hg push
% git push
> Machine B
>
>  $ hg pull
>  $ hg up
% git pull
>  $ # ... do some work ...
>  $ hg push
% git push
> Any repo:
>
>  $ hg pull $uri_to_central_repo
>  $ hg merge
% git pull $uri_to_central_repo
>  $ hg push $uri_to_central_repo
% git push $uri_to_central_repo
>  $ hg push # default is cache repo
% git push
> Machine B:
>
>  $ hg pull
% git pull
Show 6 quoted lines
> Some Conclusions:
>
> * the work flows are similar.
>
> * the hg commands are simpler and have the defaults that we want, primarily
> because no extra branches are required.
Wrong.
> * the hg error messages are straightforward, clear, and don't require any
> deep knowledge of the source code control system or it's limitations.  (I
> still don't understand what the git message on collision is saying.)

Whatever. I don't care what the error message for a merge conflict actually says, all I need to know is that there was a conflict.

> * hg has more options about how to handle the collisions or the merges.
>  While git can mimic some of those options, doing so requires a priori
> knowledge that isn't stored in the source code control system and therefor
> requires a human exchange which is optional with hg.
WTF? git handles collisions just fine.

Actually the git version has less commands. And if configured properly you don't need to specify URLs.

Cheers.
-- 
Felipe Contreras
Previous: Jérôme BenoitNext: Junio C Hamano
Message 95 of 100 in “Newbie grief”
  1. Rich PixleyApr 30, 2012
  2. Seth RobertsonApr 30, 2012
  3. Rich PixleyMay 1, 2012
  4. Junio C HamanoMay 1, 2012
  5. Rich PixleyMay 1, 2012
  6. Sitaram ChamartyMay 1, 2012
  7. Ted Ts'oMay 1, 2012
  8. Sitaram ChamartyMay 1, 2012
  9. Rich PixleyMay 1, 2012
  10. Michael WittenMay 1, 2012
  11. Rich PixleyMay 1, 2012
  12. Jakub NarebskiMay 2, 2012
  13. Randal L. SchwartzMay 1, 2012
  14. Rich PixleyMay 1, 2012
  15. Randal L. SchwartzMay 1, 2012
  16. Junio C HamanoMay 1, 2012
  17. Rich PixleyMay 1, 2012
  18. Randal L. SchwartzMay 1, 2012
  19. Rich PixleyMay 1, 2012
  20. Michael WittenMay 1, 2012
  21. Philip OakleyMay 1, 2012
  22. Hallvard Breien FurusethMay 3, 2012
  23. Rich PixleyMay 3, 2012
  24. Hallvard Breien FurusethMay 3, 2012
  25. Hallvard Breien FurusethMay 3, 2012
  26. Rich PixleyMay 3, 2012
  27. Junio C HamanoMay 3, 2012
  28. Rich PixleyMay 3, 2012
  29. Randal L. SchwartzMay 3, 2012
  30. Junio C HamanoMay 3, 2012
  31. Felipe ContrerasMay 4, 2012
  32. Felipe ContrerasMay 4, 2012
  33. Michael WittenMay 4, 2012
  34. Rich PixleyMay 1, 2012
  35. Randal L. SchwartzMay 1, 2012
  36. Rich PixleyMay 1, 2012
  37. Andreas EricssonMay 1, 2012
  38. PJ WeisbergMay 1, 2012
  39. Rich PixleyMay 3, 2012
  40. Nathan GrayMay 3, 2012
  41. Rich PixleyMay 3, 2012
  42. Randal L. SchwartzMay 3, 2012
  43. Rich PixleyMay 3, 2012
  44. Mark BrownMay 4, 2012
  45. Rich PixleyMay 4, 2012
  46. Jakub NarebskiMay 4, 2012
  47. Mark BrownMay 4, 2012
  48. Hallvard Breien FurusethMay 2, 2012
  49. Michael WittenMay 2, 2012
  50. Hallvard Breien FurusethMay 3, 2012
  51. Randal L. SchwartzMay 3, 2012
  52. Michael WittenMay 3, 2012
  53. Hallvard Breien FurusethMay 3, 2012
  54. Michael WittenMay 3, 2012
  55. Rich PixleyMay 3, 2012
  56. Ted Ts'oMay 3, 2012
  57. Felipe ContrerasMay 1, 2012
  58. Rich PixleyMay 3, 2012
  59. Rich PixleyMay 3, 2012
  60. Andreas EricssonMay 4, 2012
  61. Stephen BashMay 4, 2012
  62. Mark BrownMay 4, 2012
  63. Felipe ContrerasMay 4, 2012
  64. Rich PixleyMay 1, 2012
  65. Jan KrügerApr 30, 2012
  66. Rich PixleyMay 1, 2012
  67. Philippe VaucherMay 2, 2012
  68. Seth RobertsonMay 1, 2012
  69. Rich PixleyMay 1, 2012
  70. Michael WittenMay 1, 2012
  71. Junio C HamanoMay 1, 2012
  72. Michael WittenMay 1, 2012
  73. Rich PixleyMay 1, 2012
  74. Rich PixleyMay 1, 2012
  75. Rich PixleyMay 3, 2012
  76. Ronan KeryellMay 3, 2012
  77. Junio C HamanoMay 3, 2012
  78. Ronan KeryellMay 3, 2012
  79. Rich PixleyMay 3, 2012
  80. Rich PixleyMay 3, 2012
  81. Illia BobyrMay 4, 2012
  82. Nathan GrayMay 4, 2012
  83. Michael WittenMay 4, 2012
  84. Junio C HamanoMay 4, 2012
  85. Carlos Martín NietoMay 4, 2012
  86. Junio C HamanoMay 4, 2012
  87. Junio C HamanoMay 4, 2012
  88. Nathan GrayMay 4, 2012
  89. Illia BobyrMay 4, 2012
  90. Rich PixleyMay 4, 2012
  91. Rich PixleyMay 4, 2012
  92. Michael WittenMay 4, 2012
  93. Andrew SayersMay 4, 2012
  94. Jérôme BenoitMay 4, 2012
  95. Felipe ContrerasMay 4, 2012
  96. Junio C HamanoMay 4, 2012
  97. Felipe ContrerasMay 4, 2012
  98. Rich PixleyMay 4, 2012
  99. Felipe ContrerasMay 4, 2012
  100. Sitaram ChamartyMay 2, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.