On Sun, 2003-02-09 at 02:17, Steve Youngs wrote:
|--==> "VS" == Ville Skytt <Ville> writes:
VS> At this point, I think this would be the best way to proceed:
Yep, looks good. I generally do my syncing like this:
1) diff -urNb xemacs-pkg-src/ upstream-src/ > initial-patch.diff
I use that as a starting point and reference if I need it. I *don't*
send 'initial-patch.diff' to xemacs-patches, it's only for my own
personal use to aid in syncing.
This is pretty much where I start too. Additionally, I try to arrange
upstream-src/ so that the directory layout matches the XEmacs one before
doing the diff. And I don't use the -N switch there, I prefer to handle
new/removed files outside of the patch.
From this point on, my process is somewhat similar to Steve's, but
I
like to more work by hand, using the diff file generated above in
diff-mode, I like it.
For each hunk, I do a C-c C-t just for kicks and to get the source file
to scroll to the point where the hunk is supposed to apply, and to
verify that it actually does.
I usually start with syncing trivial and obvious changes, such as
whitespace, typo fixes etc. I split the diff hunks with C-c C-s where
necessary, and apply the hunks I'm comfortable with using C-c C-a. Be
aware that if you split the hunks using diff-mode, the resulting diff
won't necessarily be patch(1) compatible any more, but diff-mode will
work just fine.
Whenever a hunk has been applied, I kill it from the diff with M-k and
move on to the next one. Every now and then I save the diff as well as
files with applied hunks. This makes it possible to checkpoint a sync
and continue later.
After the trivial changes have been taken care of, there's the first
chance of committing the changes. This depends on how big the sync is,
it may ease reviewers work later when the "meat" from the patch is about
to be applied.
Then, I move on to processing new files (ie. ones that are in
upstream-src/ only). I copy them one by one to xemacs-pkg-src/, read
'em through and apply the changes from the diff that are required by the
new files. Usually, whenever a new file will be added, action is
required on Makefile and package-info.in too. Ditto for removed files.
With removed ones, more care is needed since we package extra files in
some packages (ie. ones that aren't present in the upstream pkg), eg.
psgml-html.el in the PSGML package.
Next, I iterate through the remaining diff, usually applying closely
related things in one pass, and studying the changes. Paying extra
attention to the "XEmacs change" notes is a good idea here. If my eyes
catch a dependency on a new package here, I add it to Makefile
(REQUIRES) "on the fly".
When I'm finished with the diff, or earlier from a "checkpoint", I start
test building the package, according to Steve's post (step 7 and the
ones after it). One good addition to this list is to build the package
"alone", eg:
cd packages
make distclean autoloads
cd xemacs-packages/pkg-under-sync
make install
This is a good (and probably the only easy) way to catch missing
indirect dependencies.
A couple of miscellaneous points:
When adding files, binary ones should be added with "cvs add -kb" and
files with upstream CVS keywords such as $Id, $Revision or $Log, with
"cvs add -ko" to prevent our CVS from clobbering the tags/files and from
generating unnecessary (though small) differences to the upstream
version.
This is a good thing to do, but forgetting about it doesn't necessarily
screw anything up; if there are problems, they can be solved with "cvs
admin -ko" or "cvs admin -kb" later. Problems failing to do this
usually manifest themselves in "cvs checkout" corrupting binary files.
The resulting CVS buffer gives you a number of things that you need
to
pay attention to:
- "Up-to-date" files need to be 'cvs rm'd' because they
don't
exist in the upstream-src/ These files may also need to be
removed from the Makefile (ELCS), so at this point, fix the
Makefile. Then "mark" these files in the CVS buffer by
pressing 'm' on each one and then press 'r' to 'cvs
rm'
them. (type 'u' on these files to "unmark" them).
I might be missing the context partially here because my process is
somewhat different, but I smell potential danger here. It is possible
that there are files that haven't had any changes between upstream
releases and we have an equivalent version. Giving the general advice
to 'cvs rm' those (ie. "Up-to-date" ones) gives me the creeps...
19) cvs ci -m "Sync to upstream version X"
xemacs-pkg-src/
I'm not 100% sure if that command line is correct because I always use
either patcher.el or PCL-CVS.
It seems to be correct.
That should be about it, I think it pretty well covers everything.
Maybe something similar to this should go into a TeXinfo file
somewhere?
Any comments? Is anything blatantly wrong or did I leave anything
out? Ville, what do you think?
Looks good to me, thanks! At the very least, providing archive links to
these messages somewhere should be done. It would be great if someone
could prepare a skeletal TeXinfo file based on this thread
(TeX-illiterate-Ville here) and prepare it for addition into the
general-docs package.
--
\/ille Skyttä
scop at
xemacs.org