简体   繁体   中英

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. Does anyone know of a way in svn to enforce an "svn up" before doing a commit? I'm using svn on Ubuntu. 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

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. So in your current state, the worst that should be happening is your commit is rejected by the server.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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