From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: phillip.lord@russet.org.uk (Phillip Lord) Newsgroups: gmane.emacs.devel Subject: Re: ELPA contributions? Date: Mon, 12 Oct 2015 21:54:46 +0100 Message-ID: <87lhb7kdt5.fsf@russet.org.uk> References: <87612g5tmx.fsf@fencepost.gnu.org> <87io6cl0hx.fsf@russet.org.uk> <87lhb8ulex.fsf@ericabrahamsen.net> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1444684451 16857 80.91.229.3 (12 Oct 2015 21:14:11 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 12 Oct 2015 21:14:11 +0000 (UTC) Cc: emacs-devel@gnu.org To: Eric Abrahamsen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Oct 12 23:14:00 2015 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ZlkPv-0008KA-3x for ged-emacs-devel@m.gmane.org; Mon, 12 Oct 2015 23:13:59 +0200 Original-Received: from localhost ([::1]:58816 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZlkPu-0002RZ-E8 for ged-emacs-devel@m.gmane.org; Mon, 12 Oct 2015 17:13:58 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46454) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZlkPk-0002HK-Ox for emacs-devel@gnu.org; Mon, 12 Oct 2015 17:13:49 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZlkPh-000788-KV for emacs-devel@gnu.org; Mon, 12 Oct 2015 17:13:48 -0400 Original-Received: from cheviot12.ncl.ac.uk ([128.240.234.12]:56074) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZlkPh-00076i-Bj for emacs-devel@gnu.org; Mon, 12 Oct 2015 17:13:45 -0400 Original-Received: from smtpauth-vm.ncl.ac.uk ([10.8.233.129] helo=smtpauth.ncl.ac.uk) by cheviot12.ncl.ac.uk with esmtp (Exim 4.63) (envelope-from ) id 1ZlkPf-0001pC-Bt; Mon, 12 Oct 2015 22:13:43 +0100 Original-Received: from cpc6-benw10-2-0-cust45.gate.cable.virginm.net ([92.238.179.46] helo=localhost) by smtpauth.ncl.ac.uk with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.63) (envelope-from ) id 1ZlkPf-0007xN-4a; Mon, 12 Oct 2015 22:13:43 +0100 In-Reply-To: <87lhb8ulex.fsf@ericabrahamsen.net> (Eric Abrahamsen's message of "Mon, 12 Oct 2015 09:00:22 -0700") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 128.240.234.12 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:191402 Archived-At: Eric Abrahamsen writes: >> Still, having said all of this, I have a workflow which works using >> :external branches, and which works whether or not you have commit >> access to the "main" repository. I'll try and write this up at some >> point. I'd love someone to do the same for subtrees, so I can see >> whether that would have been the right way to go in the first place. > > Here's from my notes on how I'm supposed to merge the Gnorb package into > ELPA. I started using git subtree because it seemed conceptually like > the right thing. It turned out to be pretty complicated (because I > didn't understand it well) and I still feel a sense of dread every time > I go to update the package. I wish there were a simpler way. > > I added a local git repo as a remote ("gnorb") to the elpa repo. Pulling > from the external repo goes: > > git fetch gnorb > git subtree pull --squash --prefix=packages/gnorb gnorb master > > Pushing from the ELPA repo to the gnorb remote (I tried this because > Stefan made some changes directly in the packages): > > git subtree push --squash --prefix=packages/gnorb gnorb master > > This is followed by an expletive-filled paragraph of notes. I'm not sure > pushing to the remote ever actually worked. I also tried something > called "split branch", which barfed several pages of output into my > shell, to what end I'm still not sure. Hmmm. Well, with dash, I've used an external branch. I've set up remotes like so. elpa git.sv.gnu.org:/srv/git/emacs/elpa.git (fetch) elpa git.sv.gnu.org:/srv/git/emacs/elpa.git (push) origin git@github.com:magnars/dash.el.git (fetch) origin git@github.com:magnars/dash.el.git (push) pwl git@github.com:phillord/dash.el.git (fetch) pwl git@github.com:phillord/dash.el.git (push) Now, I have commit access to ELPA, but read-only access to github. My workflow (which I normally do in magit, so the commands here are approximations!) is something like this. To get changes from github to ELPA, git pull origin master git push -v --dry-run elpa master:refs/heads/externals/dash (without the dry-run!). Then to get changes from ELPA back to github I do: git branch fix/something-from-elpa git pull elpa externals/dash git push pwl Then I can open a PR from pwl to dash, which gets merged in. The commits all match up so the ELPA change gets pulled then pushed to github, then eventually pulled then pushed from github back to ELPA, but it all works. At least so far. I've done the last bit once so far. I have no idea what to do if Magnar ever bounces a PR. I use a similar workflow for pabbrev, except that I have write access both sides. > In the end, when I wanted to get changes from ELPA into my external > repo, I think it worked okay to simply throw a patch over and apply it > there. There's no actual correspondence between commit SHAs in ELPA and > the remote, so simply having the files in the same state is good enough. > > But basically it felt like I was going to have to learn all of the > internals of git to do this with any sort of confidence. I share the same feeling. The bit that scares me is pushing to ELPA. Everything else is disposable. If I pull the wrong thing (like elpa/master) to local, then I can just delete and start again. If I push the wrong thing to phillord/dash.el that's more of a pain, but not a disaster. But if I push my local master to the elpa master branch (rather than externals) I do not know what will happen, but I suspect it will be bad. Phil