D6776: bookmarks: validate changes on push (issue6193) (BC)

durin42 (Augie Fackler) phabricator at mercurial-scm.org
Wed Sep 11 14:07:32 EDT 2019


durin42 added a comment.


  We're really close. I've uploaded my rebase of this to the latest dev hg (along with some minor test fixes). There's now only one failure:
  
    --- /Users/augie/Programming/hg/crew/tests/test-bookmarks-pushpull.t
    +++ /Users/augie/Programming/hg/crew/tests/test-bookmarks-pushpull.t#b2-binary.err
    @@ -820,15 +820,17 @@
       pushing to http://localhost:$HGPORT/
       searching for changes
       no changes found
    -  updating bookmark Z
    -  [1]
    +  remote: push rejected: bookmark "Z" has changed
    +  remote: (run 'hg pull', resolve conflicts, and push again)
    +  abort: push failed on remote
    +  [255]
       $ hg book -d Z
       $ hg in -B http://localhost:$HGPORT/
       comparing with http://localhost:$HGPORT/
       searching for changed bookmarks
          @                         9b140be10808
          X                         9b140be10808
    -     Z                         0d2164f0ce0d
    +     Z                         9b140be10808
          foo                       000000000000
          foobar                    9b140be10808
       $ hg pull -B Z http://localhost:$HGPORT/
    @@ -853,7 +855,7 @@
        * @                         1:9b140be10808
          X                         1:9b140be10808
          Y                         4:c922c0139ca0
    -     Z                         2:0d2164f0ce0d
    +     Z                         1:9b140be10808
          foo                       -1:000000000000
          foobar                    1:9b140be10808
     
    
    ERROR: test-bookmarks-pushpull.t#b2-binary output changed
  
  My gut at this point is that we should:
  
  1. Document that legacy bookmark push behavior over pushkey is different
  2. Add a config to reject bookmark pushes over pushkey
  
  But if there's a way to fix the pushkey behavior too, I'd be interested in that. I'm just not sure it's worth blocking on when that should only matter with very old servers. Obviously if others have stronger opinions they should speak up.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D6776/new/

REVISION DETAIL
  https://phab.mercurial-scm.org/D6776

To: idlsoft, #hg-reviewers, durin42
Cc: durin42, valentin.gatienbaron, mercurial-devel


More information about the Mercurial-devel mailing list