The current bzr eclass uses EBZR_FETCH_CMD="bzr checkout --lightweight"
to initially fetch the sources.
The problem with this is though it saves some time and bandwidth on the
initial fetch it actually ends up using a lot more time and bandwidth
on every update.
Ok great  I can set EBZR_FETCH_CMD="bzr checkout".
This solves the initial fetch problems.
Now when I try and update the bzr eclass function bzr_fetch() has this
bit of code in it.

# Run bzr_initial_fetch() only if the branch has not been pulled
# before or if the existing local copy is a full checkout (as did
# an older version of bzr.eclass)
if [[ ! -d ${EBZR_BRANCH_DIR} ]] ; then
        bzr_initial_fetch "${EBZR_REPO_URI}" "${EBZR_BRANCH_DIR}"
elif [[ -d "${EBZR_BRANCH_DIR}"/.bzr/repository/ ]]; then
        einfo "Re-fetching the branch to save space..."
        rm -rf "${EBZR_BRANCH_DIR}"
        bzr_initial_fetch "${EBZR_REPO_URI}" "${EBZR_BRANCH_DIR}"
else
        bzr_update "${EBZR_REPO_URI}" "${EBZR_BRANCH_DIR}"
fi

Since I did a full checkout with the EBZR_FETCH_CMD="bzr checkout"
it now deletes the entire previous checked out branch (to save disk space ?) 
and proceeds to fetch the entire
source again.
Why would I ever want to do that ? The whole point of bzr is to save bandwidth 
not disk space.
Is there a way arouund this ?


Reply via email to