You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Eric Gillespie <ep...@pretzelnet.org> on 2002/04/28 01:45:38 UTC

4 bugs in svn diff (IssueZilla gives me Internal Server Error)

I'm posting these bugs here because IssueZilla appears to be broken
ATM.

Both client and server are at revision 1814.  I have neon 0.19.4, and
apache/apr/apr-util HEAD.  Server platform is NetBSD/i386 1.5.2,
client platform is NetBSD/i386 1.5ZC (current).

#################################################################
svn diff URL WCPATH where both are dictories doesn't work

% svn diff http://svn.pretzelnet.org/repo/3rdparty/gnuserv/gnuserv-3.12.4 gnuserv | head
epg's password: 
Index: gnuserv/gnuserv.h
===================================================================
--- gnuserv/gnuserv.h
+++ tmp.57628.00003     Sat Apr 27 20:31:10 2002
@@ -0,0 +1,35 @@
+<html><head><title>/trunk/gnuserv</title></head>
+<body>
+ <h2>/trunk/gnuserv</h2>
+ <ul>
+  <li><a href="../">..</a></li>

[snip]

#################################################################
svn diff URL WCPATH where both are files gives bogus output

It lists every line in URL as being removed and every line in WCPATH
as being added, even though they only differ by one line.  I suspect
this might have something to do with eol translation even though
i have not enabled it anywhere.

#################################################################
svn diff asks for password every time

Everytime i run svn diff URL WCPATH (where URL is http without auth
and WCPATH was checked out over https with auth), it asks me for
the password even though it is already cached in .svn.

#################################################################
svn diff dumps core when listing property changes

#0  0x80a3d0a in find_entry (ht=0x0, key=0x810e4d0, klen=12, val=0x0)
    at apr_hash.c:276
276         for (hep = &ht->array[hash & ht->max], he = *hep;
(gdb) bt
#0  0x80a3d0a in find_entry (ht=0x0, key=0x810e4d0, klen=12, val=0x0)
    at apr_hash.c:276
#1  0x80a3ea3 in apr_hash_get (ht=0x0, key=0x810e4d0, klen=-1)
    at apr_hash.c:338
#2  0x8058000 in display_prop_diffs (propchanges=0x812e120, 
    original_props=0x0, path=0x810e130 "gnuserv.c", file=0x80d5258, 
    pool=0x812e010) at subversion/libsvn_client/diff.c:66
#3  0x80582e8 in diff_props_changed (path=0x810e130 "gnuserv.c", 
    propchanges=0x810e140, original_props=0x0, diff_baton=0xbfbfd370)
    at subversion/libsvn_client/diff.c:212
#4  0x805c102 in close_file (file_baton=0x810e100)
    at subversion/libsvn_client/repos_diff.c:592
#5  0x8075590 in wrap_close_file (file_baton=0x810e0e0)
    at subversion/libsvn_delta/default_editor.c:495
#6  0x807efe6 in end_element (userdata=0x8127808, elm=0x80c0f68, 
    cdata=0x80d9a00 "\n") at subversion/libsvn_ra_dav/fetch.c:1505
#7  0x80b44d5 in end_element (userdata=0x8108000, name=0x810b07e "S:add-file")
    at ne_xml.c:555
#8  0x808e5eb in doContent (parser=0x80f2c00, startTagLevel=0, enc=0x80c7840, 
    s=0x80ef9f8 "</S:add-file>\n<S:prop></S:prop>\n</S:replace-directory>\n</S:update-report>\n", end=0x80efa42 "", nextPtr=0x80f2c18) at xmlparse.c:1744
#9  0x808dc2d in contentProcessor (parser=0x80f2c00, 
    start=0x80ef827 "<S:update-report xmlns:S=\"svn:\" xmlns:D=\"DAV:\">\n<S:target-revision rev=\"55\"/>\n<S:replace-directory rev=\"55\">\n<D:checked-in><D:hr---Type <return> to continue, or q <return> to quit---
ef>/repo/$svn/ver/139.2/trunk/gnuserv/gnuserv.c</D:href></D:checked-in>\n"..., 
    end=0x80efa42 "", endPtr=0x80f2c18) at xmlparse.c:1354
