VOGONS


First post, by Ant_222

User metadata
Rank Oldbie
Rank
Oldbie

Dear patch writers,

the only working procedure that I have found for the making of diff files is rather cumbersome:

  1. Get a fresh version of DOSBox from SVN, say into the fresh directory.
  2. Copy it to another directory, let us say patch.
  3. From the working environment, copy all the files that the patch creates or modifies to patch, overwriting the existing files.
  4. Invoke diff between patch and freshto produce the patch file

As you see, this procedure is tedious and prone to errors. I cannot use the directory with my working DOSBox source directly because the binary and automake files will get in the way. I cannot use the very handy svn diff because it ignores new (unversioned) files.

How do you make you patch files?

Reply 1 of 11, by gdjacobs

User metadata
Rank l33t++
Rank
l33t++

You might find git to be more flexible than svn.

All hail the Great Capacitor Brand Finder

Reply 2 of 11, by Ant_222

User metadata
Rank Oldbie
Rank
Oldbie
gdjacobs wrote:

You might find git to be more flexible than svn.

Do you suggest that I set up and maintain a Git repository with a mirror of the official DOSBox SVN?

Reply 3 of 11, by konc

User metadata
Rank l33t
Rank
l33t

I don't have a clue about SVN, but since git was mentioned, yes it's super-super easy to create diff files/patches with git. Easy as a 3-word command with the output redirected to a file. I used to hate git but hey, I got old and sane 😀

Reply 4 of 11, by Qbix

User metadata
Rank DOSBox Author
Rank
DOSBox Author

you can use svn add filename
to add it. You don't need write access to do that.
then svn diff will include that file "filename" as well.

Water flows down the stream
How to ask questions the smart way!

Reply 5 of 11, by Ant_222

User metadata
Rank Oldbie
Rank
Oldbie

Thank you, Qbix.

Reply 6 of 11, by Qbix

User metadata
Rank DOSBox Author
Rank
DOSBox Author
svn checkout svn://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk dosbox-code-0
cd dosbox-code-0
echo hi >test.txt
svn add test.txt
svn diff --ignore-properties

or use as last line

svn diff --patch-compatible

both will give

Index: test.txt
===================================================================
--- test.txt (nonexistent)
+++ test.txt (working copy)
@@ -0,0 +1 @@
+hi

of course you need to redirect the output to a file to save it.

Water flows down the stream
How to ask questions the smart way!

Reply 7 of 11, by gdjacobs

User metadata
Rank l33t++
Rank
l33t++
Ant_222 wrote:

Do you suggest that I set up and maintain a Git repository with a mirror of the official DOSBox SVN?

You can use the subversion bridging tool to pull into a local GIT repository which then gives you the full GIT toolset on your local copy. If you're only doing small stuff, it might not be worth it. If you're making substantial changes to the tree and merging them back or if it provides a way of keeping things organized, GIT could be a very powerful tool for you.

All hail the Great Capacitor Brand Finder

Reply 8 of 11, by Ant_222

User metadata
Rank Oldbie
Rank
Oldbie

gdjacobs, Right now I need to simplify relatively small changes, so Qbix's advice is the right next step for me. As far as I know, SVN offers the same fundamental functionality as GIT, i.e.: checkout, commit, branch, merge, diff; and whereas DOXBox is hosted in SVN I shall use that unless or until I meet with such incoveniences as GIT solves considerably better than SVN. I am on the path of least resistance and try do to the simplest thing that works.

Reply 9 of 11, by gdjacobs

User metadata
Rank l33t++
Rank
l33t++

Again, the big difference is that with GIT the functionality is available by design for your local work as well as on the central server, and GIT is better at merging changes between different source trees (as that's what it was designed for).

The good news is that you're not locked into any particular tool. SVN is mature and works quite well within it's scope, but if you begin running into it's limits, you've got a wealth of options available to you.

All hail the Great Capacitor Brand Finder

Reply 10 of 11, by Serious Callers Only

User metadata
Rank Member
Rank
Member

I use quilt. It's quite sophisticated, if linux only.

Reply 11 of 11, by gdjacobs

User metadata
Rank l33t++
Rank
l33t++

Yes. Andrew Morton is a clever guy.

All hail the Great Capacitor Brand Finder