Log message problem on 1.9.5

262 views
Skip to first unread message

Hiroyuki Matsumura

unread,
Nov 30, 2016, 1:42:45 AM11/30/16
to us...@tortoisesvn.tigris.org
When committing in 1.9.5, the log at the time of the new commit is not displayed. (Old commit logs are displayed.)
Re-install to 1.9.4 will work normally. The committed content has no problem.

used version:1.9.5.27581 win32 (32-bit)
OS : Windows7 Pro

I have not confirmed the 64-bit version.

H. Matsumura

------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=3195548

To unsubscribe from this discussion, e-mail: [users-un...@tortoisesvn.tigris.org].

Stefan Küng

unread,
Nov 30, 2016, 1:26:47 PM11/30/16
to us...@tortoisesvn.tigris.org
On 30.11.2016 03:25, Hiroyuki Matsumura wrote:
> When committing in 1.9.5, the log at the time of the new commit is not displayed. (Old commit logs are displayed.)

Where? In the commit dialog when you enter the log message? In the log
dialog? ???

Stefan

--
___
oo // \\ "De Chelonian Mobile"
(_,\/ \_/ \ TortoiseSVN
\ \_/_\_/> The coolest interface to (Sub)version control
/_/ \_\ http://tortoisesvn.net

------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=3195605

Pavel Lyalyakin

unread,
Nov 30, 2016, 4:37:29 PM11/30/16
to us...@tortoisesvn.tigris.org, pine.ma...@gmail.com
Hello Hiroyuki,

On Wed, Nov 30, 2016 at 5:25 AM, Hiroyuki Matsumura
<pine.ma...@gmail.com> wrote:
>
> When committing in 1.9.5, the log at the time of the new commit is not displayed. (Old commit logs are displayed.)
> Re-install to 1.9.4 will work normally. The committed content has no problem.

I regret to say that the current summary of the issue is very vague.
Could you please show a screenshot and provide a reproduction script?

An example or side-by-side comparison of what you see in TortoiseSVN
1.9.4 and what you think is wrong in 1.9.5 would be great.

--
With best regards,
Pavel Lyalyakin
VisualSVN Team

------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=3195625

Hiroyuki Matsumura

unread,
Nov 30, 2016, 6:26:29 PM11/30/16
to us...@tortoisesvn.tigris.org
It's happened on Log Message display window.

I tried reinstalling 1.9.5. But I could not reappearance it. It was the same phenomenon on two PCs, but now both of them are OK.
For now, please declare that this case was not.

One thing to worry about is that the 1.9.4.27285-32-bit installer contains '27283' revisions instead of '27285'. (It confirmed with the version of TSVNCache.exe.)
So the message "There is a new version." was always displayed at commit.

H. Matsumura

------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=3195634

Hiroyuki Matsumura

unread,
Dec 1, 2016, 10:30:21 PM12/1/16
to us...@tortoisesvn.tigris.org
Again there is a problem with the Show Log of 1.9.5.

* The "Want to go offline?" message is displayed in several work folders. (some work folder is OK.)
* Forcibly go offline in some work folders. (some work folder is OK.)

It is displayed normally in 1.9.4.

The repository is created on the network drive. I am accessing directly by the drive name.

Please refer to the attached file.

------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=3195751
ShowLog_problrem_1.9.5.xlsx

Stefan Hett

unread,
Dec 2, 2016, 4:13:04 AM12/2/16
to us...@tortoisesvn.tigris.org
Hi Hiroyuki,
On 12/2/2016 4:30 AM, Hiroyuki Matsumura wrote:
> Again there is a problem with the Show Log of 1.9.5.
>
> * The "Want to go offline?" message is displayed in several work folders. (some work folder is OK.)
> * Forcibly go offline in some work folders. (some work folder is OK.)
>
> It is displayed normally in 1.9.4.
>
> The repository is created on the network drive. I am accessing directly by the drive name.
>
> Please refer to the attached file.
>
This set up is highly discouraged (using the file-protocol over a
network drive). Did you consider setting up an svnserve-deamon and use
the svn-protocol instead? It should be quite simple to set that up (as
in: simply start svnserve and adjust your network/permission settings
where/if required).

Note that the file protocol is designed around having a repository on a
local drive.

--
Regards,
Stefan Hett

------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=3195761

Hiroyuki Matsumura

unread,
Dec 4, 2016, 6:31:59 PM12/4/16
to us...@tortoisesvn.tigris.org
Hi Stefan,

I appreciate your advice. I will examine it.

By the way, is this problem caused by the file protocol over network drive?
I've been using TortoiseSVN with a repository on a network drive with a file protocol for nearly eight years, but this is my first problem. Why now? I would like an explanation that can be convincing if possible.

H. Matsumura

------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=3196016

Hiroyuki Matsumura

unread,
Dec 4, 2016, 10:46:19 PM12/4/16
to us...@tortoisesvn.tigris.org
Hi Stefan,

I tried "svnserve.exe" of 1.9.5.

> svnserve --daemon --root "folder name at file server"

I checked out with the svn protocol (svn://localhost/...) and displayed the log but it was offline and could not be displayed.

From this facts, I do not think that the file protocol is the cause.

Do you have any other possible causes?

H. Matsumura

------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=3196028

Hiroyuki Matsumura

unread,
Dec 4, 2016, 11:06:33 PM12/4/16
to us...@tortoisesvn.tigris.org
> I tried "svnserve.exe" of 1.9.5.
>
> > svnserve --daemon --root "folder name at file server"
>
> I checked out with the svn protocol (svn://localhost/...) and displayed the log but it was offline and could not be displayed.
>
> From this facts, I do not think that the file protocol is the cause.
>
> Do you have any other possible causes?

I'm sorry.
Check out was the file protocol. I will report it after confirming it more.

Matsumura

------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=3196031

Hiroyuki Matsumura

unread,
Dec 5, 2016, 1:11:31 AM12/5/16
to us...@tortoisesvn.tigris.org
Hi Stefan,

Sorry again.

I tried to using "svnserve" again.

Command typing is as follows;

> svnserve --deamon --root K:\

Svnserve.exe uses the command of TortoiseSVN(1.9.5).

("K:\" is the network drive where the repository is located.)

I confirmed checkout and log display using the SVN protocol. (URL is "svn://localhost/...").

Checkout has no problem. However, the log display is offline and can not be displayed.

Re-installing to 1.9.4 in this state, log dialog is displayed normally after svnserve is started with the daemon.

Because of this, I do not think that it is offline due to the file protocol.

I confirmed it in several repositories, but it was the same.

Do you have any other possible causes?

regards,

H. Matsumura

------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=3196033

Stefan Hett

unread,
Dec 5, 2016, 1:38:51 AM12/5/16
to us...@tortoisesvn.tigris.org
On 12/5/2016 12:31 AM, Hiroyuki Matsumura wrote:
> Hi Stefan,
>
> I appreciate your advice. I will examine it.
>
> By the way, is this problem caused by the file protocol over network drive?
> I've been using TortoiseSVN with a repository on a network drive with a file protocol for nearly eight years, but this is my first problem. Why now? I would like an explanation that can be convincing if possible.
>
> H. Matsumura
I could imagine that some timeout happens now which didn't occur before
and therefore TSVN assumes the connection got lost and brings up the
dialog to switch to offline mode. Note this is just a guess based on the
description you are providing. I don't know enough about the internals
on this part to be certain that this explanation is actually the real cause.

--
Regards,
Stefan Hett

------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=3196037

Hiroyuki Matsumura

unread,
Dec 5, 2016, 2:58:04 AM12/5/16
to us...@tortoisesvn.tigris.org
Hi Stepan,

> I could imagine that some timeout happens now which didn't occur before
> and therefore TSVN assumes the connection got lost and brings up the
> dialog to switch to offline mode. Note this is just a guess based on the
> description you are providing. I don't know enough about the internals
> on this part to be certain that this explanation is actually the real cause.

Does this mean that you do not know the details of the inside as it relies on Appatch-Subversion-1.9.5 ?

Hmm, Damn it...

Matsumura

------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=3196042

Stefan Hett

unread,
Dec 5, 2016, 5:20:09 AM12/5/16
to us...@tortoisesvn.tigris.org
On 12/5/2016 8:58 AM, Hiroyuki Matsumura wrote:
> Hi Stepan,
>
>> I could imagine that some timeout happens now which didn't occur before
>> and therefore TSVN assumes the connection got lost and brings up the
>> dialog to switch to offline mode. Note this is just a guess based on the
>> description you are providing. I don't know enough about the internals
>> on this part to be certain that this explanation is actually the real cause.
>
> Does this mean that you do not know the details of the inside as it relies on Appatch-Subversion-1.9.5 ?
>
> Hmm, Damn it...
>
No, it means I do not know the details of the inside on that part (be it
TSVN or SVN, I can't say).

--
Regards,
Stefan Hett

------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=3196053

pegacorn

unread,
Dec 10, 2016, 11:05:17 AM12/10/16
to us...@tortoisesvn.tigris.org
From: Hiroyuki Matsumura <pine.ma...@gmail.com>
Subject: RE: Re: Log message problem on 1.9.5
Date: Thu, 1 Dec 2016 19:30:17 -0800 (PST)
/~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Again there is a problem with the Show Log of 1.9.5.
>
> * The "Want to go offline?" message is displayed in several work folders. (some work folder is OK.)
> * Forcibly go offline in some work folders. (some work folder is OK.)
>
> It is displayed normally in 1.9.4.

# This sentence is machine translated. If you can understand Japanese, please read the second half Japanese (Original).

I also faced a similar problem, so I checked the conditions under which the problem occurred.
Problem seems to occur if the following conditions are satisfied.

- The repository name contains characters that need a percent escape
and
- The name of the directory/file to be managed contains non-ASCII characters

Example:
ok file:///D:/tmp/test repo/Hello world/Hello world.txt
NG file:///D:/tmp/test repo/Hello world/こんにちは.txt
NG file:///D:/tmp/test repo/こんにちは世界/Hello.txt

Repository name and path name of pine_matsu report also seem to satisfy these conditions.

Also, problems will occur with local drives or http schemes.
Problems also occur not only in displaying logs but also in displaying differences.
There is no problem with the svn command.

If you believe in the URL displayed in the error message, the repository name is doubly percent escaped.
The following is the contents of the error message displayed when displaying the difference.
> [Window Title]
> TortoiseSVN
>
> [Main Instruction]
> Subversionのエラー報告:
>
> [Content]
> Unable to connect to a repository at URL
> 'file:///D:/tmp/test%2520repo/Hello%20world/%E3%81%93%E3%82%93%E3%81%AB%E3%81%A1%E3%81%AF.txt'
> リポジトリ
> 'file:///D:/tmp/test%2520repo/Hello%20world/%E3%81%93%E3%82%93%E3%81%AB%E3%81%A1%E3%81%AF.txt'
> を開けませんでした
>
> [閉じる(C)]

I suspected changing the URL escape processing in revision 27555, but I could not find a problem.
> Revision: 27555
> Author: steveking
> Date: 2016年11月15日 4:57:53
> Message:
> Merged revision(s) r27546, r27547, r27548, r27554 from trunk:
> * Extend the IsValidOnWindows() regex to catch double protocols in URLs.
> * Follow-up to r27546: extend the regex to catch more double-protocol URLs.
> * Always show the "to" url unescaped, even if the "from" url is escaped.
> * When escaping a path, remember if a char has been escaped and if one was, also escape all subsequent '%' chars.
>
> ----
> Modified : /branches/1.9.x
> Modified : /branches/1.9.x/src
> Modified : /branches/1.9.x/src/Utils/PathUtils.cpp
> Modified : /branches/1.9.x/src/SVN/TSVNPath.cpp
> Modified : /branches/1.9.x/src/Changelog.txt
> Modified : /branches/1.9.x/src/TortoiseProc/CopyDlg.cpp


The following is a sentence in Japanese (Original).
以下は日本語(原文)の文章です。


私も同様の問題に直面したので、問題が起きる条件を調べてみました。
以下の条件を満たすと問題が起きるようです。

・リポジトリ名にパーセントエスケープが必要な文字を含んでいる
かつ
・管理するディレクトリ/ファイルの名前に非ASCII文字を含んでいる

例:
ok file:///D:/tmp/test repo/Hello world/Hello world.txt
NG file:///D:/tmp/test repo/Hello world/こんにちは.txt
NG file:///D:/tmp/test repo/こんにちは世界/Hello.txt

pine_matsuさん報告のリポジトリ名とパス名も、これらの条件を満たしているようです。

また、ローカルドライブでもhttpスキームでも問題が起きます。
ログの表示だけでなく差分の表示などでも問題が起きます。
svnコマンドでは問題は起きません。

エラーメッセージ中に表示されるURLを信じるなら、リポジトリ名が2重にパーセントエスケープされています。
以下は差分の表示の時に表示されるエラーメッセージの内容です。
> [Window Title]
> TortoiseSVN
>
> [Main Instruction]
> Subversionのエラー報告:
>
> [Content]
> Unable to connect to a repository at URL
> 'file:///D:/tmp/test%2520repo/Hello%20world/%E3%81%93%E3%82%93%E3%81%AB%E3%81%A1%E3%81%AF.txt'
> リポジトリ
> 'file:///D:/tmp/test%2520repo/Hello%20world/%E3%81%93%E3%82%93%E3%81%AB%E3%81%A1%E3%81%AF.txt'
> を開けませんでした
>
> [閉じる(C)]

リビジョン27555でのURLのエスケープ処理の変更を疑いましたが、問題は見つけられませんでした。
> Revision: 27555
> Author: steveking
> Date: 2016年11月15日 4:57:53
> Message:
> Merged revision(s) r27546, r27547, r27548, r27554 from trunk:
> * Extend the IsValidOnWindows() regex to catch double protocols in URLs.
> * Follow-up to r27546: extend the regex to catch more double-protocol URLs.
> * Always show the "to" url unescaped, even if the "from" url is escaped.
> * When escaping a path, remember if a char has been escaped and if one was, also escape all subsequent '%' chars.
>
> ----
> Modified : /branches/1.9.x
> Modified : /branches/1.9.x/src
> Modified : /branches/1.9.x/src/Utils/PathUtils.cpp
> Modified : /branches/1.9.x/src/SVN/TSVNPath.cpp
> Modified : /branches/1.9.x/src/Changelog.txt
> Modified : /branches/1.9.x/src/TortoiseProc/CopyDlg.cpp


--
pegacorn

------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=3196699

pegacorn

unread,
Dec 10, 2016, 12:32:45 PM12/10/16
to us...@tortoisesvn.tigris.org
From: Hiroyuki Matsumura <pine.ma...@gmail.com>
Subject: RE: Re: Log message problem on 1.9.5
Date: Sun, 4 Dec 2016 15:31:58 -0800 (PST)
/~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> I appreciate your advice. I will examine it.
>
> By the way, is this problem caused by the file protocol over network drive?
> I've been using TortoiseSVN with a repository on a network drive with a file protocol for nearly eight years, but this is my first problem. Why now? I would like an explanation that can be convincing if possible.

# This sentence is machine translated. If you can understand Japanese, please read the second half Japanese (Original).

Although this problem seems not to be limited to network drive, it is stated that TortoiseSVN manual does not support it.
> 3.1.4. Accessing a Repository on a Network Share
>
> Although in theory it is possible to put a FSFS repository on a network share and have multiple users access it using file:// protocol, this is most definitely not recommended. In fact we would strongly discourage it, and do not support such use for various reasons:

If you are using Windows, VisualSVN Server is easy and recommended.

VisualSVN Server | Subversion Server for Windows:
<https://www.visualsvn.com/server/>


The following is a sentence in Japanese (Original).
以下は日本語(原文)の文章です。


今回の問題はネットワークドライブに限った問題ではないようですが、TortoiseSVNのマニュアルにもお勧めもサポートもしないと記載されています。
> 3.1.4. ネットワークフォルダー上のリポジトリへのアクセス
>
> 原理上、FSFSリポジトリはネットワークフォルダー上に配置でき、file://プロトコルを用いて複数のユーザーからアクセスできますが、これは絶対にお勧め しません 。実際のところ、このような使い方を私たちは思いとどまってほしいと強く思いますし、様々な理由からサポートもしません。
> (以下理由が続く)

Windowsをお使いなら、VisualSVN Serverが簡単でお勧めです。

VisualSVN Server | Subversion Server for Windows:
<https://www.visualsvn.com/server/>


--
pegacorn

------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=3196706

Hiroyuki Matsumura

unread,
Dec 10, 2016, 3:22:13 PM12/10/16
to us...@tortoisesvn.tigris.org
matsu...@tmt-mc.jp
2016年12月11日(日) 2:32 pegacorn <subscr...@gmail.com>:

Hiroyuki Matsumura

unread,
Dec 11, 2016, 6:25:13 PM12/11/16
to us...@tortoisesvn.tigris.org
Thank you, pegacorn-san. Because I was struggling with posting in English, I am thankful for the information in Japanese.

> - The repository name contains characters that need a percent escape
> and
> - The name of the directory/file to be managed contains non-ASCII characters

Is the Japanese character code problematic?
I tried not to use double byte code for the file name, the project name, and the folder name used in the project by experience, but the place where the repository is kept is the Japanese folder name on the company's file server I'm using. (There are only a few programmers and others are troubled if others are not Japanese)

Try using the VisualSVN Server you introduced once.

Thank you very much.

--- 以下日本語原文

pegacornさん、ありがとうございます。英語での投稿に四苦八苦していたので日本語での情報ありがたいです。

> ・リポジトリ名にパーセントエスケープが必要な文字を含んでいる
> かつ
> ・管理するディレクトリ/ファイルの名前に​非ASCII文字を含んでいる

日本語文字コードが引っかかってるわけですか。
ファイル名やプロジェクト名及びプロジェクトで使用しているフォルダー名には2バイトコードは経験上使わないようにしているのですが、リポジトリをおいている場所が、会社のファイルサーバーで日本語フォルダー名を使用しています。(プログラマはごく少数しかおらず、その他の人は日本語でないと困る人達が多数なので)

紹介してもらったVisualSVN Serverを一度使用してみます。

ありがとうございました。

pine_matsu

------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=3196817

Hiroyuki Matsumura

unread,
Dec 11, 2016, 8:20:04 PM12/11/16
to us...@tortoisesvn.tigris.org
Hi, pegacorn.

---Machine translation of Japanese below.

pegacorn was reported,

> - The repository name contains characters that need a percent escape
> and
> - The name of the directory/file to be managed contains non-ASCII characters

I thought of it and tried the following things.

Currently, the network drive where I'm keeping the repository has multiple hierarchies with the Japanese folder name when traced from the root, but if the parent folder holding the repository is replaced with another drive name (eg S: ), It turned out that I could display it well without going offline. With the path designation containing the original Japanese name, it will go offline and will not work.

However, since it is strongly deprecated to access the file using the file: / / protocol with a repository on the network drive, I would like to consider migration to Subversion server. (Actually, I have recently installed a Subversion server and I already have it in another project, but it remains as it is in previous projects.)

For the time being, I will use the subst command to make it a virtual drive and see how it is accessing while hiding the Japanese path.

It was very helpful.

---以下日本語原文
pegacornさん、こんにちは。

pegacornさんが報告された、

> ・リポジトリ名にパーセントエスケープが必要な文字を含んでいる
> かつ
> ・管理するディレクトリ/ファイルの名前に​非ASCII文字を含んでいる

で思いついて以下のことをやってみました。

現状、私がリポジトリをおいているネットワークドライブは、ルートから辿ると日本語フォルダー名で複数階層になってるのですが、リポジトリをおいている親フォルダをSubstコマンドで別のドライブ名(例えばS:)に変更して見たところ、オフラインにならずにうまく表示することができました。元の日本語名を含むパス指定では、オフラインになってうまく行きません。

ただ、ネットワークドライブにリポジトリをおいてfile://プロトコルでアクセスすることは強く非推奨とされているので、Subversionサーバーへの移行を検討したいと思います。(実は最近Subversionサーバーを設置してもらい、別のプロジェクトでは既に運用しているのですが、それ以前のプロジェクトではそのままになってるのです。)

取り敢えずは、substコマンドで仮想ドライブにして日本語パスを隠してアクセスしながら様子を見ることにします。

大変参考になりました。

pine_matsu

------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=3196824

pegacorn

unread,
Jan 6, 2017, 8:32:11 PM1/6/17
to us...@tortoisesvn.tigris.org
# This sentence is machine translated. If you can understand Japanese, please read the second half Japanese (Original).

From: pegacorn <subscr...@gmail.com>
Date: Sun, 11 Dec 2016 00:05:10 +0900 (JST)
Message-Id: <20161211.000510.247...@gmail.com>
/~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> If you believe in the URL displayed in the error message, the repository name is doubly percent escaped.

I debugged, but the repository name was doubly percent-escaped after all.

> I suspected changing the URL escape processing in revision 27555, but I could not find a problem.
> > Revision: 27555
> > Modified : /branches/1.9.x/src/Utils/PathUtils.cpp

Also, doubly percent-escaping is due to changes in CPathUtils::PathEscape() at revision 27555.

Before change:
CPathUtils::PathEscape(const CStringA& path): in: file:///D:/tmp/test%20repo/Hello world/こんにちは.txt
CPathUtils::PathEscape(const CStringA& path): out: file:///D:/tmp/test%20repo/Hello%20world/%E3%81%93%E3%82%93%E3%81%AB%E3%81%A1%E3%81%AF.txt

After change:
CPathUtils::PathEscape(const CStringA& path): in: file:///D:/tmp/test%20repo/Hello world/こんにちは.txt
CPathUtils::PathEscape(const CStringA& path): out: file:///D:/tmp/test%2520repo/Hello%20world/%E3%81%93%E3%82%93%E3%81%AB%E3%81%A1%E3%81%AF.txt

However, as you can see from the input URL to CPathUtils::PathEscape() above, changing CPathUtils::PathEscape() in revision 27555 only triggered this problem, and an input URL was incorrect from before.
Correctly, I think that it should be an input URL like the following.

Correct:
CPathUtils::PathEscape(const CStringA& path): in: file:///D:/tmp/test repo/Hello world/こんにちは.txt
CPathUtils::PathEscape(const CStringA& path): out: file:///D:/tmp/test%20repo/Hello%20world/%E3%81%93%E3%82%93%E3%81%AB%E3%81%A1%E3%81%AF.txt

An incorrect input URL is made, for example, in the following part.

src/TortoiseProc/LogDialog/LogDlg.cpp
/~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> void CLogDlg::DoDiffFromLog( INT_PTR selIndex, svn_revnum_t rev1, svn_revnum_t rev2, bool blame, bool unified, bool ignoreprops )
(snip)
> firstfile = filepath + firstfile.Trim();
> secondfile = filepath + secondfile.Trim();

The filepath is an escaped URL(file:///D:/tmp/test%20repo) of the repository.
The firstfile and the secondfile before join are an unescaped file path(/Hello world/こんにちは.txt).

There are other places where TortoiseSVN combine such URL components with different escape state.
In other words, the root cause seems to be that TortoiseSVN cannot manage the state of percent-escape of URL.
I attempted to fix it but it seemed to me that it was not easy to fix for reasons such as the wide range of effects and the explanation of the escape state is not written in the API description.

For the time being, like pine_matsu-san, it seems to be quick to change the repository name to a name that does not require percent-escape...

# As for Subversion, as described in "ext/Subversion/subversion/include/svn_dirent_uri.h"
# it seems that we always pass an escaped URL and Subversion always return an escaped URL.
# TortoiseSVN seems to be the specification that passes unescaped URL to the SVN class in the description of "src/SVN/SVN.h",
# but there is no description about the URL to return, SVN::GetURLFromPath(), SVN::GetRepositoryRootAndUUID() etc return an escaped URL.
# I think this is the cause of confusion.
#
# src/SVN/SVN.h
# /~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# > * \remark Please note that all URLs passed to any of the methods of this class
# > * must not be escaped! Escaping and unescaping of URLs is done automatically.
# > * The drawback of this is that valid pathnames with sequences looking like escaped
# > * chars may not work correctly under certain circumstances.


The following is a sentence in Japanese (Original).
以下は日本語(原文)の文章です。


> エラーメッセージ中に表示されるURLを信じるなら、リポジトリ名が2重にパーセントエスケープされています。

デバッグしてみた所、やはりリポジトリ名が2重にパーセントエスケープされていました。

> リビジョン27555でのURLのエスケープ処理の変更を疑いましたが、問題は見つけられませんでした。
> > Revision: 27555
> > Modified : /branches/1.9.x/src/Utils/PathUtils.cpp

また、2重にパーセントエスケープされるようになったのは、リビジョン27555でのCPathUtils::PathEscape()の変更が原因です。

変更前:
CPathUtils::PathEscape(const CStringA& path): in: file:///D:/tmp/test%20repo/Hello world/こんにちは.txt
CPathUtils::PathEscape(const CStringA& path): out: file:///D:/tmp/test%20repo/Hello%20world/%E3%81%93%E3%82%93%E3%81%AB%E3%81%A1%E3%81%AF.txt

変更後:
CPathUtils::PathEscape(const CStringA& path): in: file:///D:/tmp/test%20repo/Hello world/こんにちは.txt
CPathUtils::PathEscape(const CStringA& path): out: file:///D:/tmp/test%2520repo/Hello%20world/%E3%81%93%E3%82%93%E3%81%AB%E3%81%A1%E3%81%AF.txt

しかし、上記のCPathUtils::PathEscape()への入力URLを見てわかるように、リビジョン27555でのCPathUtils::PathEscape()の変更は今回の問題のきっかけになっただけで、以前から入力URLが間違っていました。
正しくは、以下のような入力URLにならなければならないはずです。

正:
CPathUtils::PathEscape(const CStringA& path): in: file:///D:/tmp/test repo/Hello world/こんにちは.txt
CPathUtils::PathEscape(const CStringA& path): out: file:///D:/tmp/test%20repo/Hello%20world/%E3%81%93%E3%82%93%E3%81%AB%E3%81%A1%E3%81%AF.txt

この間違った入力URLを作っているのは、例えば以下の箇所です。

src/TortoiseProc/LogDialog/LogDlg.cpp
/~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> void CLogDlg::DoDiffFromLog( INT_PTR selIndex, svn_revnum_t rev1, svn_revnum_t rev2, bool blame, bool unified, bool ignoreprops )
(省略)
> firstfile = filepath + firstfile.Trim();
> secondfile = filepath + secondfile.Trim();

filepathは、リポジトリのエスケープされたURL(file:///D:/tmp/test%20repo)です。
結合前のfirstfile, secondfileは、エスケープされていないファイルパス(/Hello world/こんにちは.txt)です。

このようなエスケープ状態の事なるURLコンポーネントを結合している個所が他にもあります。
つまり、根本的な原因はTortoiseSVNがURLのパーセントエスケープの状態を管理できていない事のようです。
修正を試みましたが、影響が広範囲に渡っている事や、エスケープ状態の説明がAPIの説明に書かれていない等の理由で、私には簡単には治せそうにありませんでした。

取り敢えず、pine_matsuさんのようにリポジトリ名をパーセントエスケープが不要な名前に変更して凌ぐのが手っ取り早そうです…

# Subversionは、「ext/Subversion/subversion/include/svn_dirent_uri.h」に書かれている通り、
# 常にエスケープしたURLを渡し、常にエスケープしたURLを返すようです。
# TortoiseSVNは、「src/SVN/SVN.h」の説明ではSVNクラスにはエスケープしていないURLを渡す仕様のようですが、
# 返すURLについては説明がなく、SVN::GetURLFromPath()やSVN::GetRepositoryRootAndUUID()等はエスケープしたURLを返しています。
# これが混乱の原因だと思います。
#
# src/SVN/SVN.h
# /~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# > * \remark Please note that all URLs passed to any of the methods of this class
# > * must not be escaped! Escaping and unescaping of URLs is done automatically.
# > * The drawback of this is that valid pathnames with sequences looking like escaped
# > * chars may not work correctly under certain circumstances.


--
pegacorn

------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=3199280
Reply all
Reply to author
Forward
0 new messages