#10 0x808ff88 in doProlog (parser=0x80f2c00, enc=0x80c7840, 
    s=0x80ef827 "<S:update-report xmlns:S=\"svn:\" xmlns:D=\"DAV:\">\n<S:target-revision rev=\"55\"/>\n<S:replace-directory rev=\"55\">\n<D:checked-in><D:href>/repo/$svn/ver/139.2/trunk/gnuserv/gnuserv.c</D:href></D:checked-in>\n"..., 
    end=0x80efa42 "", tok=29, 
    next=0x80ef827 "<S:update-report xmlns:S=\"svn:\" xmlns:D=\"DAV:\">\n<S:target-revision rev=\"55\"/>\n<S:replace-directory rev=\"55\">\n<D:checked-in><D:href>/repo/$svn/ver/139.2/trunk/gnuserv/gnuserv.c</D:href></D:checked-in>\n"..., 
    nextPtr=0x80f2c18) at xmlparse.c:2692
#11 0x808fa9c in prologProcessor (parser=0x80f2c00, 
    s=0x80ef800 "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<S:update-report xmlns:S=\"svn:\" xmlns:D=\"DAV:\">\n<S:target-revision rev=\"55\"/>\n<S:replace-directory rev=\"55\">\n<D:checked-in><D:href>/repo/$svn/ver/139.2/trunk/gnu"..., 
    end=0x80efa42 "", nextPtr=0x80f2c18) at xmlparse.c:2528
#12 0x808fa59 in prologInitProcessor (parser=0x80f2c00, 
    s=0x80ef800 "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<S:update-report xmlns:S=\"svn:\" xmlns:D=\"DAV:\">\n<S:target-revision rev=\"55\"/>\n<S:replace-directory rev=\"55\">\n<D:checked-in><D:href>/repo/$svn/ver/139.2/trunk/gnu"..., 
    end=0x80efa42 "", nextPtr=0x80f2c18) at xmlparse.c:2517
#13 0x808d8be in XML_ParseBuffer (parser=0x80f2c00, len=578, isFinal=0)
    at xmlparse.c:1155
#14 0x808d879 in XML_Parse (parser=0x80f2c00, 
---Type <return> to continue, or q <return> to quit---
    s=0xbfbfce24 "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<S:update-report xmlns:S=\"svn:\" xmlns:D=\"DAV:\">\n<S:target-revision rev=\"55\"/>\n<S:replace-directory rev=\"55\">\n<D:checked-in><D:href>/repo/$svn/ver/139.2/trunk/gnu"..., len=578, isFinal=0) at xmlparse.c:1145
#15 0x80b4b40 in ne_xml_parse (p=0x8108000, 
    block=0xbfbfce24 "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<S:update-report xmlns:S=\"svn:\" xmlns:D=\"DAV:\">\n<S:target-revision rev=\"55\"/>\n<S:replace-directory rev=\"55\">\n<D:checked-in><D:href>/repo/$svn/ver/139.2/trunk/gnu"..., len=578) at ne_xml.c:786
#16 0x80b4a8d in ne_xml_parse_v (userdata=0x8108000, 
    block=0xbfbfce24 "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<S:update-report xmlns:S=\"svn:\" xmlns:D=\"DAV:\">\n<S:target-revision rev=\"55\"/>\n<S:replace-directory rev=\"55\">\n<D:checked-in><D:href>/repo/$svn/ver/139.2/trunk/gnu"..., len=578) at ne_xml.c:761
#17 0x80acb11 in ne_read_response_block (req=0x80d9200, 
    buffer=0xbfbfce24 "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<S:update-report xmlns:S=\"svn:\" xmlns:D=\"DAV:\">\n<S:target-revision rev=\"55\"/>\n<S:replace-directory rev=\"55\">\n<D:checked-in><D:href>/repo/$svn/ver/139.2/trunk/gnu"..., buflen=1024) at ne_request.c:745
#18 0x80ad98c in ne_request_dispatch (req=0x80d9200) at ne_request.c:1286
#19 0x8081bd7 in svn_ra_dav__parsed_request (ras=0x8127510, 
    method=0x80c1669 "REPORT", 
    url=0x80db2c0 "/repo/3rdparty/gnuserv/gnuserv-3.12.4", body=0x0, fd=3, 
    elements=0x80c0ef8, validate_cb=0x807e140 <validate_element>, 
