You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by nick vajberg <ni...@yahoo.dk> on 2003/11/25 14:29:21 UTC

svn patch command?

Hi all,

Is there a way to apply a patch file, produced from
"svn diff"?

That is, 

svn patch http://url/latest.cpp patchfile

-or-

svn patch /wc/latest.cpp patchfile

Alternatively, the merge command could take a patch
file.

This way, I could set up a script in my mail client
which merged the patch whenever I choose the "accept
patch" macro button (which would pull out the mail
body or attachment, save it as a text file and call
svn patch/merge)

Perhaps this already exists - I have svn 0.24...

Thanks for any pointers.



Yahoo! Mail (http://dk.mail.yahoo.com) - Gratis: 6 MB lagerplads, spamfilter og virusscan

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: svn patch command?

Posted by Lele Gaifax <le...@nautilus.homeip.net>.
>>>>> "mark" == mark benedetto king <mb...@lowlatency.com> writes:

    mark> There is a separate design effort underway ...

    mark> http://www.red-bean.com/mailman/listinfo/changesets

Hopefully there *will* be some interesting things to be read
there... judging on last months threads, one should carefully tune
up his spamassins rules... :-)

bye, lele.
-- 
nickname: Lele Gaifax	| Quando vivrò di quello che ho pensato ieri
real: Emanuele Gaifas	| comincerò ad aver paura di chi mi copia.
email: lele@seldati.it	|		-- Fortunato Depero, 1929.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: svn patch command?

Posted by mark benedetto king <mb...@lowlatency.com>.
On Tue, Nov 25, 2003 at 04:48:03PM +0100, Rafael Garcia-Suarez wrote:
> kfogel@collab.net wrote:
> > 
> > You know about the venerable, standalone 'patch' program, right?  The
> > diffs produced by 'svn diff' are meant to be applied using 'patch'.
> 
> A minor nit, however : patch(1) doesn't do automatically the required "svn add"
> and "svn rm". This can be automated, of course, but special care must be
> taken for added and removed directories.
> 

There is a separate design effort underway (moving VERY slowly, AFAICT)
to come up with a New Magical Standardized Tree Patch Format that will
embed move, copy, add, delete information.  If that design effort ever
goes anywhere I think it's safe to say that svn would soon acquire
native support for it, perhaps via "svn diff --tree" and "svn patch
--tree", or something.

http://www.red-bean.com/mailman/listinfo/changesets

--ben


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: svn patch command?

Posted by "C. Michael Pilato" <cm...@collab.net>.
Rafael Garcia-Suarez <ra...@hexaflux.com> writes:

> kfogel@collab.net wrote:
> > 
> > You know about the venerable, standalone 'patch' program, right?  The
> > diffs produced by 'svn diff' are meant to be applied using 'patch'.
> 
> A minor nit, however : patch(1) doesn't do automatically the
> required "svn add" and "svn rm". This can be automated, of course,
> but special care must be taken for added and removed directories.

Sure.  And it doesn't handle Subversion properties.  These are known
limitations.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: svn patch command?

Posted by mark benedetto king <mb...@lowlatency.com>.
On Tue, Nov 25, 2003 at 04:48:03PM +0100, Rafael Garcia-Suarez wrote:
> kfogel@collab.net wrote:
> > 
> > You know about the venerable, standalone 'patch' program, right?  The
> > diffs produced by 'svn diff' are meant to be applied using 'patch'.
> 
> A minor nit, however : patch(1) doesn't do automatically the required "svn add"
> and "svn rm". This can be automated, of course, but special care must be
> taken for added and removed directories.
> 

There is a separate design effort underway (moving VERY slowly, AFAICT)
to come up with a New Magical Standardized Tree Patch Format that will
embed move, copy, add, delete information.  If that design effort ever
goes anywhere I think it's safe to say that svn would soon acquire
native support for it, perhaps via "svn diff --tree" and "svn patch
--tree", or something.

http://www.red-bean.com/mailman/listinfo/changesets

--ben


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: svn patch command?

Posted by "C. Michael Pilato" <cm...@collab.net>.
Rafael Garcia-Suarez <ra...@hexaflux.com> writes:

> kfogel@collab.net wrote:
> > 
> > You know about the venerable, standalone 'patch' program, right?  The
> > diffs produced by 'svn diff' are meant to be applied using 'patch'.
> 
> A minor nit, however : patch(1) doesn't do automatically the
> required "svn add" and "svn rm". This can be automated, of course,
> but special care must be taken for added and removed directories.

Sure.  And it doesn't handle Subversion properties.  These are known
limitations.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: svn patch command?

