[Bug 5165] New: can't push long bookmark names with bundle2

mercurial-bugs at selenic.com mercurial-bugs at selenic.com
Wed Mar 30 12:19:06 UTC 2016


https://bz.mercurial-scm.org/show_bug.cgi?id=5165

            Bug ID: 5165
           Summary: can't push long bookmark names with bundle2
           Product: Mercurial
           Version: 3.7.3
          Hardware: PC
                OS: Mac OS
            Status: UNCONFIRMED
          Severity: bug
          Priority: wish
         Component: Mercurial
          Assignee: bugzilla at selenic.com
          Reporter: mkoconnor at gmail.com
                CC: mercurial-devel at selenic.com

I believe it's the case that there's generally no restriction on the length of
bookmark names, however trying to push bookmarks of length >255 results in an
exception being raised.

$ export LONG_BOOKMARK=a$(seq -s '' 300)
$ hg init repo1
$ hg clone repo1 repo2
$ cd repo2
$ touch a; hg commit -Am a
adding a
$ hg book ${LONG_BOOKMARK}
$ hg push -B ${LONG_BOOKMARK}
pushing to /Users/michaeloconnor/repo1
searching for changes
** unknown exception encountered, please report by visiting
** https://mercurial-scm.org/wiki/BugTracker
** Python 2.7.10 (default, Oct 23 2015, 19:19:21) [GCC 4.2.1 Compatible Apple
LLVM 7.0.0 (clang-700.0.59.5)]
** Mercurial Distributed SCM (version 3.7.3)
** Extensions loaded:
Traceback (most recent call last):
...
  File
"/usr/local/Cellar/mercurial/3.7.3/lib/python2.7/site-packages/mercurial/bundle2.py",
line 936, in getchunks
    paramsizes = _pack(_makefpartparamsizes(len(parsizes) / 2), *parsizes)

The issue can at least currently be worked around by not using bundle2 to push
bookmarks.

$ cat > /tmp/long_bookmarks.py <<EOF
def uisetup(ui):
    import mercurial.exchange as exchange
    exchange.b2partsgenorder.remove('bookmarks')
    del exchange.b2partsgenmapping['bookmarks']
EOF
$ hg --config extensions.long_bookmarks=/tmp/long_bookmarks.py push -B
${LONG_BOOKMARK}
pushing to /Users/michaeloconnor/repo1
searching for changes
adding changesets
adding manifests
adding file changes
added 1 changesets with 1 changes to 1 files
exporting bookmark a1234...

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the Mercurial-devel mailing list