[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: patchify (a Patch command solution)

From: Sean Russell <ser_at_germane-software.com>
Date: 2002-02-10 02:03:00 CET

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

You don't really need <file>.orig or <file>.repos, since they can be recreated
from other information, and they just clutter up the space. Therefore, I
recommend adding:

   File.rm_f orig_fname, repos_fname

Right before the last line in the script, or apply this patch (watch the formatting,
and the patch adds comments).

*** patchify.rb Sat Feb 9 16:20:43 2002
- --- patchify2.rb Sat Feb 9 16:47:01 2002
***************
*** 33,43 ****
        exit 1
  end

  File.cp ".svn/text-base/#{basename}.svn-base", orig_fname
  File.cp ".svn/text-base/#{basename}.svn-base", repos_fname
  File.cp basename, local_fname

! `patch -R #{orig_fname} < #{reject_file}`
  `diff3 -L ORIGINAL -L REPOS -L LOCAL -m #{orig_fname} #{repos_fname} #{local_fname} > #{basename}`

  puts "Done."
- --- 33,46 ----
        exit 1
  end

+ # Get the repository version
  File.cp ".svn/text-base/#{basename}.svn-base", orig_fname
  File.cp ".svn/text-base/#{basename}.svn-base", repos_fname
  File.cp basename, local_fname

! `patch -R #{orig_fname} < #{reject_file}` # recreate the original
  `diff3 -L ORIGINAL -L REPOS -L LOCAL -m #{orig_fname} #{repos_fname} #{local_fname} > #{basename}`
+
+ File.rm_f orig_fname, repos_fname

  puts "Done."

- --
 |.. "While money can't buy happiness, it certainly lets you choose your
<|> own form of misery."
/|\ -- anon
/|
 |
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE8ZcbEP0KxygnleI8RAiQBAKC6gt8nZ+fr4Dj8SmhLSjlwdROt3gCgpwgg
op5Up67SxBAKFjadDJsbm+k=
=Puo9
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Oct 21 14:37:06 2006

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.