SVN::GetRootAndHead
Daniel Sahlberg via TortoiseSVN-dev <[email protected]> Sat, 9 Mar 2024 11:51:50 -0800 (PST)
| Newsgroups | gmane.comp.version-control.subversion.tortoisesvn.devel |
|---|---|
| Message-ID | <[email protected]> |
------=_Part_218322_193970547.1710013910666
Content-Type: multipart/alternative;
boundary="----=_Part_218323_433174756.1710013910666"
------=_Part_218323_433174756.1710013910666
Content-Type: text/plain; charset="UTF-8"
Hi,
In the users group, a user reported an error when starting View log from
the repobrowser using a peg revision if the file had subsequently been
deleted, see [1].
I have investigated and it seems SVN::GetRootAndHead is
calling GetHeadRevision with a path (which potentially is deleted and thus
the repository will return an error). A few lines above, the code has
retrieved the root URL.
I've tried the following patch which seems to resolve the issue.
[[[
Index: SVN/SVN.cpp
===================================================================
--- SVN/SVN.cpp (revision 29681)
+++ SVN/SVN.cpp (working copy)
@@ -2806,7 +2806,7 @@
}
else
{
- rev = cachedProperties.GetHeadRevision(uuid, path);
+ rev = cachedProperties.GetHeadRevision(uuid, url);
if ((rev == NO_REVISION) && (m_err == nullptr))
{
CHooks::Instance().PreConnect(CTSVNPathList(path));
]]]
Any comments?
Kind regards,
Daniel
[1] https://groups.google.com/g/tortoisesvn/c/N2bp4hyLRI8/m/8MlT8yJ_AAAJ
--
You received this message because you are subscribed to the Google Groups "TortoiseSVN-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/tortoisesvn-dev/0f43666c-e282-480f-a77e-161d6ad5a871n%40googlegroups.com.
------=_Part_218323_433174756.1710013910666
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Hi,<div><br /></div><div>In the users group, a user reported an error when =
starting View log from the repobrowser using a peg revision if the file had=
subsequently been deleted, see [1].</div><div><br /></div><div>I have inve=
stigated and it seems SVN::GetRootAndHead is calling=C2=A0GetHeadRevision w=
ith a path (which potentially is deleted and thus the repository will retur=
n an error). A few lines above, the code has retrieved the root URL.</div><=
div><br /></div><div>I've tried the following patch which seems to resolve =
the issue.</div><div><br /></div><div>[[[</div><div>Index: SVN/SVN.cpp<br /=
>=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D<br />--- SVN/SVN.cpp=
(revision 29681)<br />+++ SVN/SVN.cpp (working copy)<br />@@ -2806,7 +2806=
,7 @@<br />=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0}<br />=C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0else<br />=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0{<br />- =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0rev =3D cachedProperties.GetHeadRevision(=
uuid, path);<br />+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0rev =3D cached=
Properties.GetHeadRevision(uuid, url);<br />=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0if ((rev =3D=3D NO_REVISION) && (m_err =3D=3D null=
ptr))<br />=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0{<br />=C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0CHooks::Instance().P=
reConnect(CTSVNPathList(path));<br /></div><div>]]]</div><div><br /></div><=
div>Any comments?</div><div><br /></div><div>Kind regards,</div><div>Daniel=
</div><div><br /></div><div><br /></div><div>[1] https://groups.google.com/=
g/tortoisesvn/c/N2bp4hyLRI8/m/8MlT8yJ_AAAJ<br /></div><div><br /></div>
<p></p>
-- <br />
You received this message because you are subscribed to the Google Groups &=
quot;TortoiseSVN-dev" group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:[email protected]">tor=
[email protected]</a>.<br />
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/d/msgid/tortoisesvn-dev/0f43666c-e282-480f-a77e-161d6ad5a871n%40googlegr=
oups.com?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.com/=
d/msgid/tortoisesvn-dev/0f43666c-e282-480f-a77e-161d6ad5a871n%40googlegroup=
s.com</a>.<br />
------=_Part_218323_433174756.1710013910666--
------=_Part_218322_193970547.1710013910666--