[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Please don't obsolete "crisp.el"

From: Luke Lee
Subject: Re: Please don't obsolete "crisp.el"
Date: Mon, 14 Jul 2014 18:29:30 +0800

>> 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).

Luke Lee.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]