Hi!

----

Below are (draft) instructions to move our current Subversion-based
ksh93-integratino update1 prototype012 tree to OS/Net's Mercurial HEAD
(shell is either ksh88 or ksh93):
-- snip --
hg init
hg pull ssh://anon at hg.opensolaris.org/hg/onnv/onnv-gate
hg checkout

mkdir tmp
cd tmp
svn diff -r 1175:HEAD
svn://svn.genunix.org/on/branches/ksh93/gisburn/prototype012 >xxx.diff
cd ..

# generate list of files which get patched
cat ./tmp/xxx.diff | egrep "^\+\+\+ " | awk "{ print \$2 }"
>patched_files.txt

# create list of dirs which get patched
cat patched_files.txt | while read i ; do dirname "$i" ; done | sort -u
>patched_dirs.txt

# create dirs and add them to subversion
cat patched_dirs.txt | while read i ; do print "## $i" ; mkdir -p "$i" ;
done
(cat patched_dirs.txt | while read i ; do print "## $i" ; hg add "$i" ;
done) 2>&1 | tee -a hgadddirslog.txt

# check log for problems
less hgadddirslog.txt

# apply the patch
gpatch -p0 <./tmp/xxx.diff >patch.log

# fix rejects by hand (no orejects found in this case)

# add/remove patched files to subversion
$ (cat patched_files.txt | while read i ; do print "## $i" ; if [[ -s
"$i" ]] ; then hg add "$i" ; else hg remove --force "$i" ; fi ; done)
2>&1 | tee -a hgfileadd.log

# add binary files which were "missing" in the diff
cd usr/src/lib/libshell/misc/
svn export
http://svn.genunix.org/repos/on/branches/ksh93/gisburn/prototype012/usr/src/lib/libshell/misc/images
hg add $(find images)
cd ../../../../..
-- snip --

I'm still running tests but it seems that's more or less the complete
set of instructions.

GIT-like diff for ksh93-intergation update1 against Mercurial HEAD can
be found at
http://www.opensolaris.org/os/project/ksh93-integration/downloads/svn_1175_1185_to_hg_diff_20080825.diff.txt
(MD5 checksum daf513bc78f21bfedd51c65e942a237a).

----

Bye,
Roland

-- 
  __ .  . __
 (o.\ \/ /.o) roland.mainz at nrubsig.org
  \__\/\/__/  MPEG specialist, C&&JAVA&&Sun&&Unix programmer
  /O /==\ O\  TEL +49 641 3992797
 (;O/ \/ \O;)

Reply via email to