Bug 5872 - bundle made by hg 4.6 has cache:rev-branch-cache property and can't be applied by hg < 4.6
Summary: bundle made by hg 4.6 has cache:rev-branch-cache property and can't be applie...
Status: RESOLVED FIXED
Alias: None
Product: Mercurial
Classification: Unclassified
Component: bundle2 (show other bugs)
Version: 4.6
Hardware: PC Linux
: critical bug
Assignee: Bugzilla
URL:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2018-05-07 13:29 UTC by Kim "Zash" Alvefur
Modified: 2018-05-12 22:28 UTC (History)
5 users (show)

See Also:
Python Version: ---


Attachments
Report from a user on hg 4.3.1 (3.40 KB, text/plain)
2018-05-07 13:29 UTC, Kim "Zash" Alvefur
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Kim "Zash" Alvefur 2018-05-07 13:29 UTC
Created attachment 2006 [details]
Report from a user on hg 4.3.1

$ hg up 4.6
$ make local
$ ./hg bundle --base --all hg.bundle
$ hg up 4.5.3
$ make local
$ ./hg unbundle hg.bundle

abort: hg.bundle-zstd-v2: unknown bundle feature, cache:rev-branch-cache
(see https://mercurial-scm.org/wiki/BundleFeature for more information)

This also produces a nasty traceback when used as clonebundles, see attached log from a user.
Comment 1 Gregory Szorc 2018-05-07 17:20 UTC
This looks to have regressed in or somewhere around the following:

changeset:   40001:b89a7ef29013
user:        Boris Feld <boris.feld@octobus.net>
date:        Wed Feb 21 17:33:00 2018 +0100
summary:     bundle: include advisory rev branch cache part in bundle2 bundle

(Perhaps the "advisory" part isn't as "advisory" as the name implies???)

IMO this is severe enough to warrant an out-of-band 4.6.1 release, as workflows (such as clone bundles) relying on creating bundles on one machine and applying them on another [running an older Mercurial version] are broken as a result of this regression.
Comment 2 Boris Feld 2018-05-08 05:29 UTC
I am writing a patch right now.

Would it be possible to offer a script to change the part mandatory flag on a bundle?
Comment 3 Gregory Szorc 2018-05-08 18:12 UTC
Per IRC, Augie and Martin both agree with me that this warrants an out-of-cycle point release. So I guess that means 4.6.1 will occur sometime in the next few days.
Comment 4 Yuya Nishihara 2018-05-09 07:43 UTC
I doubt if hgtagsfnodes should be mandatory, though the introduction of
the hgtagsfnodes was quite early.

Stream params: {Compression: BZ}
changegroup -- {nbchanges: 4, version: 02} (mandatory: True)
    0a04b987be5ae354b710cefeba0e2d9de7ad41a9
    82e55d328c8ca4ee16520036c0aaace03a5beb65
    132805109513132c8921a917ba691b37984217a8
    cc0e406f56760f314d04ecc85b9b595c1089f199
hgtagsfnodes -- {} (mandatory: True)
cache:rev-branch-cache -- {} (mandatory: False)

FWIW, the help says "a part name with an UPPERCASE letter is mandatory."
It's confusing that "hg debugbundle" shows part name all in lowercase.

https://www.mercurial-scm.org/repo/hg/file/4.6/mercurial/help/internals/bundle2.txt#l94
Comment 5 HG Bot 2018-05-09 07:50 UTC
Fixed by https://mercurial-scm.org/repo/hg/rev/326b174c6a47
Boris Feld <boris.feld@octobus.net>
bundle2: mark the bundle2 part as advisory (issue5872)

It blocks old clients to read bundle including this part.

Differential Revision: https://phab.mercurial-scm.org/D3481

(please test the fix)
Comment 6 Kim "Zash" Alvefur 2018-05-12 12:46 UTC
Bundle exported by hg 4.6+6-edb28a6d95b7 successfully imported by hg 4.5.3