[英]Force svn up before commits
I have been using svn fast and furious to do commits and, because I'm airhead, I can't seem to remember to to "svn up" before my commits. 我一直在快速而愤怒地使用svn来进行提交,并且由于我是空头,我似乎不记得在提交之前先“ svn up”。 Does anyone know of a way in svn to enforce an "svn up" before doing a commit?
有谁知道在执行提交之前在svn中执行“ svn up”的方法吗? I'm using svn on Ubuntu.
我在Ubuntu上使用svn。 Many thanks!
非常感谢! Janie
珍妮
Create an alias for yourself in your shell. 在外壳程序中为自己创建一个别名。 Something like this:
像这样:
svnci = svn up;svn ci
Or even a small shell script in your $ PATH
甚至是$
PATH
一个小shell脚本
But how will you manage merge conflicts and compilation errors when this happens? 但是,发生这种情况时,您将如何管理合并冲突和编译错误?
svn commit
should not allow you to commit (well, the server shouldn't) unless your working copy is already up to the HEAD
revision anyway. 除非您的工作副本已经达到
HEAD
版本,否则svn commit
不应允许您进行提交(当然,服务器也不应这样做)。 So in your current state, the worst that should be happening is your commit is rejected by the server. 因此,在当前状态下,应该发生的最坏情况是服务器拒绝了您的提交。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.