Posted by Rafael Garcia-Suarez <ra...@hexaflux.com>.
kfogel@collab.net wrote:
> 
> You know about the venerable, standalone 'patch' program, right?  The
> diffs produced by 'svn diff' are meant to be applied using 'patch'.

A minor nit, however : patch(1) doesn't do automatically the required "svn add"
and "svn rm". This can be automated, of course, but special care must be
taken for added and removed directories.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: svn patch command?

Posted by Rafael Garcia-Suarez <ra...@hexaflux.com>.
kfogel@collab.net wrote:
> 
> You know about the venerable, standalone 'patch' program, right?  The
> diffs produced by 'svn diff' are meant to be applied using 'patch'.

A minor nit, however : patch(1) doesn't do automatically the required "svn add"
and "svn rm". This can be automated, of course, but special care must be
taken for added and removed directories.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: svn patch command?

Posted by Rafael Garcia-Suarez <ra...@hexaflux.com>.
Ryan Hunt wrote:
> For those of us that don't know about the standalone 'patch' program 
> would you mind a little more detail??  I for one am curious how this 
> might work...

The venerable patch program, written by Larry Wall (who is also the
author of Perl) nearly twenty years ago, which has been ubiquitously
ported to nearly every operating system in existence, and which
enabled (as they said) collaborative open-source development, is
exactly the reverse of the venerable diff program. In other words, with
diff you produce a patch from an old file and a new file, and with
patch you produce a new file from a patch and an old file. If you're
not running Windows or Mac OS classic, it's probably already installed
on your system.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: svn patch command?

Posted by kf...@collab.net.
Ryan Hunt <rh...@hp.com> writes:
> For those of us that don't know about the standalone 'patch' program
> would you mind a little more detail??  I for one am curious how this
> might work...

'patch' is pretty fundamental to source code development, I suggest
doing Google[diff patch] and browsing.

Don't mean to brush you off, it's just too large a topic for this
list.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: svn patch command?

Posted by Ryan Hunt <rh...@hp.com>.
On Tuesday, November 25, 2003, at 07:46  AM, kfogel@collab.net wrote:

> nick vajberg <ni...@yahoo.dk> writes:
>> Is there a way to apply a patch file, produced from
>> "svn diff"?
>
> There was no need to crosspost this to the dev@ list.  Really, it's a
> textbook example of why we created the users@ list :-).  No big deal,
> just pointing it out for next time.
>
> (I'm keeping the crosspost in my reply, though, so people on both
> lists see the reminder to stick to users@ for usage questions.)
>
> On to your actual question:
>
>> That is,
>>
>> svn patch http://url/latest.cpp patchfile
>>
>> -or-
>>
>> svn patch /wc/latest.cpp patchfile
>>
>> Alternatively, the merge command could take a patch
>> file.
>
> You know about the venerable, standalone 'patch' program, right?  The
> diffs produced by 'svn diff' are meant to be applied using 'patch'.
>
> Hope this helps,
> -Karl
>

Karl-
For those of us that don't know about the standalone 'patch' program 
would you mind a little more detail??  I for one am curious how this 
might work...

-Ryan


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: svn patch command?

Posted by kf...@collab.net.
nick vajberg <ni...@yahoo.dk> writes:
> Is there a way to apply a patch file, produced from
> "svn diff"?

There was no need to crosspost this to the dev@ list.  Really, it's a
textbook example of why we created the users@ list :-).  No big deal,
just pointing it out for next time.

(I'm keeping the crosspost in my reply, though, so people on both
lists see the reminder to stick to users@ for usage questions.)

On to your actual question:

> That is, 
> 
> svn patch http://url/latest.cpp patchfile
> 
> -or-
> 
> svn patch /wc/latest.cpp patchfile
> 
> Alternatively, the merge command could take a patch
> file.

You know about the venerable, standalone 'patch' program, right?  The
diffs produced by 'svn diff' are meant to be applied using 'patch'.

Hope this helps,
-Karl

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: svn patch command?

Posted by kf...@collab.net.
nick vajberg <ni...@yahoo.dk> writes:
> Is there a way to apply a patch file, produced from
> "svn diff"?

There was no need to crosspost this to the dev@ list.  Really, it's a
textbook example of why we created the users@ list :-).  No big deal,
just pointing it out for next time.

(I'm keeping the crosspost in my reply, though, so people on both
lists see the reminder to stick to users@ for usage questions.)

On to your actual question:

> That is, 
> 
> svn patch http://url/latest.cpp patchfile
> 
> -or-
> 
> svn patch /wc/latest.cpp patchfile
> 
> Alternatively, the merge command could take a patch
> file.

You know about the venerable, standalone 'patch' program, right?  The
diffs produced by 'svn diff' are meant to be applied using 'patch'.

Hope this helps,
-Karl

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org