This patch adds support for EBZR_OFFLINE and ESCM_OFFLINE to bzr.eclass, in a method similar to git.eclass and svn.eclass.
Created attachment 200050 [details, diff] patch for bzr.eclass
Seems ok for me. I have one question, though. Has anyone documented ${ESCM_OFFLINE}? From the use and name, I get the impression it's meant to be an SCM-agnostic variable, but a grep on /gentoo-x86/eclass only returns the use in both git and subversion eclasses, but no documentation about it.
(In reply to comment #2) > Seems ok for me. I agree here. > I have one question, though. Has anyone documented ${ESCM_OFFLINE}? From the > use and name, I get the impression it's meant to be an SCM-agnostic variable, > but a grep on /gentoo-x86/eclass only returns the use in both git and > subversion eclasses, but no documentation about it. Maybe ask in -dev?
*** Bug 280854 has been marked as a duplicate of this bug. ***
Ok, there were no objections, so I just committed the patch. Thank you very much for your patience and support.
It doesn't work: In spite of EBZR_OFFLINE being set to a non-empty value, it's still accessing the network during "bzr export". This is with EBZR_FETCH_CMD left at its default value, i.e. "lightweight" checkout.
More findings (all tests are with the GNU Emacs repo and a 2 Mbit/s connection): With --lightweight option: bzr checkout: 11 minutes bzr update: < 1 minute (for unchanged repo) bzr export: 54 minutes (also for subsequent updates!) repo size: 116 MB Without --lightweight option: bzr checkout: 48 minutes bzr update: < 1 minute bzr export: < 1 minute repo size: 327 MB Looks like we shouldn't use export in the case of lightweight checkouts? Replacing it by "cp -RP -p" seems to have no adverse effects in the case of Emacs.
Created attachment 212915 [details, diff] Proposed patch for bzr.eclass Attached patch should fix the export issue and the issue from bug 296733.
Created attachment 213031 [details, diff] Proposed patch for bzr.eclass Simplified logic when to use "rsync" and when "bzr export". I also think we don't need the einfo message about the revision, because "bzr update" outputs it already (and if we are offline the revision isn't available).
(In reply to comment #9) > Created an attachment (id=213031) [details] > Proposed patch for bzr.eclass Committed.