---Type <return> to continue, or q <return> to quit---
    startelm_cb=0x807e3f4 <start_element>, endelm_cb=0x807edf8 <end_element>, 
    baton=0x8127808, pool=0x80d5010) at subversion/libsvn_ra_dav/util.c:265
#20 0x807f783 in reporter_finish_report (report_baton=0x8127808)
    at subversion/libsvn_ra_dav/fetch.c:1716
#21 0x805a200 in do_diff (options=0x80d5228, auth_baton=0x80d5210, 
    path1=0x80d5358, revision1=0xbfbfd4d4, path2=0x80d5380, 
    revision2=0xbfbfd4e0, recurse=1, callbacks=0x80bc628, 
    callback_baton=0xbfbfd370, pool=0x80d5010)
    at subversion/libsvn_client/diff.c:1076
#22 0x805a334 in svn_client_diff (options=0x80d5228, auth_baton=0x80d5210, 
    path1=0x80d5358, revision1=0xbfbfd4d4, path2=0x80d5380, 
    revision2=0xbfbfd4e0, recurse=1, outfile=0x80d5258, errfile=0x80d5298, 
    pool=0x80d5010) at subversion/libsvn_client/diff.c:1164
#23 0x804bb7a in svn_cl__diff (os=0x80d5128, opt_state=0xbfbfd4d4, 
    pool=0x80d5010) at subversion/clients/cmdline/diff-cmd.c:99
#24 0x804e013 in main (argc=4, argv=0xbfbfd590)
    at subversion/clients/cmdline/main.c:1104
#25 0x804ae1d in ___start ()

-- 
Eric Gillespie <*> epg@pretzelnet.org

Conformity is a sin.

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

Re: 4 bugs in svn diff (IssueZilla gives me Internal Server Error)

Posted by Garrett Rooney <ro...@electricjellyfish.net>.
On Sun, Apr 28, 2002 at 09:52:19AM -0400, Garrett Rooney wrote:
> On Sat, Apr 27, 2002 at 11:41:40PM -0500, Ben Collins-Sussman wrote:
> 
> > > 
> > > #################################################################
> > > svn diff dumps core when listing property changes
> > 
> > Looks like garrett fixed this...
> 
> actually, not yet.  i can fix it, by just checking that the hash is
> valid before trying to look something up in it, but i'm still curious
> if it's legal for that function to be called with a null pointer for
> the hash.  if there are no original props, shouldn't it be called with
> an empty hash, not a null pointer?

ok, i've looked a little closer, and it seems that the hash is indeed
allowed to be NULL, so i'll commit a fix shortly. 

-garrett

-- 
garrett rooney                    Remember, any design flaw you're 
rooneg@electricjellyfish.net      sufficiently snide about becomes  
http://electricjellyfish.net/     a feature.       -- Dan Sugalski

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

Re: 4 bugs in svn diff (IssueZilla gives me Internal Server Error)

Posted by Garrett Rooney <ro...@electricjellyfish.net>.
On Sat, Apr 27, 2002 at 11:41:40PM -0500, Ben Collins-Sussman wrote:

> > 
> > #################################################################
> > svn diff dumps core when listing property changes
> 
> Looks like garrett fixed this...

actually, not yet.  i can fix it, by just checking that the hash is
valid before trying to look something up in it, but i'm still curious
if it's legal for that function to be called with a null pointer for
the hash.  if there are no original props, shouldn't it be called with
an empty hash, not a null pointer?

-garrett 

-- 
garrett rooney                    Remember, any design flaw you're 
rooneg@electricjellyfish.net      sufficiently snide about becomes  
http://electricjellyfish.net/     a feature.       -- Dan Sugalski

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

Re: 4 bugs in svn diff (IssueZilla gives me Internal Server Error)

