From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: Re: Git org and Emacs CVS Date: Tue, 29 Apr 2008 07:17:12 +0200 Message-ID: <4DFCF41F-CDE7-42CB-AA67-CF5223909ED1@science.uva.nl> References: <4C4A88DF-79AB-4F59-8CF4-9318FBD098CB@science.uva.nl> <87prtkya6g.fsf@grepfind.mwolson.org> Mime-Version: 1.0 (Apple Message framework v919.2) Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JqiDg-0007af-U8 for emacs-orgmode@gnu.org; Tue, 29 Apr 2008 01:17:37 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JqiDg-0007aQ-04 for emacs-orgmode@gnu.org; Tue, 29 Apr 2008 01:17:36 -0400 Received: from [199.232.76.173] (port=51267 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JqiDf-0007aN-QV for emacs-orgmode@gnu.org; Tue, 29 Apr 2008 01:17:35 -0400 In-Reply-To: <87prtkya6g.fsf@grepfind.mwolson.org> 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: Michael Olson Cc: emacs-orgmode@gnu.org Just did my first sync-from-emacs, seems to have gone all right! Thanks. - Carsten On Mar 24, 2008, at 6:15 AM, Michael Olson wrote: > 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. > > ===== BEGIN file: sync-to-emacs ===== > #!/bin/bash > > # Load common definitions > . scripts/common.defs > > IFS=" > " > > 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 > ===== END file: sync-to-emacs ===== > > ===== BEGIN file: sync-from-emacs ===== > #!/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 > ===== END file: sync-from-emacs ===== > > ===== BEGIN file: common.defs ===== > # Common definitions for syncing ERC -*- Shell-script -*- > > EMACS=~/proj/emacs/emacs/git-emacs > > # Contents > > IMAGES="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="NEWS" > > LISP="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="erc.texi" > ===== END file: common.defs ===== > > 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 :^) > > -- > | Michael Olson | FSF Associate Member #652 | > | http://mwolson.org/ | Hobbies: Lisp, HCoop | > | Projects: Emacs, Muse, ERC, EMMS, ErBot, DVC, Planner | > `-------------------------------------------------------' > _______________________________________________ > 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