2014-10-26 06:12:44 -04:00
|
|
|
NOTES ON COMMITTING TO EMACS'S REPOSITORY -*- outline -*-
|
2010-05-17 19:52:21 -07:00
|
|
|
|
2014-10-26 07:15:06 -04:00
|
|
|
** elpa
|
|
|
|
|
|
|
|
This branch does not contain a copy of Emacs, but of the Emacs Lisp
|
|
|
|
package archive (elpa.gnu.org). See admin/notes/elpa for further
|
|
|
|
explanation, and the README file in the branch for usage
|
|
|
|
instructions.
|
|
|
|
|
2010-05-17 19:52:21 -07:00
|
|
|
* Install changes only on one branch, let them get merged elsewhere if needed.
|
2014-10-31 11:03:23 +02:00
|
|
|
|
2010-05-17 19:52:21 -07:00
|
|
|
In particular, install bug-fixes only on the release branch (if there
|
|
|
|
is one) and let them get synced to the trunk; do not install them by
|
2014-04-17 14:20:51 -07:00
|
|
|
hand on the trunk as well. E.g. if there is an active "emacs-24" branch
|
|
|
|
and you have a bug-fix appropriate for the next emacs-24.x release,
|
|
|
|
install it only on the emacs-24 branch, not on the trunk as well.
|
2010-05-17 19:52:21 -07:00
|
|
|
|
|
|
|
Installing things manually into more than one branch makes merges more
|
|
|
|
difficult.
|
|
|
|
|
|
|
|
http://lists.gnu.org/archive/html/emacs-devel/2010-03/msg01124.html
|
|
|
|
|
2011-04-25 21:50:33 -07:00
|
|
|
The exception is, if you know that the change will be difficult to
|
|
|
|
merge to the trunk (eg because the trunk code has changed a lot).
|
|
|
|
In that case, it's helpful if you can apply the change to both trunk
|
|
|
|
and branch yourself (when committing the branch change, indicate
|
2015-02-19 17:40:41 +02:00
|
|
|
in the commit log that it should not be merged to the trunk, by
|
|
|
|
including the phrase "Not to be merged to master", or any other phrase
|
|
|
|
that matches "merge").
|
2011-04-25 21:50:33 -07:00
|
|
|
|
2010-05-17 19:52:21 -07:00
|
|
|
* Installing changes from your personal branches.
|
2014-10-26 07:15:06 -04:00
|
|
|
|
2010-05-17 19:52:21 -07:00
|
|
|
If your branch has only a single commit, or many different real
|
|
|
|
commits, it is fine to do a merge. If your branch has only a very
|
|
|
|
small number of "real" commits, but several "merge from trunks", it is
|
|
|
|
preferred that you take your branch's diff, apply it to the trunk, and
|
|
|
|
commit directly, not merge. This keeps the history cleaner.
|
|
|
|
|
2010-05-18 10:38:35 +03:00
|
|
|
In general, when working on some feature in a separate branch, it is
|
|
|
|
preferable not to merge from trunk until you are done with the
|
|
|
|
feature. Unless you really need some change that was done on the
|
|
|
|
trunk while you were developing on the branch, you don't really need
|
|
|
|
those merges; just merge once, when you are done with the feature, and
|
|
|
|
Bazaar will take care of the rest. Bazaar is much better in this than
|
|
|
|
CVS, so interim merges are unnecessary.
|
|
|
|
|
2010-05-17 19:52:21 -07:00
|
|
|
Or use shelves; or rebase; or do something else. See the thread for
|
|
|
|
yet another fun excursion into the exciting world of version control.
|
|
|
|
|
|
|
|
http://lists.gnu.org/archive/html/emacs-devel/2010-04/msg00086.html
|
2011-01-15 13:47:46 -08:00
|
|
|
|
2011-01-17 14:11:13 -08:00
|
|
|
* Installing changes from gnulib
|
2014-10-26 07:15:06 -04:00
|
|
|
|
2011-01-17 14:11:13 -08:00
|
|
|
Some of the files in Emacs are copied from gnulib. To synchronize
|
|
|
|
these files from the version of gnulib that you have checked out into
|
2014-04-17 14:20:51 -07:00
|
|
|
a sibling directory of your branch, type "admin/merge-gnulib"; this
|
2011-01-17 14:11:13 -08:00
|
|
|
will check out the latest version of gnulib if there is no sibling
|
2014-11-11 13:28:02 -05:00
|
|
|
directory already. It is a good idea to run "git status" afterwards,
|
2011-01-17 14:11:13 -08:00
|
|
|
so that if a gnulib module added a file, you can record the new file
|
2014-11-11 13:28:02 -05:00
|
|
|
using "git add". After synchronizing from gnulib, do a "make" in the
|
2011-01-17 14:11:13 -08:00
|
|
|
usual way.
|
|
|
|
|
|
|
|
To change the set of gnulib modules, change the GNULIB_MODULES
|
2014-04-17 14:20:51 -07:00
|
|
|
variable in admin/merge-gnulib before running it.
|
2011-01-17 14:11:13 -08:00
|
|
|
|
2014-04-17 14:20:51 -07:00
|
|
|
If you remove a gnulib module, or if a gnulib module
|
2011-01-17 14:11:13 -08:00
|
|
|
removes a file, then remove the corresponding files by hand.
|
|
|
|
|
2014-04-17 14:20:51 -07:00
|
|
|
* How to merge changes from emacs-24 to trunk
|
2011-01-15 13:47:46 -08:00
|
|
|
|
2014-11-11 13:28:02 -05:00
|
|
|
[The section on git merge procedure has not yet been written]
|
2014-10-26 20:27:55 -04:00
|
|
|
|
2014-11-19 11:29:40 -08:00
|
|
|
Inspect the change log entries (e.g. in case too many entries have been
|
2014-11-11 13:28:02 -05:00
|
|
|
included or whitespace between entries needs fixing). If someone made
|
2014-11-19 11:29:40 -08:00
|
|
|
multiple change log entries on different days in the branch, you may
|
2014-11-11 13:28:02 -05:00
|
|
|
wish to collapse them all to a single entry for that author in the
|
|
|
|
trunk (because in the trunk they all appear under the same date).
|
|
|
|
Obviously, if there are multiple changes to the same file by different
|
|
|
|
authors, don't break the logical ordering in doing this.
|
2014-10-26 20:27:55 -04:00
|
|
|
|
|
|
|
You may see conflicts in autoload md5sums in comments. Strictly
|
|
|
|
speaking, the right thing to do is merge everything else, resolve the
|
|
|
|
conflict by choosing either the trunk or branch version, then run
|
|
|
|
`make -C lisp autoloads' to update the md5sums to the correct trunk
|
|
|
|
value before committing.
|
2011-02-13 18:52:02 -08:00
|
|
|
|
|
|
|
* Re-adding a file that has been removed from the repository
|
|
|
|
|
2014-11-11 13:28:02 -05:00
|
|
|
Let's suppose you've done:
|
2011-02-13 18:52:02 -08:00
|
|
|
|
2014-11-11 13:28:02 -05:00
|
|
|
git rm file; git commit -a
|
2011-02-13 18:52:02 -08:00
|
|
|
|
2014-11-11 13:28:02 -05:00
|
|
|
You can just restore a copy of the file and then re-add it;
|
|
|
|
git does not have per-file history so this will not harm
|
|
|
|
anything.
|
2011-02-13 18:52:02 -08:00
|
|
|
|
2014-11-11 13:28:02 -05:00
|
|
|
Alternatively, you can do
|
2011-02-13 18:52:02 -08:00
|
|
|
|
2014-11-11 13:28:02 -05:00
|
|
|
git revert XXXXX
|
2011-02-13 18:52:02 -08:00
|
|
|
|
2014-11-11 13:28:02 -05:00
|
|
|
where XXXXX is the hash of the commit in which file was removed.
|
|
|
|
This backs out the entire changeset the deletion was part of,
|
|
|
|
which is often more appropriate.
|
2011-05-28 10:46:02 -07:00
|
|
|
|
2012-12-29 10:15:47 -08:00
|
|
|
* Undoing a commit (uncommitting)
|
|
|
|
|
2014-11-11 13:28:02 -05:00
|
|
|
If you have not pushed the commit, you may be able to use `git reset
|
|
|
|
--hard' with a hash argument to revert the your local repo copy to the
|
|
|
|
pre-commit state.
|
2012-12-29 10:15:47 -08:00
|
|
|
|
2014-11-11 13:28:02 -05:00
|
|
|
If you have pushed commit, resetting will be ineffective because it
|
|
|
|
will only vanish the commit in your local copy. Instead, use `git
|
|
|
|
revert', giving it the commit ID as argument. This will create a
|
|
|
|
new commit that backs out the change. Then push that.
|
2012-12-29 10:15:47 -08:00
|
|
|
|
2014-11-11 13:28:02 -05:00
|
|
|
Note that git will generate a log message for the revert that includes
|
|
|
|
a git hash. Please edit this to refer to the commit by the first line
|
|
|
|
of its log comment, or by committer and date, or by something else
|
|
|
|
that is not the hash. As noted previously, it is best to avoid hashes
|
|
|
|
in comments in case we someday have to change version-control systems
|
|
|
|
again.
|
2013-02-16 17:40:14 -08:00
|
|
|
|
|
|
|
* Bisecting
|
|
|
|
|
|
|
|
This is a semi-automated way to find the revision that introduced a bug.
|
2014-11-11 13:28:02 -05:00
|
|
|
Browse `git help bisect' for technical instructions.
|