On 01.07.2011 13:42, Greg Stein wrote:
[...] Please look at
tools/dev/fetch-all-cws.sh. Each of these CWS repositories (on Mac OS)
are consuming 600 Mb *minimum*. I've fetched a dozen, and a couple are
over 2 Gb each, and another over 1 Gb. And this is with the clone/pull
technique.

Because of the disk space demands I think an approach with one repository with one branch per CWS would be better for the initial import. In hg there are more opportunities for this approach (using NamedBranched, UnnamedBranches, MultipleHeads, LocalBranches or Bookmarks) than I as git-fan would care to know. Please see the attached file where I hacked together a script that imports the CWSs into one repository with multiple bookmarks.

I don't have enough space on my laptop to do a complete trial run. I'm
hoping that somebody can figure out how to reduce the disk footprint,
or determine that we just have to suck it up. And it would be nice to
understand what that target size will be, for all 250 CWS
repositories.

As Michael mentioned it's much less than the 250, as only about 15 CWSses (see http://goo.gl/gczAH for details) are marked as fully tested and but not-yet integrated. From these the ones targeted at the stabilization branch (calc67, calc68, ooo34gsl01, ooo34gsl02, writerfilter10, native373, jl167) are more important than the ones targeted for trunk (sb140, sb143, hsqldb19, hr77, ause131, sd2gbuild).

There are a few more very good CWSses which were not yet officially approved in the old OOo system. E.g. CWS aw080 Armin mentioned. If Armin can confirm that this CWS is ready we should pull it in too.

Once we have a better picture of what is ready or not cws-list.txt needs to be updated.

We have a script. It is time to make it work.

Please see the attached file. I'm afraid to check it in as the related single-hg.sh is not yet updated accordingly and also because I'm more of a HG victim than a HG power-user ;-)

Please note that you either have to use HG>=1.8 or enable its bookmark extension before you run the attached script.

Best regards,
Herbert Duerr
#!/bin/sh
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements.  See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership.  The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License.  You may obtain a copy of the License at
#
#   http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied.  See the License for the
# specific language governing permissions and limitations
# under the License.
#

#
# Use this script to fetch all the CWS repositories listed in the
# specified file (typically, cws-list.txt). Before using this script,
# you should have a local Hg repository of the DEV300 repository.
# See http://wiki.services.openoffice.org/wiki/Getting_It.
#
# USAGE:
#   $ ./fetch-all-cws.sh CWS-LIST WORK-DIR
#
#     CWS-LIST is a file containing the list of CWSs to fetch
#       (see the file tools/dev/cws-list.txt)
#     WORK-DIR is the repository where each CWS will be represented as a 
bookmark
#
# The script may be restarted. Each existing CWS will be refreshed,
# and the remaining CWSs will be fetched.
#
# Once the repositories are all fetched, see tools/dev/single-hg.sh to
# combine them into a single repository.
#

if test "$#" != 2; then
  echo "USAGE: $0 CWS-LIST WORK-DIR"
  exit 1
fi

REPOS='http://hg.services.openoffice.org'

# Make the trunk directory, in case it does not exist yet
if test ! -e "$2"; then
  mkdir "$2"
  pushd "$2"
  hg clone -U "$REPOS/DEV300" .
  hg bookmark DEV300
  hg pull -u "$REPOS/OOO340"
  hg bookmark OOO340
  hg update --clean DEV300
  popd
fi

cwsdir=`dirname "$1"`
cwsfile=`basename "$1"`
cwslist=`(cd "$cwsdir" ; pwd)`/$cwsfile

cd "$2"

for cws in `sed -n '/^cws\//s#^cws/##p' $cwslist` ; do

    echo "============ updating bookmark '$cws' from upstream CWS '$cws' ..."
    hg update -C -r "$cws"
    hg pull -u "$REPOS/cws/$cws"
    hg bookmark -r tip "$cws"
    # prepare to restore trunk by forgetting current bookmark
    # see http://www.selenic.com/pipermail/mercurial/2011-January/036883.html
    rm .hg/bookmarks.current
    # restoring trunk to smallest common denominator
    hg update --clean DEV300

done

Reply via email to