Revision control locking: Is the jury still out?

前端 未结 12 1250
不知归路
不知归路 2020-12-25 13:53

When I\'m online it seems that everyone has agreed that using the exclusive locking workflow in source control is a Bad Thing. All the new revision control systems I see app

12条回答
  •  有刺的猬
    2020-12-25 14:19

    Interesting question. To me, the issue is not so much whether to lock, but how long to lock. In this shop, I'm a minority of one, because I like to merge. I like to know what other people have done to to the code. So what I do is:

    • Always work in a local copy of the source tree.

    • Run Windiff often against the "official" code and if necessary merge changes down to my local copy. For merging, I use an old Emacs (Epsilon) and have the compare-buffers command bound to a hot-key. Another key says "make the rest of this line like the one in the other file", because many changes are small.

    • When I'm ready to check in changes, Windiff tells me what files I need to lock, check in, and unlock. So I keep them locked as short a time as possible, like minutes.

    So when Fearless Leader says "Have you checked in your code?" the answer is "I don't have any checked out."

    But as I said, I'm a minority of one.

提交回复
热议问题