From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Olson Subject: Re: Git org and Emacs CVS Date: Sun, 23 Mar 2008 22:15:35 -0700 Message-ID: <87prtkya6g.fsf@grepfind.mwolson.org> References: <4C4A88DF-79AB-4F59-8CF4-9318FBD098CB@science.uva.nl> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============2088928187==" Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Jdfr5-0004mX-DH for emacs-orgmode@gnu.org; Mon, 24 Mar 2008 02:08:23 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Jdfr3-0004mL-Vd for emacs-orgmode@gnu.org; Mon, 24 Mar 2008 02:08:22 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Jdfr3-0004mI-PO for emacs-orgmode@gnu.org; Mon, 24 Mar 2008 02:08:21 -0400 Received: from main.gmane.org ([80.91.229.2] helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Jdfr3-0002id-3T for emacs-orgmode@gnu.org; Mon, 24 Mar 2008 02:08:21 -0400 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1Jdfqv-0006vF-1D for emacs-orgmode@gnu.org; Mon, 24 Mar 2008 06:08:13 +0000 Received: from cpe-76-173-7-121.socal.res.rr.com ([76.173.7.121]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 24 Mar 2008 06:08:13 +0000 Received: from mwolson by cpe-76-173-7-121.socal.res.rr.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 24 Mar 2008 06:08:13 +0000 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org --===============2088928187== Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" --=-=-= Content-Transfer-Encoding: quoted-printable Carsten Dominik writes: > Hi Leo, > > synching with Emacs still needs special care and I am not yet > experienced enough with git to set up something more automatic. So > not, this will not change anything. Hi Carsten, git does indeed make it easy to merge changes between Emacs 23 and an upstream project. I use it for ERC. One strategy is as follows: - Make a branch called "emacs23" which contains Org exactly as it is in Emacs23, but with the same directory structure as your master branch. - Make a directory called "scripts" in the emacs23 branch that contains two scripts: one to sync changes from Emacs->upstream and one to sync upstream->Emacs. Both operate by copying files into the proper place in the Emacs directory hierarchy. Here are some examples -- modify them to match Org's layout and such. =3D=3D=3D=3D=3D BEGIN file: sync-to-emacs =3D=3D=3D=3D=3D #!/bin/bash # Load common definitions . scripts/common.defs IFS=3D" " for i in $LISP; do cp $i $EMACS/lisp/erc done for i in $MAN; do cp $i $EMACS/doc/misc done for i in $IMAGES; do # Do nothing : done cp ChangeLog* $EMACS/lisp/erc cp $NEWS $EMACS/etc/ERC-NEWS =3D=3D=3D=3D=3D END file: sync-to-emacs =3D=3D=3D=3D=3D =3D=3D=3D=3D=3D BEGIN file: sync-from-emacs =3D=3D=3D=3D=3D #!/bin/bash # Load common definitions . scripts/common.defs (cd $EMACS/lisp/erc && find . -maxdepth 1 -mindepth 1 -type f -exec cp {} $= OLDPWD \;) cp $EMACS/etc/ERC-NEWS NEWS cp $EMACS/doc/misc/erc.texi . rm -f *.elc .cvsignore git diff --stat =3D=3D=3D=3D=3D END file: sync-from-emacs =3D=3D=3D=3D=3D =3D=3D=3D=3D=3D BEGIN file: common.defs =3D=3D=3D=3D=3D # Common definitions for syncing ERC -*- Shell-script -*- EMACS=3D~/proj/emacs/emacs/git-emacs # Contents IMAGES=3D"images/icq-offline.png images/icq-online.png images/irc-offline.png images/irc-online.png images/msn-offline.png images/msn-online.png" NEWS=3D"NEWS" LISP=3D"erc-autoaway.el erc-backend.el erc-button.el erc-capab.el erc-compat.el erc-dcc.el erc-ezbounce.el erc-fill.el erc-goodies.el erc-hecomplete.el erc-ibuffer.el erc-identd.el erc-imenu.el erc-join.el erc-lang.el erc-list.el erc-log.el erc-match.el erc-menu.el erc-netsplit.el erc-networks.el erc-notify.el erc-page.el erc-pcomplete.el erc-replace.el erc-ring.el erc-services.el erc-sound.el erc-speedbar.el erc-spelling.el erc-stamp.el erc-track.el erc-truncate.el erc-xdcc.el erc.el" MAN=3D"erc.texi" =3D=3D=3D=3D=3D END file: common.defs =3D=3D=3D=3D=3D Some scenarios follow. * Capturing changes from Emacs in the emacs23 branch - Switch to the emacs23 branch: git checkout emacs23 - Run the relevant sync script: ./scripts/sync-from-emacs - Use "git add -i" to commit small concise atomic changes until all changes have been recorded. Optionally use the --author argument to "git commit" to capture the name of the author of the original changes. * Syncing changes from Emacs to upstream Org - First do the capturing changes into emacs23 step. - Run "git log" and place its contents into an Emacs buffer. - git checkout master - Cherry pick each commit from emacs23 that you want to migrate upstream by copying its commit ID from the Emacs buffer and doing: git cherry-pick $COMMIT_ID * Syncing changes to Emacs - First do the syncing changes from Emacs step. - Then switch to the emacs23 branch: git checkout emacs23 - Do a simple "git merge master". - Resolve any conflicts. - If new files were added, modify scripts/sync-to-emacs to include them. - Run the sync-to-emacs script: ./scripts/sync-to-emacs - Check in the changes to Emacs using CVS. Or use git, checking in the change locally and then doing "git cvsexportcommit" to migrate that change to CVS. The latter option requires commit access to CVS and use of the read-only public Emacs git repo at http://git.sv.gnu.org/ (not much point to it, other than to automate contact with CVS as much as possible :^) =2D-=20 | Michael Olson | FSF Associate Member #652 | | http://mwolson.org/ | Hobbies: Lisp, HCoop | | Projects: Emacs, Muse, ERC, EMMS, ErBot, DVC, Planner | `-------------------------------------------------------' --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQFH5zj9+1Ho2POo0xkRAqYsAKCRouxaQMk8UDkx1AlGDokB9lOnkQCgtv84 aW7ItXMCOG7iFj7hktdfh48= =uNr0 -----END PGP SIGNATURE----- --=-=-=-- --===============2088928187== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode --===============2088928187==--