Re: PATCH: Compose Coordinates



Le 2001.08.18 23:45:43 +0200, Ali Akcaagac a écrit :
> On 2001.08.18 22:44:38 +0200 christophe barbe wrote:
> > Moreover generating patches with the base directory clearly indicates
> which
> > files are patched. Otherwise people will send patch which should be
> applied
> > in the libbalsa directory, other .... .This is ever possible to use
> these
> > patches but more work are required because you need to figure out where
> > they should be applied.
> 
> well this depends and to say the truth, you are the first person
> telling me this but i will keep an eye on this in future and see
> how other people sent their patches. i never cared much if i apply
> it with -p0 or -p1 or whatever.

Thanks.

> but i've detected a big issue with 'patch' itself. lets see this example.
> i have stored my cvs of balsa in /cvsroot and my balsa for hacking in
> /tmp
> 
> now i do this
> 
> cd /tmp
> diff -u /cvsroot/balsa/src/balsa-index.c balsa/src/balsa-index.c
> >/tmp/balsa.patch
> 
> now i do this
> 
> cd /tmp/balsa

You give to diff an absolute path (starting with /) and patch read the
first line to know which file to patch. Here you can be were you want,
patch will ever try to modify /cvsroot/balsa/src/balsa-index.c.
This is a good reason to use -p1, at least it will remove the first / and
you will know that there's a problem.

I advise you to do the following:
in tmp (where you store your working balsa directory)
ln -s /cvsroot/balsa balsa-cvs
work in your /tmp/balsa directory and to generate a patch :
cd /tmp
diff -u -r -N .... balsa-cvs/ balsa/ > my.patch

The new patch will contains the following lines :
--- balsa-cvs/libbalsa/file.c
+++ balsa/libbalsa/file.c

NOTE that the both files (original and modified) have the same subdirectory
level.

Then we can all enjoy your patch.

Christophe

> patch -p0 < /tmp/balsa.patch
> 
> and instead of patching the correct balsa it patches the virgin cvs tree.
> this
> happens really often because i am used to do patching from my balsa dir
> so this
> things never happen.
> 
> -- 
> Name....: Ali Akcaagac
> Status..: Student Of Computer & Economic Science
> E-Mail..: mailto:ali.akcaagac@stud.fh-wilhelmshaven.de
> WWW.....: http://www.fh-wilhelmshaven.de/~akcaagaa
> 
> _______________________________________________
> balsa-list mailing list
> balsa-list@gnome.org
> http://mail.gnome.org/mailman/listinfo/balsa-list
> 
-- 
Christophe Barbé <christophe.barbe@online.fr>
GnuPG FingerPrint: E0F6 FADF 2A5C F072 6AF8  F67A 8F45 2F1E D72C B41E




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