就地编辑、版本控制 - 您的解决方案是什么? [英] In-place editing, version control - what's your solution?

查看:25
本文介绍了就地编辑、版本控制 - 您的解决方案是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用 SVN 进行开发任务,但仍有许多文件由 RCS 管理,因为在我的私有 SVN 存储库工作副本中编辑它们似乎不合理(因为它们通常只是也经过最佳测试的配置文件到位).在有文件置于 SVN 控制之下的任何地方拥有存储库的工作副本似乎也不合理,所以我只使用 RCS.

I am using SVN for development tasks, but still have many files managed with RCS, because it does not seem reasonable to edit them in my private SVN repository working copy (since they're often just configuration files that are also best tested in-place). It also doesn't seem reasonable to have a working copy of the repository wherever there are files to put under SVN control, so I just use RCS instead.

对于理想情况下不应四处移动/就地编辑和测试的文件,您的管理方法是什么?

What is your approach for managing files that should ideally not be moved around / are edited and tested in-place?

更准确地说:我想要相当于

To be more precise: I'd like to have the equivalent of

  • 有一个写保护的 file.txt
  • 像co -l file.txt"(RCS)这样的命令使其可编辑
  • 能够就地编辑并立即测试
  • 像ci -u file.txt"(RCS)这样的命令来记录更改、添加注释并使其再次只读
  • 其他用户也应该可以在同一个地方这样做
  • 但是,版本信息应该放在另一个服务器上的安全位置(大概是 svn 代表)

推荐答案

我在写文件系统 (CoW) 上使用副本,例如 Ext3cow(免责声明,我是它的贡献者之一)来管理很多东西.例如:

I use copy on write file systems (CoW) such as Ext3cow (disclaimer, I'm one of its contributors) to manage a lot of stuff. For instance:

  • 使用快照回滚整个存储库,无论哪种类型.例如,如果我完全搞砸了一个 git 树,我可以 cp -dpfR ./@123456789 ./,它将我的工作仓库替换为文件,就像它们在 123456789 纪元时一样.
  • 使用版本控制/快照作为它自己的不可变 VCS,非常适合/etc 和其他事情.由于过去的文件无法删除或修改,因此每个快照都是对单个文件或整个树的不可变修订.

通常情况下,我使用 Git 或 Mercurial 而不是 Subversion,因为我更喜欢分布式 VCS,但我现在坚持将我的存储库保留在本地版本控制系统上.

Typically, I use Git or Mercurial over Subversion because I prefer a distributed VCS, but I now insist on keeping my repositories on a versioning FS locally.

对于 Windows 用户,我相信有一些相同的可移植实现完全在 python 中完成......但不太确定.

For Windows users, I believe that there are some portable implementations of the same done completely in python ... but not really sure.

这篇关于就地编辑、版本控制 - 您的解决方案是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