svn diff working copy against a different branch

399 views
Skip to first unread message

Mark _

unread,
Aug 4, 2010, 3:09:12 PM8/4/10
to us...@subversion.apache.org
Hi all,

I have a system where there is a "trunk" and a branch called "branchX".  I have checked out branchX and merged the trunk code into branchX on my working copy.  I am trying to diff my working copy against trunk like so:
     svn diff --old=http://path-to-dir/myDirectory --new=myDirectory

the diff compares branchX WITHOUT the modifications in my working copy and shows many differences.

The working copy is definitely identical to trunk becaue when I use the unix style diff (see below) there are absolutely no differences.

     diff -rux ".svn" myDirectory /home/mark/myDirectory

Is it possible to diff a working copy against code in another branch (trunk in this case)?  Or is it expected to checkout trunk and use a diff utility every time?

I'm using svn 1.6.5.

Thanks,
Mark



Arpad Ilia

unread,
Aug 5, 2010, 3:59:15 AM8/5/10
to us...@subversion.apache.org, Mark _

As far as I know you can only diff two working copies or two URLs (if one of the arguments is an URL then both will handled as such).

Arpad Ilia

Erik Andersson

unread,
Aug 5, 2010, 4:04:19 AM8/5/10
to Mark _, us...@subversion.apache.org
You could create a tag for your working copy and then diff that tag vs the trunk.

Cheers / Erik

Alan Barrett

unread,
Aug 21, 2010, 3:57:00 PM8/21/10
to us...@subversion.apache.org
[replying to an old mesage]

On Thu, 05 Aug 2010, Arpad Ilia wrote:
> > Is it possible to diff a working copy against code in another branch (trunk
> > in this case)? Or is it expected to checkout trunk and use a diff utility
> > every time?
>
> As far as I know you can only diff two working copies or two URLs (if
> one of the arguments is an URL then both will handled as such).

If you use svn diff with the "--old" and "--new" options, then you can
make one of them point to the URL for a different branch, and the other
point to a working copy.

svn diff --old=svn://server/repo/branch/subdir --new=./subdir

--apb (Alan Barrett)

Reply all
Reply to author
Forward
0 new messages