Posted by Garrett Rooney <ro...@electricjellyfish.net>.
On Sat, Apr 27, 2002 at 11:41:40PM -0500, Ben Collins-Sussman wrote:
> Eric Gillespie <ep...@pretzelnet.org> writes:
> 
> > #################################################################
> > svn diff URL WCPATH where both are dictories doesn't work
> 
> > #################################################################
> > svn diff URL WCPATH where both are files gives bogus output
> > 
> 
> Eric, you misunderstand how 'svn diff' works.  Sorry if 'svn help
> diff' didn't make things clear, it's hard to communicate the complex
> syntax of this subcommand.
> 
>  1. svn diff [-r N[:M]] [PATH1 [PATH2 [PATH3 ...]]]
>  2. svn diff URL1[@N] URL2[@M]
> 
> You're looking at usage syntax #1, and thinking that the PATHs are
> diffed against each other; that's not what's going on.  Rather, they
> are a *list* of targets to be diffed, each in turn.  Each target
> causes an *independent* diff-action to execute: the target is compared
> against something.  That "something" depends on how you use the -r
> flag.  From the help description:
> 
>    1. each PATH can be either a working-copy path or URL.
>       If no PATHs are specified, a value of '.' is assumed.
> 
>         + if PATH is a URL, then revs N and M must be given via -r.
> 
>         + if PATH is a working-copy path, then -r switch means:
>             -r N:M  : server compares PATH@N and PATH@M,
>             -r N    : client compares PATH@N against working copy
>             (no -r) : client compares base and working copies of PATH
> 
> To beat the horse to death: we loop over each PATH, one at a time.  If
> the PATH is a URL, you better have given two revisions to compare.  If
> a PATH is a wc-path, then the use of the -r flag will either compare
> your working copy to some URL, compare two different versions of your
> working copy on the server, or compare your working-copy against your
> text base.

this seems reasonable to me, but if it is the case, we should probably
find some way to avoid the behavior that eric was seeing.  personally,
getting an output from diff that diffs the html mod_dav_svn spitts out
with nothing was not what i expected to see.

right now, one can do:

svn diff http://svn.collab.net/repos/trunk/packages/freebsd/subversion@1700 packages/freebsd/subversion

and it will gladly try to do it, and it outputs a diff that makes (to
me anyway) very little sense.

-garrett

-- 
garrett rooney                    Remember, any design flaw you're 
rooneg@electricjellyfish.net      sufficiently snide about becomes  
http://electricjellyfish.net/     a feature.       -- Dan Sugalski

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

Re: 4 bugs in svn diff (IssueZilla gives me Internal Server Error)

Posted by Philip Martin <ph...@codematters.co.uk>.
Eric Gillespie <ep...@pretzelnet.org> writes:

> Philip Martin <ph...@codematters.co.uk> writes:
> 
> > Just checking some basic stuff: the symptoms you describe will occur
> > if branch1 and branch2 don't have a common ancestor. It is not enough
> > that the directory trees have files with the same names, they have to
> > have been created via 'svn cp'. Without a common ancestor you get
> > something like
> 
> I think i did it right.  I used svn import to import the gnuserv
> source into the 3rdparty directory, and then used svn cp to copy
> it to the trunk, where i made my modifications.  However, svn log
> makes me worry something is wrong:

Did you copy the whole directory or individual files?

If I copy a file from one directory to another, and then diff the two
files I see a diff that removes one file and adds the other.

-- 
Philip

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

Re: 4 bugs in svn diff (IssueZilla gives me Internal Server Error)

Posted by Eric Gillespie <ep...@pretzelnet.org>.
Philip Martin <ph...@codematters.co.uk> writes:

> Just checking some basic stuff: the symptoms you describe will occur
> if branch1 and branch2 don't have a common ancestor. It is not enough
> that the directory trees have files with the same names, they have to
> have been created via 'svn cp'. Without a common ancestor you get
> something like

I think i did it right.  I used svn import to import the gnuserv
source into the 3rdparty directory, and then used svn cp to copy
it to the trunk, where i made my modifications.  However, svn log
makes me worry something is wrong:

0 gnuserv% svn log gnuserv.c
------------------------------------------------------------------------
rev 48:  epg | Thu 18 Apr 2002 01:51:03 | 3 lines

Fix off-by-one error in name of directory for local domain socket
(and add svn keywords).

