How can I obtain a commit of LLVM using a svn revision number?

Hi, developers,
For some reasons, I want to obtain some old commits of LLVM. However, I only know the svn revision numbers of these commits of LLVM.
I tried the command “svn co https://llvm.org/svn/llvm-project/llvm/trunk llvm” listed in “Getting Started with the LLVM System”, but the server seems to be not working.
I always get the following message.
“svn: E000104: Error running context: Connection reset by peer”

I also try the commands listed in “Moving LLVM Projects to GitHub”,
"
git clone https://llvm.org/git/llvm.git
cd llvm/
git svn init https://llvm.org/svn/llvm-project/llvm/trunk --username=
git config svn-remote.svn.fetch :refs/remotes/origin/master
git svn rebase -l
git checkout git svn find-rev -B r258109

cd tools
git clone https://llvm.org/git/clang.git
cd clang/
git svn init https://llvm.org/svn/llvm-project/clang/trunk --username=
git config svn-remote.svn.fetch :refs/remotes/origin/master
git svn rebase -l
git checkout git svn find-rev -B r258109

"
but it is still not working. When I execute the command “git svn rebase -l” for clang, I get the following message.
“Unable to determine upstream SVN information from working tree history”

So is there any way to obtain special commit of LLVM using a svn revision number?

Best,
Zhide

Hello Zhide,

You can use LLVM Phabricator for that purpose.

For example, if you’re looking for svn commit 258109, add ‘rL’ in front of it, such as: https://reviews.llvm.org/rL258109

Since the entire svn history was replayed on github, you can then search for the following on the same website: “llvm-svn: 258109”

This will give you the correspondent github commit hash for the svn commit above:

https://reviews.llvm.org/rG31955002975b5ae9e4130d0fbeb954bbeb0f95f0

Would that suit what you’re trying to achieve?

Alex.

Envoyé : November 28, 2020 8:47 AM

I think you can search “llvm-svn: 258109” in git log directly.

Thanks

Pengfei

To: