Converting from using CVS to hg
Stephen J. Turnbull
stephen at xemacs.org
Wed Jan 30 18:53:07 EST 2008
robert delius royar writes:
> I have 21.5.b28 from CVS which I have kept uptodate. I also have a few
> changes to files in src and lisp for my own use.
>
> I just got a clone of the current tree using
> mv xemacs xemacs-cvs
> hg clone http://hg.debian.org/hg/xemacs/xemacs
> When I want to update the xemacs tree, do I
> cd xemacs
> hg pull http://hg.debian.org/hg/xemacs/xemacs
No, you should do "hg pull -u", which updates the directory from the
default "other repository". This starts out as the repo you cloned,
and won't change unless you edit .hg/hgrc. The update, like CVS,
merges.
> If I am only compiling and using XEmacs--not contributing code, is
> hg still the way I should go?
Yes. Because hg is so much better at branching, what you probably
want to do is to keep a pristine checkout of XEmacs, and a separate
checkout of your changes. so the initial clone would look like
cd $parent
hg clone http://hg.debian.org/hg/xemacs/xemacs
mv xemacs xemacs-upstream
hg clone xemacs-upstream
for f in $files_I_want_to_keep_from_my_version; do
cp f xemacs/$the_right_place
done
cd xemacs
hg commit -m "Bring in my existing local changes."
and your update process would look like:
cd xemacs-upstream
hg pull -u # there should never be any merge conflicts
cd ../xemacs
hg pull -u
# fix any merge conflicts here
# if there were merge conflicts, commit
Alternatively, you could use named branches. Initial clone:
cd $parent
hg clone http://hg.debian.org/hg/xemacs/xemacs
hg branch myxemacs
for f in $files_I_want_to_keep_from_my_version; do
cp f $the_right_place
done
hg commit -m "Bring in my existing local changes."
and update
cd xemacs
hg checkout default
hg pull # no -u because you're just going to overwrite
# again immediately
hg checkout myxemacs
hg merge default
# fix any merge conflicts here
hg commit -m "Merge $date."
(WARNING: The above use of named branches is as yet untested by me!)
More information about the XEmacs-Beta
mailing list