------------------------------------------------------------------------
rev 47:  epg | Thu 18 Apr 2002 01:49:13 | 2 lines

Copy gnuserv to the trunk.

------------------------------------------------------------------------

It doesn't have the log message from the import :(.

--  
Eric Gillespie <*> epg@pretzelnet.org

Conformity is a sin.

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

Re: 4 bugs in svn diff (IssueZilla gives me Internal Server Error)

Posted by Philip Martin <ph...@codematters.co.uk>.
Eric Gillespie <ep...@pretzelnet.org> writes:

> Ben Collins-Sussman <su...@collab.net> writes:
> 
> >   svn diff http://path/to/branch1 http://path/to/branch2
> 
> That would be nice if it worked.  I would expect that to work, as
> well as replacing the second path with a WC path.  However, both
> actions produce the output i originally described in my bug report:
> 
> > It lists every line in URL as being removed and every line in WCPATH
> > as being added, even though they only differ by one line.  I suspect
> > this might have something to do with eol translation even though
> > i have not enabled it anywhere.

Well diff works as expected here

svn diff http://localhost:8888/repo/branch/ab http://localhost:8888/repo/branch/ac
Index: foo
===================================================================
--- foo
+++ tmp.25996.00001     Mon Apr 29 00:25:09 2002
@@ -1,3 +1,3 @@
 foo1
 foo2
-foob
+foo3

Just checking some basic stuff: the symptoms you describe will occur
if branch1 and branch2 don't have a common ancestor. It is not enough
that the directory trees have files with the same names, they have to
have been created via 'svn cp'. Without a common ancestor you get
something like

svn diff http://localhost:8888/repo/branch/ab http://localhost:8888/repo/branch/not_a_branch
Index: foo
===================================================================
--- foo
+++ tmp.1448.00001      Mon Apr 29 00:27:50 2002
@@ -1,3 +0,0 @@
-foo1
-foo2
-foob
Index: foo
===================================================================
--- foo
+++ tmp.26004.00001     Mon Apr 29 00:27:50 2002
@@ -0,0 +1,3 @@
+foo1
+foo2
+foo3


-- 
Philip

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

Re: 4 bugs in svn diff (IssueZilla gives me Internal Server Error)

Posted by Garrett Rooney <ro...@electricjellyfish.net>.
On Sun, Apr 28, 2002 at 06:46:04PM -0500, Eric Gillespie wrote:
> Ben Collins-Sussman <su...@collab.net> writes:
> 
> > I appreciate you finding this bug, though; can you diagnose the
> > problem further?  Maybe try checking out the two URLs (or checking out
> > the two parent URLs) and then doing a byte-for-byte hex comparison of
> > the two?
> 
> Yep, i'll investigate further.
> 
> > [sussman@kepler:~/projects/svn]$ svn diff http://svn.collab.net/repos/svn/tru
> > nk/CHANGES http://svn.collab.net/repos/svn/branches/0.11.1/CHANGES
> 
> You are diffing files, i am diffing directories.  That's possibly
> the difference.  I'll investigate further and get back to you.

nope, that's not it.  i just tried diffing
branches/0.11.1/packages/freebsd and trunk/packages/freebsd and it
seems to work fine.

-garrett 

-- 
garrett rooney                    Remember, any design flaw you're 
rooneg@electricjellyfish.net      sufficiently snide about becomes  
http://electricjellyfish.net/     a feature.       -- Dan Sugalski

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

Re: 4 bugs in svn diff (IssueZilla gives me Internal Server Error)

Posted by Eric Gillespie <ep...@pretzelnet.org>.
Ben Collins-Sussman <su...@collab.net> writes:

> I appreciate you finding this bug, though; can you diagnose the
> problem further?  Maybe try checking out the two URLs (or checking out
> the two parent URLs) and then doing a byte-for-byte hex comparison of
> the two?

Yep, i'll investigate further.

> [sussman@kepler:~/projects/svn]$ svn diff http://svn.collab.net/repos/svn/tru
> nk/CHANGES http://svn.collab.net/repos/svn/branches/0.11.1/CHANGES

You are diffing files, i am diffing directories.  That's possibly
the difference.  I'll investigate further and get back to you.

