unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Luke Lee <luke.yx.lee@gmail.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: emacs-devel@gnu.org
Subject: Re: Please don't obsolete "crisp.el"
Date: Mon, 14 Jul 2014 18:29:30 +0800	[thread overview]
Message-ID: <CAA=xLRNdD_n3Y3pZ=8V-t8MW9BSrYDuEahpV0Ep9+H_9kCpgyA@mail.gmail.com> (raw)
In-Reply-To: <jwvbnswja5v.fsf-monnier+emacs@gnu.org>

[-- Attachment #1: Type: text/plain, Size: 4226 bytes --]

>> However, the bad thing is that we can't add "--reverse" to reverse the
>
> Why not?

I should said "it failed". It showed only the last commit. I guess there is
a
bug in git that fail to reverse the history when crisp.el moved from
emulation/
to obsolete/. If we don't add --reverse then it worked perfectly.

>> Another bad thing about "git am" is that it will commit "on top of"
current
>> commit so we'll see a history like the following using "git log":
>
> So, you want to create a brand new empty branch in which you apply the
> patches and then you merge that branch into `elpa'.

Yes, I did tried a few similar methods to create a new branch or remote
repo,
before my last email was sent. But anything related to "git am" did not
work --
there is always a 2014 back to 1997 commit in the history. Today I tried
again
and finally find out the correct parameter: the key to success is:

   git am --committer-date-is-author-date <crisp-patches>
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Before that, only the "filter-branch" method don't have such a reversing
histroy issue. Now we can proceed on using "git am".

>         Stefan "Still believes «too much hassle for too little benefit»"

For me, using git is just like using Emacs, a never ending story of
learning.
So it's always worth it for me to explore more.

IMHO, the only reason to justify this is, like Glenn said, moving one
package
from Emacs to ELPA did not happen before. So I think it should be worth it
to
try some experiments till a proper sequence appears. So that in the future
people could have a procedure to follow -- without too much effort but still
able to produce acceptable result.

Here I conclude my steps to move crisp.el's history from Emacs to ELPA. Feel
free to adjust the steps for landmark.el:

1. Preparing crisp.el history in Emacs repository:
   1.1.  "cd emacs.git"

   1.2.  "git log --follow --name-status lisp/obsolete/crisp.el"
         # We saw crisp.el moved from emulation/ to obsolete/ in the
beginning,
         # Say we tag this commit ID as "last-crisp"

   1.3.  Create a big patch from lisp/emulation:
         "git log -p --pretty=email --reverse --follow
lisp/emulation/crisp.el
          > cirsp-history.patch"
         # Here I saw 56 commits in this big patch

   (1.4) Mangle the commit messages in crisp-history.patch to notify these
         commits comes from Emacs repo.

2. Import crisp.el history into ELPA repository:
   2.1.  Clone an ELPA to "elpa.crisp" directory

   2.2.  "cd elpa.crisp"

   2.3.  Create a new branch with no commits:
         "git checkout --orphan crisp-in-emacs"

   2.4.  Remeber to delete everything for later "git am" to success:
         "git reset --hard"

   2.5.  Import the commit history that we just created, keeping the correct
         commit date/time:
        "git am --committer-date-is-author-date
../emacs.git/crisp-history.patch"

   2.6.  During the process git will pause several times for failing apply
the
         patches. We need to manually fix them. I found all those patch
failure
         are about the copyright message chagne. So I just manually applied
the
         changes and do "git am --continue" to keep going, or do "git am
--skip"
         if those changes are already in place.

   2.7.  Now we've the latest Emacs crisp.el in ELPA/lisp/emulation, now
move it
         to a new package dir:
         "git mv lisp/emulation/crisp.el package/crisp-mode"
         "git commit -m 'Move crisp-mode from Emacs trunk to ELPA'"

   2.8.  Now we're ready to merge it back to master:
         "git checkout master"

   2.9.  "git merge crisp-in-emacs"
         with commit message
         "Merge crisp-mode package from Emacs repository"
         We're done. Now examine the repository history.

   (2.10) (Not done yet) Now push it back with "git push ...".

If everyone is okay with that, I'll commit the merge. Of course, before I
did
that we should have a proper message prefix/postfix the commit messages from
Emacs trunk, to prevent confusing ELPA existing commit log (i.e. the above
skipped step 1.4).

Thanks.
Luke Lee.

[-- Attachment #2: Type: text/html, Size: 5131 bytes --]

  reply	other threads:[~2014-07-14 10:29 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-07  9:13 Please don't obsolete "crisp.el" Luke Lee
2014-07-07 15:58 ` Glenn Morris
2014-07-07 16:36   ` Stefan Monnier
2014-07-08  5:01     ` Luke Lee
2014-07-08 18:42       ` Glenn Morris
2014-07-08 20:04         ` Stefan Monnier
2014-07-09  6:47           ` Luke Lee
2014-07-09 10:39             ` Luke Lee
2014-07-09 13:24             ` Stefan Monnier
2014-07-10  2:43               ` Luke Lee
2014-07-10  6:20                 ` Luke Lee
2014-07-10 13:48                 ` Stefan Monnier
2014-07-10 14:26                 ` Stefan Monnier
2014-07-11 10:03                   ` Luke Lee
2014-07-11 10:32                     ` Yuri Khan
2014-07-14 10:28                       ` Luke Lee
2014-07-11 12:44                     ` Andreas Schwab
2014-07-14 10:30                       ` Luke Lee
2014-07-11 13:32                     ` Stefan Monnier
2014-07-14 10:29                       ` Luke Lee [this message]
2014-07-21  2:26                         ` luke.yx.lee
2014-07-21  4:00                           ` Stefan Monnier
2014-07-12 14:47         ` Stephen Leake

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAA=xLRNdD_n3Y3pZ=8V-t8MW9BSrYDuEahpV0Ep9+H_9kCpgyA@mail.gmail.com' \
    --to=luke.yx.lee@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).