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

Re: [PATCH v2 11/13] remote-hg: force remote push

From
Felipe Contreras <felipe.contreras@gmail.com>
Date
Apr 4, 2013, 20:35 UTC
Message-ID
<CAMP44s16Yt0mL8FKXMVgLBXw7s9_S8hGyS0YNHX7GrsAXYNDfg@mail.gmail.com>
In-Reply-To
<87ppyaqcie.fsf@59A2.org>
On Thu, Apr 4, 2013 at 2:14 PM, Jed Brown <jed@59a2.org> wrote:
Show 7 quoted lines
> Felipe Contreras <felipe.contreras@gmail.com> writes:
>
>> If that's the case, they should disable in the server, just like some
>> people disable non-fast-forward pushes in git.
>
> I don't know how to make Hg allow new branches and bookmarks, but not
> new anonymous heads.

It's not possible to push new bookmarks without pushing new heads (unless they are all reusing the same commits), and all the drawbacks of doing that, Merucrial's UI make sure of that.

Show 5 quoted lines
> Vanishly few Hg projects use a workflow anything
> like topic branches so it's normally not a common thing to be creating
> new heads.  If someone is using remote-hg, we can be pretty sure they
> are not the primary maintainer, so if they are pushing, they'll be aware
> of upstream policy and
> will need to play by those rules.
No, we don't. The fact that you say so doesn't make it so.

I create a branch felipec-bookmarks, and I push as many heads as I wish. Who will get affected? Nobody. I already explained that, and you conveniently avoided that paragraph in the reply.

Show 10 quoted lines
>> The problem is Mercurial, purely and simple, without forcing the push,
>> how do you expect this to work?
>>
>> % git clone hg::whatever
>> % git checkout -b feature-a master
>> # do stuff
>> % git push -u origin feature-a
>
> There is a difference between pushing a new branch (see 'hg push
> --new-branch -b branch-name') and creating arbitrary new heads.

feature-a is not a branch, it's a bookmark, and bookmarks cannot be pushed without creating new heads (essentially).

> Normal workflow in case of new commits upstream
And who says we are committing upstream?
> Note: I don't know of any way to avoid the race condition when pushing
> a bookmark that creates a new head since there is no 'hg push --new-bookmark'.

This is not about the race condition, and the race condition cannot be fixed with the current design.

-- 
Felipe Contreras
Previous: Jed BrownNext: Jed Brown
Message 20 of 30 in “remote-hg: general updates”
  1. 00/13 remote-hg: general updatesFelipe Contreras, Apr 4, 2013
  2. 01/13 remote-hg: trivial cleanupsFelipe Contreras, Apr 4, 2013
  3. 02/13 remote-hg: add missing config variable in docFelipe Contreras, Apr 4, 2013
  4. 03/13 remote-hg: properly report errors on bookmark pushesFelipe Contreras, Apr 4, 2013
  5. 04/13 remote-hg: fix for files with spacesFelipe Contreras, Apr 4, 2013
  6. 05/13 remote-hg: make sure fake bookmarks are updatedFelipe Contreras, Apr 4, 2013
  7. 06/13 remote-hg: trivial test cleanupsFelipe Contreras, Apr 4, 2013
  8. 07/13 remote-hg: redirect buggy mercurial outputFelipe Contreras, Apr 4, 2013
  9. Junio C HamanoApr 4, 2013
  10. 08/13 remote-hg: split bookmark handlingFelipe Contreras, Apr 4, 2013
  11. 09/13 remote-hg: refactor exportFelipe Contreras, Apr 4, 2013
  12. 10/13 remote-hg: update remote bookmarksFelipe Contreras, Apr 4, 2013
  13. 11/13 remote-hg: force remote pushFelipe Contreras, Apr 4, 2013
  14. Junio C HamanoApr 4, 2013
  15. Felipe ContrerasApr 4, 2013
  16. Junio C HamanoApr 4, 2013
  17. Jed BrownApr 4, 2013
  18. Felipe ContrerasApr 4, 2013
  19. Jed BrownApr 4, 2013
  20. Felipe ContrerasApr 4, 2013
  21. Jed BrownApr 4, 2013
  22. Felipe ContrerasApr 4, 2013
  23. Jed BrownApr 4, 2013
  24. Felipe ContrerasApr 4, 2013
  25. Joachim SchmitzApr 5, 2013
  26. Jed BrownApr 5, 2013
  27. 12/13 remote-hg: update tags globallyFelipe Contreras, Apr 4, 2013
  28. 13/13 remote-hg: push to the appropriate branchFelipe Contreras, Apr 4, 2013
  29. Junio C HamanoApr 4, 2013
  30. Felipe ContrerasApr 5, 2013

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.