You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Peter Ledbrook <pe...@august.uk.com> on 2003/11/12 16:48:05 UTC

Diff problem

Hi,

First a bit of background. I have a main trunk of development at the URL
http://aug00277/svn/auganiser/trunk and a particular branch at
http://aug00277/svn/auganiser/branches/data-serialisation. I switched my
working copy to the branch and merged all the most recent changes from the
trunk into it. This was to make it easier to merge the major changes from
the branch back into the trunk.

Anyway, I'm now trying to get the differences between the trunk at HEAD and
my working copy (still switched to the branch). This is the command I'm
using:

  svn diff --old http://aug00277/svn/auganiser/trunk --new .

The problem is, the diff does not seem to be comparing the working copy with
the trunk. Instead it seems to be comparing it with the branch. Here's a
quick extract of the diff:


Index:
auganiser-data/src/com/uk/august/auganiser/data/command/QueryData.java
===================================================================
--- auganiser-data/src/com/uk/august/auganiser/data/command/QueryData.java
(revision 245)
+++ auganiser-data/src/com/uk/august/auganiser/data/command/QueryData.java
(working copy)
@@ -201,7 +201,8 @@
 
     /**
      * Returns the maximum number of results that will be returned
-     * by this query.
+     * by this query. This method will return '0' if there is no
+     * limit on the row count.
      */
     public int getMaxResults() {
         return mMaxResults;
@@ -209,7 +210,7 @@
 
     /**
      * Sets the limit on the number of results that this query will
-     * return.
+     * return. Supply a value of 0 if you want to remove the limit.
      */
     public void setMaxResults(int pMaxResults) {
         mMaxResults = pMaxResults;

Would it help to say that there is no difference between this file on the
trunk and in my working copy? This was a change made on the trunk and then
merged into my working copy on the branch.

Am I getting something horribly wrong here?

Thanks,

Peter

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

Re: Diff problem

Posted by Philip Martin <ph...@codematters.co.uk>.
Peter Ledbrook <pe...@august.uk.com> writes:

>   svn diff --old http://aug00277/svn/auganiser/trunk --new .

> Am I getting something horribly wrong here?

You are doing the right thing, unfortunately Subversion is doing the
wrong thing.

Here's my recipe

#!/bin/bash
rm -rf repo wc
svnadmin create repo
svn mkdir file://`pwd`/repo/trunk -m r1
svn co file://`pwd`/repo/trunk wc
echo foo >> wc/foo
svn add wc/foo
svn ci wc -m r2
svn cp file://`pwd`/repo/trunk file://`pwd`/repo/branch -m r3
echo mod >> wc/foo
svn ci wc -m r4
svn sw file://`pwd`/repo/branch wc
svn diff --old file://`pwd`/repo/trunk --new wc

A quick investigation with gdb shows svn_repos_dir_delta doing a
/trunk to /trunk diff rather than a /trunk to /branch diff.

-- 
Philip Martin

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