简体   繁体   English

如何判断 svn 工作区是否已“切换”?

[英]How do I tell if an svn workspace has been 'switched'?

If I have a workspace that was initially checked out from a repository ~/trunk , then at the end of the last week I may or may not have run: svn switch ~/branches/somethingcool.如果我有一个最初从存储库~/trunk签出的工作区,那么在上周结束时,我可能会运行也可能不会运行: svn switch ~/branches/somethingcool. , but a weekend has passed and I can't remember if I switched myself back, what can I do to check that? ,但是一个周末过去了,我不记得我是否把自己换回来了,我该怎么做才能检查呢?

svn info will tell you which repository your working copy is linked too. svn info将告诉您您的工作副本也链接到哪个存储库。

Since you have mentioned just SVN, I will point you to my answer regarding the same thing - it is a powershell one liner that will look at your working copy and spew out the repo URL for eac directory.既然您只提到了 SVN,我将向您指出我对同一件事的回答 - 它是一个 powershell 一个衬垫,它将查看您的工作副本并为 55902A23A8BZ65 的 repo ZE6B391A8D2C4D45902A23A8BZ68 喷出回购目录。 You can get the idea a bash script if you are on *nix:如果你在 *nix 上,你可以得到一个 bash 脚本的想法:

gci | ?{ $_.psIsContainer -eq $true -and ((svn status $_.fullname) -notmatch "\?")} | %{svn info $_.fullname} | select-string -Pattern "PATH:|URL:"

How can I tell that all directories in a SVN working copy point at the same repository root? 如何判断 SVN 工作副本点中的所有目录都位于同一存储库根目录?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM