Using URL in diff command

56 views
Skip to first unread message

Alfred E. Neuman

unread,
Apr 27, 2023, 6:35:46 PM4/27/23
to TortoiseSVN
I have a remote server which outputs test results which I would then like to compare against expected results in my remote SVN repository. The remote server is accessible via file explorer but the remote SVN repository is not. When attempting to use the diff command, the URL I supply for the remote SVN repository has all \s replaced with /s this making it inaccessible for my diff tool.

Is there any escape character so that the /s are not converted or otherwise a method of carrying out diff checking with a URL against a path?

Note that showcompare will not work as the remote server which outputs test results is not an SVN repository (and nor would I want to convert it as such). I am looking to directly compare files in a non-SVN repository from the output of unit tests against a base SVN repository listing expected results.

Tony Rietwyk

unread,
Apr 27, 2023, 11:14:24 PM4/27/23
to TortoiseSVN
Hi.  Since it is a URL, does it work if you percent encode the backslash, so \s becomes %5Cs?

Alfred E. Neuman

unread,
Apr 28, 2023, 3:29:18 AM4/28/23
to TortoiseSVN
Unfortunately not. %2f (for a forward slash) is recognized as such and then converted to a path. I'm unsure if this is specific to TortoiseSVN or the diff tool we are using however (Beyond Compare 4).

As an addendum, I meant to say that the /s in a url are converted such as that https://groups.google.com/g/tortsoisesvn/ would be https:\\groups.google.com\g\tortoisesvn\. I'm unsure of how to modify my original comment.

lorenz

unread,
May 2, 2023, 11:21:11 AM5/2/23
to torto...@googlegroups.com
Alfred E. Neuman via TortoiseSVN wrote:

>I have a remote server which outputs test results which I would then like
>to compare against expected results in my remote SVN repository. The remote
>server is accessible via file explorer but the remote SVN repository is
>not. When attempting to use the diff command, the URL I supply for the
>remote SVN repository has all \s replaced with /s this making it
>inaccessible for my diff tool.
>[...]

can you explain in more detail what you are doing?

So far I understand, that you have a file (reachable via windows
explorer on a file share).
I assume this file is not under version control?

The file to which to compare is versioned and accessible via
Repository URL.

What diff-tool are you using?
It sounds like it's not TortoiseUDiff.

To directly diff a file in the file system against a file in a
subversion repository, the diff-tool would need to connect with the
subversion server to abtain a copy of the file in the repository.
Not all diff-tools support that.
--

Lorenz

Alfred E. Neuman

unread,
May 3, 2023, 7:59:15 PM5/3/23
to TortoiseSVN
You are correct. The file is reachable via Windows explorer on an internal server but it is not under version control. The file I am comparing it against is in a web-based subversion repository.

The diff tool I am using is Beyond Compare 4 and it is compatible with viewing subversion repositories. I am not sure whether the URL being converted to a path is from TortoiseSVN or Beyond Compare 4 (but I don't think it'd be the latter given it offers subversion comparison).

As another example, if I compare:
\\someserver\somefolder\somefile.png
With

The url is processed as
https:\\anotherserver.com\subversion\somefolder\somefile.png
And so a comparison cannot take place with a local file against the subversion repository (now interpreted as a folder path)

lorenz

unread,
May 4, 2023, 2:56:01 AM5/4/23
to torto...@googlegroups.com
I've used BeyondCompare only for comparing lokal files via the
explorer context menu integration.

How do I compare a (lokal) file with a file in a subversion repository
using BeyondCompare?
--

Lorenz


Alfred E. Neuman via TortoiseSVN wrote:

>You are correct. The file is reachable via Windows explorer on an internal
>server but it is not under version control. The file I am comparing it
>against is in a web-based subversion repository.
>
>The diff tool I am using is Beyond Compare 4 and it is compatible with
>viewing subversion repositories. I am not sure whether the URL being
>converted to a path is from TortoiseSVN or Beyond Compare 4 (but I don't
>think it'd be the latter given it offers subversion comparison).
>
>As another example, if I compare:
>\\someserver\somefolder\somefile.png
>With
>https://anotherserver.com/subversion/somefolder/somefile.png
>
>The url is processed as
>https:\\anotherserver.com\subversion\somefolder\somefile.png
>And so a comparison cannot take place with a local file against the
>subversion repository (now interpreted as a folder path)

Alfred E. Neuman

unread,
May 4, 2023, 6:19:17 PM5/4/23
to TortoiseSVN
You will need the Pro Edition but it is achieved by adding a prefix of SVN+ to the URL of the subversion repository you're comparing against.

Becomes

lorenz

unread,
May 5, 2023, 11:44:24 AM5/5/23
to torto...@googlegroups.com
Alfred E. Neuman via TortoiseSVN wrote:
>You will need the Pro Edition but it is achieved by adding a prefix of SVN+
>to the URL of the subversion repository you're comparing against.

I tried that and, lo and behold, it work for me.

What subversion commandline client do have installed?
I'm using TortoiseSVN and the commandline client that comes with it
--

Lorenz

Alfred E. Neuman

unread,
May 22, 2023, 12:17:25 AM5/22/23
to TortoiseSVN
Our SVN command line tool is Apache SVN. Are you doing the diff command and supplying a URL for path1 and a path for path2? It consistently converts any forward slashes to back slashes for me.

Alfred E. Neuman

unread,
May 22, 2023, 12:33:36 AM5/22/23
to TortoiseSVN
As an addendum this command is being executed through tsvncmd.

tsvncmd:command:diff?path:SVN+https://someurl?path2:\\somefolderonserver
Reply all
Reply to author
Forward
0 new messages