unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Git transition checklist
@ 2014-01-08 13:52 Eric S. Raymond
  2014-01-08 14:59 ` Stefan Monnier
                   ` (6 more replies)
  0 siblings, 7 replies; 130+ messages in thread
From: Eric S. Raymond @ 2014-01-08 13:52 UTC (permalink / raw)
  To: emacs-devel

This post rounds up all the issues I know about with the bzr to git
changeover and their current state.  A revised transition checklist
is included at the end.

Eli Zaretski recommended, and Stefan Monnier endorsed, the following
preparatory steps for the transition to git:

> 5. Have the procedures and the recommended workflows described on the
>    wiki, similar to what was done with bzr migration.

That is now done.  I have created two new pages on EmacsWiki,
GitForEmacsDevs and GitQuickStartForEmacsDevs. These are adapted from
the corresponding *Bzr* pages but describe git commands to perform
equivalent operations.

The only omission is that I left out the git equivalent of bzr bundle.
There is such a feature in git, but it is one of the historical
fossils in the system and rarely enough used that I wouldn't want to
rely on it not bitrotting.  Git practice has moved decisively to (a)
mailing around patch sets produced by git format-patch, and (b)
github/gitorious-style merge requests.

An interesting side effect of doing this translation, by the way, is
that I now know the exact git-command equivalents for the recommended
workflow in Bazaar.  Rather to my surprise, the git procedures are
simpler!

I'm surprised at this because Bazaar, whatever its other failings, had
a reputation as being simpler to use than git which I believed was
deserved. But, at least for the workflows described, git avoids so
much complexity and ceremony by not having the branch-vs.-repo
distinction that the gain from this swamps git's other UI
shortcomings.

> 6. Describe (and test if needed) the procedure for migrating local
>    bzr branches into git without losing history (yes, I have a
>    couple in the works), and describe that on the wiki as well.

That's easy.  Make a patch sequence from your bzr branch using sendto
- the format is compatible with GNU patch.  git checkout the branch
name at the equivalent point in the git repo.  Use GNU patch to apply.
Fill in change comments as required.

I don't think this really belongs on the wiki, as it's a one-shot
transition issue probably affecting only a few people and possibly
only you. But if you think it needs describing there, go to it.

> 7. What about the mail messages to emacs-diffs mailing list?  That
>    should be working as well, and support pushes to non-trunk
>    branches.

That is trivial in git.  Andreas can set it up in minutes.  I could too,
but I don't have write access to the repo hook files.

> 8. There's the emacs-bzr-version whose value gets copied into the bug
>    reports.  This should be replaced by the suitable git equivalent,
>    or else the bug reports (of which we have quite a few each day)
>    will not identify the version correctly.

Proof of concept (tested):

