Ben Schmidt wrote:
>>> Anyway, all this makes me wonder if we really should be basing the Git
>>> repo on the SVN repo since not even Edward is satisfied with it.  I've
>>> been thinking if it wouldn't be simpler to just apply the patches Bram
>>> posts myself.  Did you consider this option Markus?
>> Not really until now, because git-svn is just so comfortable. But I think 
>> with
>> an appropriate script being based on the patchfiles should work similar
>> comfortable.
> 
> I gave up on SVN ages ago--I would have loved to use it, but it's just
> too messy. Now I apply patches. Below is the script I use to do it with
> Mercurial, which may serve as a starting point for doing the same with
> Git (or whatever); do what you like with it. It extracts the
> descriptions from the patches and makes them the log messages. It does
> one patch at a time (I just run it each time I see a patch on vim_dev)
> and uses an empty or small file to keep track of the current patch
> number. As such, before using the script, you need to do mkdir patches;
> touch patches/000 (or the three digit number before the next patch you
> want to apply) to initialise it.

That should've been patches/001 (or the three digit number of the next
patch you want to apply).

> Must be run with the current directory
> set to the root of the vim archive tree (i.e. not inside src), and it
> expects Mercurial repository and itself (named nextpatch) to be there,
> just as a safety measure. It doesn't deal with the runtime files
> specially at all; only updates in the patches will get into them.
> 
> Ben.
> 
> 
> 
> #!/bin/bash
> version=7.2
> echo Checking directory
> [ -f nextpatch -a -d .hg ] || exit 1
> echo Updating to tip
> hg update tip || exit 1
> cd patches
> patchnum=$(echo ???)
> echo Getting patch number $patchnum
> rm -f $version.$patchnum
> wget ftp://ftp.vim.org/pub/vim/patches/$version/$version.$patchnum || exit 1
> echo Getting description
> ed -s $version.$patchnum << END || exit 1
> /^$/+1,/^\*\*\*/-1w $version.$patchnum.log
> q
> END
> cd ..
> echo Applying patch
> patch -p0 < patches/$version.$patchnum || exit 1
> echo Committing patch $patchnum
> hg commit -A -l patches/$version.$patchnum.log || exit 1
> echo Incrementing patch number
> mv patches/$patchnum patches/$(printf %03d $(expr $patchnum + 1)) || exit 1
> echo Done
> exit 0
> 
> 
> 
> 
> > 
> 

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Raspunde prin e-mail lui