Bookmarks usage survey

Marcin Kasperski Marcin.Kasperski at mekk.waw.pl
Tue Apr 8 16:02:40 UTC 2014


>
> 1) Do you use bookmarks? How do you use them/what does your workflow
> look like?

Yes. To name short/medium-lived feature branches.

> 2) Are they working well for you? Any pain points?

Yes and no. Main pain points:

- I repeatably forget about -B on push (= forget to publish bookmark
  when created, forget to publish bookmark removal when deleted). I
  would prefer to manage it similarly to branches (to decide on
  bookmark creation whether it is remote or local, and have it
  auto-synced afterwards)

- from time to time bookmarks happen to move when I do not expect them
  to, or not move when I want them to (yes, I am usually guilty, still…)

- I am still not quite sure what to do on bookmark conflicts (the case
  when I move bookmark somewhere and my colleague somewhere else) and
  especially how to clean such mess

- I’d like to be able to merge bookmark to it’s direct parent, even if
  it seems stupid theoretically, just to be able to always close feature
  branches in the same way

- I slightly miss some way to combine bookmark creation with branch
  switching. I mean the case when I use long-lived true branches.

The following scenario should illustrate some points:

a) With feature branches

      hg update stable
      hg branch fix-XYZ
      hack; hack; hg commit; hg commit; ...
      hg push

      # if feature branch lasts longer (and maybe many times)
      hg up fix-XYZ
      hg merge stable
      hg ci -m "Syncing with stable"

      # ... when done and ready to consume and close feature branch
      hg up stable
      hg merge fix-XYZ
      hg commit -m "Integrated fix-XYZ"

b) With feature bookmarks

   # → pain point of branch+bookmark, need to switch branches
      hg update default
      hg merge stable
      hg commit -m "Syncing stable to development"

   # → normal start of development
      hg bookmark fix-XYZ
      hack; hack; hg commit; hg commit
   # → pain point of bookmarks, I repeatably forget to -B, and I forget bookmark names
      hg push -B fix-XYZ

      # if feature branch lasts longer (and maybe many times)
      hg up fix-XYZ
      hg merge stable
      hg ci -m "Syncing with stable"

      # ... when done and ready to consume and close feature branch
      hg up stable
   # → pain point of bookmarks, in this case this works:
      hg merge fix-XYZ
      hg commit -m "Integrated fix-XYZ"
   #    … but if I weren’t using stable branch, but just wanted to merge
   #      back to default, it won’t


Note: main bookmark’s selling point is for me the possibility to fix
mistakes rather easily, would they happen.




More information about the Mercurial mailing list