简体   繁体   English

svn相当于hg in

[英]svn equivalent to hg in

Where I used to work, we version-controlled with Mercurial. 在我以前工作的地方,我们使用Mercurial进行版本控制。 I have a new job and we use Subversion there. 我有一份新工作,我们在那里使用Subversion。 I'm new to Subversion. 我是Subversion的新手。

I find myself wanting to know what has been checked in since my checkout on the remote repo. 我发现自己想知道自从我在远程仓库结帐后已经检查了什么。 In Mercurial, I'd use hg in . 在Mercurial中,我会使用hg This would show me the set of changesets available remotely but not in my local repo. 这将显示远程可用的变更集集,但不会显示在我的本地仓库中。 How do I do such a thing in Subversion? 我如何在Subversion中做这样的事情? That is, how to I find what changes have been done since my last co/update? 也就是说,如何找到自上次合作/更新以来所做的更改?

From my reading, it looks like svn update is used a lot, but I don't want my working copy to be modified with who knows what. 从我的阅读,看起来svn更新使用了很多,但我不希望我的工作副本被修改与谁知道什么。 I want to see what's out there (if anything) before doing a pull. 我想在拉动之前看看那里有什么(如果有的话)。

Thanks for the help. 谢谢您的帮助。

You could use the following command (from here ): 您可以使用以下命令(从此处 ):

svn status -u

or 要么

svn status --show-updates

You probably want to see the actual commit summaries as part of this, and for that you can use svn log . 您可能希望看到实际的提交摘要作为其中的一部分,为此您可以使用svn log

Specifically, you can use svn log -r HEAD:BASE to see all commits up to and including your latest update, starting with the latest revision. 具体来说,您可以使用svn log -r HEAD:BASE查看所有提交,包括最新更新,从最新版本开始。 (To see the newest revision last, swap HEAD and BASE.) (要查看最新版本,请更换HEAD和BASE。)

You can't do that. 你不能这样做。 With Subversion you don't have a local repo. 使用Subversion,您没有本地仓库。 What you checkout is the working copy, not a repository. 结帐的是工作副本,而不是存储库。

When you update, you get the changes from the server (ie it's update+fetch), when you run commit you send the changes to the server (ie commit+push). 更新时,您将从服务器获得更改(即更新+获取),当您运行提交时,您将更改发送到服务器(即commit + push)。 It's not possible to accumulate change sets locally and then send them to the server. 无法在本地累积更改集,然后将它们发送到服务器。 It all goes directly to the server or comes from the server. 这一切都直接进入服务器或来自服务器。

If you find this antiquated, keep in mind that Subversion is older than Mercurial. 如果你发现这个过时,请记住Subversion比Mercurial旧。 Most people switch from Subversion to either git or Mercurial, not the other way around. 大多数人从Subversion切换到git或Mercurial,而不是相反。 (I see that you do this because you got a new employer.) (我看到你这样做是因为你有一个新雇主。)

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

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