--  
Eric Gillespie <*> epg@pretzelnet.org

Conformity is a sin.

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

Re: 4 bugs in svn diff (IssueZilla gives me Internal Server Error)

Posted by Ben Collins-Sussman <su...@collab.net>.
Eric Gillespie <ep...@pretzelnet.org> writes:

> Ben Collins-Sussman <su...@collab.net> writes:
> 
> >   svn diff http://path/to/branch1 http://path/to/branch2
> 
> That would be nice if it worked.  I would expect that to work, as
> well as replacing the second path with a WC path.  However, both
> actions produce the output i originally described in my bug report:
> 
> > It lists every line in URL as being removed and every line in WCPATH
> > as being added, even though they only differ by one line.  I suspect
> > this might have something to do with eol translation even though
> > i have not enabled it anywhere.

I'm not sure how to reproduce this problem.  I mean, it seems to work
fine against the main svn repository.  I see exactly what I would
expect to see in my example (below).  

I appreciate you finding this bug, though; can you diagnose the
problem further?  Maybe try checking out the two URLs (or checking out
the two parent URLs) and then doing a byte-for-byte hex comparison of
the two?

My example:


[sussman@kepler:~/projects/svn]$ svn diff http://svn.collab.net/repos/svn/trunk/CHANGES http://svn.collab.net/repos/svn/branches/0.11.1/CHANGES
Index: CHANGES
===================================================================
--- CHANGES
+++ tmp.268.00001	Sun Apr 28 18:13:51 2002
@@ -1,20 +1,3 @@
-Version X.X.X (unreleased)
-
- User-visible changes:
- * 'svn diff' can now compare two arbitrary URLs (issue 674)
- * 'svn diff' now displays property changes
- * 'svn rm' requires --force for unversioned and/or modified items
- * 'svn rm' immediately removes files & uncommitted dirs
- * 'svn mv' for WC->WC behaves like 'svn rm' with respect to the source
- * checkouts, updates, switches now print received revision on final line.
- * new 'svn info' command prints information about a versioned resource.
-
- Developer-visible changes:
- * updates can deal with disjoint urls.
- * python tests now run on Win32.
- * svn_cl__diff/svn_client_diff gutted and rewritten
- * NEW internalized diff/diff3 library.  Not yet integrated/tested.
-
 Version 0.11.1 (released 12 April 2002, revision 1682)
 
  User-visible changes:

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

Re: 4 bugs in svn diff (IssueZilla gives me Internal Server Error)

Posted by Eric Gillespie <ep...@pretzelnet.org>.
Ben Collins-Sussman <su...@collab.net> writes:

>   svn diff http://path/to/branch1 http://path/to/branch2

That would be nice if it worked.  I would expect that to work, as
well as replacing the second path with a WC path.  However, both
actions produce the output i originally described in my bug report:

> It lists every line in URL as being removed and every line in WCPATH
> as being added, even though they only differ by one line.  I suspect
> this might have something to do with eol translation even though
> i have not enabled it anywhere.


> Then we should file a bug.

Yes, see the subject of this thread.

--  
Eric Gillespie <*> epg@pretzelnet.org

Conformity is a sin.

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

Re: 4 bugs in svn diff (IssueZilla gives me Internal Server Error)

Posted by Stephan Feder <sf...@stephan-feder.de>.
Hello Ben,

maybe it would be better to use two distinct svn commands:

"svn diff" diffs exactly two arbitrary paths, each of them either local
(why not?) or remote; this would be just an extension of the traditional
unix diff.
"svn vdiff" ("vdiff" for version-diff) diffs the two specified versions
of the given list of version controlled paths (one by one).

Regards
	Stephan
--
Ben Collins-Sussman wrote:
...
> Read the rest of the help on svn diff.  As you said, the first use
> case is all about the different ways you can diff versions of a single
> path against itself.
> 
>   svn diff -r22:34 some/wc/path
>   svn diff -r22:34 http://some/repos/path
>   svn diff -r22    some/wc/path
>   svn diff         some/wc/path
> 
> This is the syntax that treats multiple paths as a list of independent
> diff runs.
> 
> But the second use case mentioned in help allows you to diff two
> arbitrary paths on the server, whether they be tags, branches, whatever:
> 
>   svn diff http://path/to/branch1 http://path/to/branch2
>   svn diff http://path/to/branch1@51 http://path/to/branch2@78
...

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