(defun emacs-repository-get-version (&optional dir)
  "Try to return as a string the version-control revision of the Emacs sources.
Value is nil if the sources do not seem to be under version
control, or if we could not determine the revision.  Note that
this reports on the current state of the sources, which may not
correspond to the running Emacs.

Optional argument DIR is a directory to use instead of `source-directory'."
  ;; This is the only function that knows what VCS the Emacs sources are under.
  (let ((here default-directory))
    (cd (or dir (setq dir source-directory))) 
    (message "Waiting for git...")
    (with-temp-buffer
      (if (zerop
           (call-process "git" nil '(t nil) nil "describe" "--tags"))
         (buffer-string)))
    (cd here)))

Replacing the function emacs-bzr-get-version with this will rectify a
design error; it callers knew the string "bzr", which they should not have -
they didn't care what the VCS was as long as they could back some 
version cookie to embed in bug reports.

This code is simpler than emacs-bzr-get-version because "git describe" is
very fast - there's no need to avoid calling it for better performance.

The change to integrate this and fix its callers is easy, five minutes'
work which I will cheerfully do immediately after the repo switchover.
No need to do it before as it really only becomes crucial to have this
working for the next point release.

Stefan Monnier added these:

- Improve vc-git.el so that it can automatically enable smerge-mode when
  opening a conflicted file and (probably conditional on a config var)
  mark the file as "not conflicted any more" when saving with no
  remaining diff3 markers.
  This currently works in vc-bzr.el (and vc-svn.el as well, IIRC).

- Improve vc-git.el with vc-git-conflicted-files so that
  vc-find-conflicted-files works for Git as well.

Thierry Volpiatto pointed out that these issues are addressed now:
"You can use git-mergetool with ediff-merge for this" he said, 
and gave a recipe.

Better cross-VCS integration of smerge mode would be nice but is not a
git-vs.bzr issue - rather it's a feature request against VC which,
as VC's maintainer, I take note of and will address after the switchover.

- Release 24.4 (i.e. I'd rather not deal with the move before we
  release 24.4).

That seems completely reasonable to me.

Nobody else explicitly suggested any additional preconditions. Andreas
Schwab did, however, observe this:

>A good way to identify a git branch is to use git describe.  However it
>prefers to have an annotated (release) tag available to base on, which
>we currently don't have (bzr doesn't have the concept of annotated
>tags).

This should be fixed.  Each Emacs release should be marked with an 
annotated tag, and annotations should be retconned onto the historical
releases.  This is basic good Git practice; it helps guard against attacks
by trojaned versions of the public releases.

So, here is the revised operation sequence for the changeover.

0. Before changeover, we prepare a shellscript that creates annotated
   cryptosigned tags for the historical versions. (This will require
   Stefan to create an "Emacs maintainer" GPG identity if none exists.)

1. Wait on 24.4 release and Stefan's go signal.

2. Andreas announces on the dev list that the changeover is beginning.

3. Andreas turns off bzr commit mirroring (and disables the bzr repo).

4. Andreas enters a small documentation commit recording the changeover.

5. Andreas installs a commit hook that mails notifications to the emacs-diffs
   mailing list

6. Stefan applies the script to make cryptosigned historical release tags.

7. Andreas announces on the dev list that the git repo is live for
   developer pushes.

8. I replace emacs-bzr-version with emacs-repository-get-version.

9. I mark the wiki pages on Bzr obsolete and update the Git ones.

10. I will do the work required to update /etc and /admin to reflect
    git use over the following few days.

11. (Later, lower priority.) I arrange better cross-VCS integration of smerge
    in vc.el.

That's it, I think.  Currently I see only two blockers on the process:
(a) 24.4 needs to ship, and (b) somebody needs to write the script to 
map the existing lightweight release tags to cryptosigned annotated tags. 
I'll work on that.
-- 
		<a href="http://www.catb.org/~esr/">Eric S. Raymond</a>

Our society won't be truly free until "None of the Above" is always an option.



^ permalink raw reply	[flat|nested] 130+ messages in thread

end of thread, other threads:[~2014-01-31  0:41 UTC | newest]

Thread overview: 130+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-08 13:52 Git transition checklist Eric S. Raymond
2014-01-08 14:59 ` Stefan Monnier
2014-01-08 16:35   ` Rüdiger Sonderfeld
2014-01-08 17:12     ` Stefan Monnier
2014-01-08 18:08       ` Rüdiger Sonderfeld
2014-01-08 18:21         ` Improved git commit emails [was Re: Git transition checklist] Glenn Morris
2014-01-08 18:31           ` Ted Zlatanov
2014-01-08 18:37             ` Improved git commit emails Glenn Morris
2014-01-08 21:04               ` Ted Zlatanov
2014-01-12  5:44                 ` Bob Proulx
2014-01-13  2:22                   ` Glenn Morris
2014-01-15  2:10                     ` Bob Proulx
2014-01-15  7:35                       ` Glenn Morris
2014-01-20  1:09                         ` Bob Proulx
2014-01-20  2:16                           ` Stephen J. Turnbull
2014-01-20  4:27                             ` Bob Proulx
2014-01-22 19:20                           ` Glenn Morris
2014-01-23 18:42                           ` Rüdiger Sonderfeld
2014-01-28 23:45                             ` Bob Proulx
2014-01-29  0:57                               ` Glenn Morris
2014-01-31  0:41                                 ` Bob Proulx
2014-01-08 16:48   ` Git transition checklist Eric S. Raymond
2014-01-08 17:19     ` Stefan Monnier
2014-01-08 18:43       ` Andreas Schwab
2014-01-08 19:02         ` Glenn Morris
2014-01-08 19:07           ` Eric S. Raymond
2014-01-08 19:17       ` Eric S. Raymond
2014-01-08 17:49     ` Glenn Morris
2014-01-08 18:02   ` Eli Zaretskii
2014-01-08 18:17     ` David Engster
2014-01-08 18:36       ` Eli Zaretskii
2014-01-08 19:07         ` Andreas Schwab
2014-01-08 19:16         ` David Engster
2014-01-08 18:41     ` Andreas Schwab
2014-01-08 18:48       ` Eli Zaretskii
2014-01-08 19:19         ` Andreas Schwab
2014-01-08 15:02 ` Stephen Berman
2014-01-08 16:26   ` Eric S. Raymond
2014-01-08 16:37     ` Git repack on Savannah [was: Re: Git transition checklist] James Cloos
2014-01-12  6:11       ` Bob Proulx
2014-01-12 15:59         ` Eli Zaretskii
2014-01-08 15:33 ` Git transition checklist Bastien
2014-01-08 16:19   ` Eric S. Raymond
2014-01-08 16:20     ` Bastien
2014-01-08 17:48     ` Glenn Morris
2014-01-08 18:15       ` Dani Moncayo
2014-01-08 18:22         ` Glenn Morris
2014-01-08 18:23       ` Andreas Schwab
2014-01-08 18:26         ` Glenn Morris
2014-01-08 18:50           ` Stefan Monnier
2014-01-08 19:00             ` Glenn Morris
2014-01-08 19:41               ` Stefan Monnier
2014-01-08 19:11           ` Andreas Schwab
2014-01-08 19:16             ` Glenn Morris
2014-01-08 19:46               ` Stefan Monnier
2014-01-08 23:07               ` Dani Moncayo
2014-01-12 20:15     ` Bob Proulx
2014-01-13 10:50       ` Bastien
2014-01-08 15:34 ` Bastien
2014-01-08 16:13   ` Eric S. Raymond
2014-01-08 17:47 ` Glenn Morris
2014-01-08 20:02   ` Eric S. Raymond
2014-01-08 20:19     ` Eli Zaretskii
2014-01-08 21:10       ` Andreas Schwab
2014-01-09  0:54         ` James Cloos
2014-01-09  1:23           ` Rüdiger Sonderfeld
2014-01-09  6:38             ` Eli Zaretskii
2014-01-09  0:51       ` James Cloos
2014-01-09  1:36       ` Rüdiger Sonderfeld
2014-01-09  1:48         ` Rüdiger Sonderfeld
2014-01-09  6:41           ` Eli Zaretskii
2014-01-09 11:10             ` Andreas Schwab
2014-01-09 16:17               ` Eli Zaretskii
2014-01-09 16:45                 ` Rüdiger Sonderfeld
2014-01-09 17:44                   ` Eli Zaretskii
2014-01-09 11:53             ` Rüdiger Sonderfeld
2014-01-09  1:53       ` Glenn Morris
2014-01-09  2:13         ` Glenn Morris
2014-01-09 12:14           ` Eric S. Raymond
2014-01-09 14:55             ` Paul Eggert
2014-01-09 15:15               ` Eric S. Raymond
2014-01-09 15:24                 ` Juanma Barranquero
2014-01-09 16:45                   ` Eric S. Raymond
2014-01-09  2:12     ` Glenn Morris
2014-01-09  4:27       ` Stephen J. Turnbull
2014-01-09  7:05         ` Eli Zaretskii
2014-01-09  8:14           ` Stephen J. Turnbull
2014-01-09 11:22             ` Andreas Schwab
2014-01-09 14:30               ` Stephen J. Turnbull
2014-01-09 14:58                 ` David Kastrup
2014-01-09 16:58                 ` Eli Zaretskii
2014-01-09 18:46                   ` Stephen J. Turnbull
2014-01-09 19:03                     ` Eli Zaretskii
2014-01-09 19:40                       ` Óscar Fuentes
2014-01-09 19:47                         ` Eli Zaretskii
2014-01-09 20:12                           ` Óscar Fuentes
2014-01-09 20:17                             ` Glenn Morris
2014-01-09 20:29                             ` Eli Zaretskii
2014-01-09 21:49                               ` Óscar Fuentes
2014-01-10  6:38                                 ` Eli Zaretskii
2014-01-11  9:14                   ` Eli Zaretskii
2014-01-11 20:09                     ` Glenn Morris
2014-01-11 20:32                       ` David Kastrup
2014-01-12 10:30                         ` Jorgen Schaefer
2014-01-13 22:34                           ` Barry Warsaw
2014-01-13 17:06                       ` Glenn Morris
2014-01-13 17:50                         ` David Kastrup
2014-01-14 17:05                           ` Richard Stallman
2014-01-09 15:12         ` Stefan Monnier
2014-01-09 15:33           ` Andreas Schwab
2014-01-08 18:14 ` Eli Zaretskii
2014-01-08 18:29   ` Glenn Morris
2014-01-08 18:39     ` Eli Zaretskii
2014-01-08 18:46       ` Eli Zaretskii
2014-01-08 20:17         ` David Kastrup
2014-01-08 19:03     ` Andreas Schwab
2014-01-08 18:45   ` Achim Gratz
2014-01-08 18:52     ` Eli Zaretskii
2014-01-08 19:15       ` Achim Gratz
2014-01-08 19:00   ` Andreas Schwab
2014-01-08 20:11   ` Eric S. Raymond
2014-01-08 20:22     ` Eli Zaretskii
2014-01-08 20:28       ` Eric S. Raymond
2014-01-08 21:04         ` Eli Zaretskii
2014-01-08 21:26           ` Eric S. Raymond
2014-01-09  6:25             ` Eli Zaretskii
2014-01-08 21:47       ` David Kastrup
2014-01-08 20:52 ` Eli Zaretskii
2014-01-08 21:07   ` Stefan Monnier
2014-01-08 21:22     ` Eli Zaretskii

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