Re: 4 bugs in svn diff (IssueZilla gives me Internal Server Error)

Posted by Ben Collins-Sussman <su...@collab.net>.
Eric Gillespie <ep...@pretzelnet.org> writes:

> Ben Collins-Sussman <su...@collab.net> writes:
> 
> > Eric, you misunderstand how 'svn diff' works.  Sorry if 'svn help
> > diff' didn't make things clear, it's hard to communicate the complex
> > syntax of this subcommand.
> 
> So how do you diff branches?  Because svn has no branches, it is
> a necessity to be able to diff two paths, not just two revisions
> of the same path (though that is of course also a necessity).

Read the rest of the help on svn diff.  As you said, the first use
case is all about the different ways you can diff versions of a single
path against itself.

  svn diff -r22:34 some/wc/path
  svn diff -r22:34 http://some/repos/path
  svn diff -r22    some/wc/path
  svn diff         some/wc/path

This is the syntax that treats multiple paths as a list of independent
diff runs.

But the second use case mentioned in help allows you to diff two
arbitrary paths on the server, whether they be tags, branches, whatever:

  svn diff http://path/to/branch1 http://path/to/branch2
  svn diff http://path/to/branch1@51 http://path/to/branch2@78


> No, it need only read the data.  If you have a WC that requires
> authentication, the checkout would have created the cache files.
> 
> > Are you *sure* your https password is already cached in .svn when it
> 
> Positive.

Then we should file a bug.  I'll try to reproduce.

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

Re: 4 bugs in svn diff (IssueZilla gives me Internal Server Error)

Posted by Eric Gillespie <ep...@pretzelnet.org>.
Ben Collins-Sussman <su...@collab.net> writes:

> Eric, you misunderstand how 'svn diff' works.  Sorry if 'svn help
> diff' didn't make things clear, it's hard to communicate the complex
> syntax of this subcommand.

So how do you diff branches?  Because svn has no branches, it is
a necessity to be able to diff two paths, not just two revisions
of the same path (though that is of course also a necessity).

> diff' might need to authenticate as well.  Should that command be
> writing cached auth data as well?  It kind of ruins my vision of 'svn
> diff' as this pure, read-only operation.  But I can see how it would
> get annoying.

No, it need only read the data.  If you have a WC that requires
authentication, the checkout would have created the cache files.

> Are you *sure* your https password is already cached in .svn when it

Positive.

--  
Eric Gillespie <*> epg@pretzelnet.org

Conformity is a sin.

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

Re: 4 bugs in svn diff (IssueZilla gives me Internal Server Error)

Posted by Philip Martin <ph...@codematters.co.uk>.
Ben Collins-Sussman <su...@collab.net> writes:

> Eric, you misunderstand how 'svn diff' works.  Sorry if 'svn help
> diff' didn't make things clear, it's hard to communicate the complex
> syntax of this subcommand.
> 
>  1. svn diff [-r N[:M]] [PATH1 [PATH2 [PATH3 ...]]]
>  2. svn diff URL1[@N] URL2[@M]
> 
> You're looking at usage syntax #1, and thinking that the PATHs are
> diffed against each other; that's not what's going on.  Rather, they
> are a *list* of targets to be diffed, each in turn.

I wonder if this is the correct interface.  I often use case 1 above,
but nearly always with a single path.  When I use diff with two paths
I nearly always want case 2.  In fact one of the things I want to do
is not supported: namely to diff my working copy against a "branch".

Perhaps a better interface would be

 svn diff [-r N[:M]] TARGET
 compares different revisions of TARGET

 svn diff [-r N] TARGET1[@N] TARGET2[@M]
 compares TARGET1 against TARGET2

I can always get the current 'svn diff PATH1 ... PATHN' behaviour by
invoking 'svn diff PATH1' ... 'svn diff PATHN'.

-- 
Philip

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

Re: 4 bugs in svn diff (IssueZilla gives me Internal Server Error)

Posted by Ben Collins-Sussman <su...@collab.net>.
Eric Gillespie <ep...@pretzelnet.org> writes:

> #################################################################
> svn diff URL WCPATH where both are dictories doesn't work

> #################################################################
> svn diff URL WCPATH where both are files gives bogus output
> 

Eric, you misunderstand how 'svn diff' works.  Sorry if 'svn help
diff' didn't make things clear, it's hard to communicate the complex
syntax of this subcommand.

 1. svn diff [-r N[:M]] [PATH1 [PATH2 [PATH3 ...]]]
 2. svn diff URL1[@N] URL2[@M]

You're looking at usage syntax #1, and thinking that the PATHs are
diffed against each other; that's not what's going on.  Rather, they
are a *list* of targets to be diffed, each in turn.  Each target
causes an *independent* diff-action to execute: the target is compared
against something.  That "something" depends on how you use the -r
flag.  From the help description:

   1. each PATH can be either a working-copy path or URL.
      If no PATHs are specified, a value of '.' is assumed.

        + if PATH is a URL, then revs N and M must be given via -r.

        + if PATH is a working-copy path, then -r switch means:
            -r N:M  : server compares PATH@N and PATH@M,
            -r N    : client compares PATH@N against working copy
            (no -r) : client compares base and working copies of PATH

To beat the horse to death: we loop over each PATH, one at a time.  If
the PATH is a URL, you better have given two revisions to compare.  If
a PATH is a wc-path, then the use of the -r flag will either compare
your working copy to some URL, compare two different versions of your
working copy on the server, or compare your working-copy against your
text base.

> 
> #################################################################
> svn diff asks for password every time
> 
> Everytime i run svn diff URL WCPATH (where URL is http without auth
> and WCPATH was checked out over https with auth), it asks me for
> the password even though it is already cached in .svn.

Interesting... we've programmed updates and commits and checkouts to
cache password info within the .svn/ areas.  But I forgot that 'svn
diff' might need to authenticate as well.  Should that command be
writing cached auth data as well?  It kind of ruins my vision of 'svn
diff' as this pure, read-only operation.  But I can see how it would
get annoying.

Are you *sure* your https password is already cached in .svn when it
re-asks you?  Have you gone into .svn/auth/ and seen a password file
there?

> 
> #################################################################
> svn diff dumps core when listing property changes

Looks like garrett fixed this...

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

Re: 4 bugs in svn diff (IssueZilla gives me Internal Server Error)

Posted by Garrett Rooney <ro...@electricjellyfish.net>.
On Sat, Apr 27, 2002 at 08:45:38PM -0500, Eric Gillespie wrote:

> #################################################################
> svn diff dumps core when listing property changes
> 
> #0  0x80a3d0a in find_entry (ht=0x0, key=0x810e4d0, klen=12, val=0x0)
>     at apr_hash.c:276
> 276         for (hep = &ht->array[hash & ht->max], he = *hep;
> (gdb) bt
> #0  0x80a3d0a in find_entry (ht=0x0, key=0x810e4d0, klen=12, val=0x0)
>     at apr_hash.c:276
> #1  0x80a3ea3 in apr_hash_get (ht=0x0, key=0x810e4d0, klen=-1)
>     at apr_hash.c:338
> #2  0x8058000 in display_prop_diffs (propchanges=0x812e120, 
>     original_props=0x0, path=0x810e130 "gnuserv.c", file=0x80d5258, 
>     pool=0x812e010) at subversion/libsvn_client/diff.c:66
> #3  0x80582e8 in diff_props_changed (path=0x810e130 "gnuserv.c", 
>     propchanges=0x810e140, original_props=0x0, diff_baton=0xbfbfd370)
>     at subversion/libsvn_client/diff.c:212

this seems to be happening because diff_props_changed() is getting
called with original_props = NULL.  should diff_props_changed try to
handle this case, or is it just a case of 'svn diff' doing the wrong
thing?

-garrett 

-- 
garrett rooney                    Remember, any design flaw you're 
rooneg@electricjellyfish.net      sufficiently snide about becomes  
http://electricjellyfish.net/     a feature.       -- Dan Sugalski

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