我正在评估git-svn并尝试确定它与特定svn存储库的效果.我主要关心的是让git-svn执行合并,以便在subversion repo中正确设置svn:mergeinfo属性.这可能吗?
这是我到目前为止所做的:
# Checkout the SVN repo.
$ git svn clone svn://server/project1 -T trunk -b branches -t tags
# Make sure we are working on trunk.
$ git reset --hard remotes/trunk
# Modify the working copy.
$ vim file.txt
# Commit locally to the git repo.
$ git commit -a
# Push the commits back to the SVN server.
$ git svn dcommit
Committing to svn://server/project1/trunk ...
M file.txt
Committed r178
M file.txt
r178 = b6e4a3a0c28e7b9aa71d8058d96dcfe7c8a2b349 (trunk)
Run Code Online (Sandbox Code Playgroud)
现在,我将如何将该特定提交合并到一个subversion分支中?同样,对我来说非常重要的是git在提交更改时正确设置了svn:mergeinfo属性.
我的所有代码库都存储在一个subversion存储库中,我将其分散在负载均衡的Apache Web服务器中,从而可以轻松检查代码,运行更新,并将我的代码无缝地开发到生产环境中.
我确信有一个简单的方法(除了在每次结账时执行脚本),其中一个不便之处就是在使用subversion更新或检出的文件上设置(返回)Linux权限.我们的安全团队已经将它设置了Owner和Group在设置的httpd.conf文件,以及内的所有目录documentRoot的700收到的权限,所有非可执行文件(例如*.PHP,*.smarty,*.PNG)收到的Linux权限600,所有可执行文件接收700(例如*.sh,*.pl,*.py).所有文件必须具有所有者和组apache:apache,以便httpd服务读取,因为只有文件所有者设置为通过权限进行访问.
每次我运行一个svn update,或者svn co,即使文件可能没有被创建(即svn update),我发现文件的所有权设置为运行svn命令的帐户,通常是文件权限被设置为除了它们之前的东西(即更新之前的.htm文件是600,但之后svn update,它被设置为755,甚至是777).
绕过subversion尝试更新文件权限和所有权的最简单方法是什么?有没有什么可以在svn客户端或Linux服务器上完成以保留原始文件权限?我正在运行RHEL5(现在只有几个选择实例).
在我在eclipse中安装了SVN插件并重新启动后出现了一条消息,要求安装颠覆连接器发现有SVN Kit和Native JavaHL,我很困惑哪一个安装,为什么任何一个请指导我.
假设我们有一个包含敏感密码的配置文件.我想版本控制整个项目,包括配置文件,但我不想共享我的密码.
这可能是好的,如果这个配置文件:
database_password=secret
foo=bar
Run Code Online (Sandbox Code Playgroud)
变
database_password=*
foo=bar
Run Code Online (Sandbox Code Playgroud)
而且vcs的其他用户也可以自己设置密码.忽略文件不是一个好方法,开发人员应该知道,如果配置文件发生了变化.
本地版本:
database_password=own_secret
foo=bar
Run Code Online (Sandbox Code Playgroud)
vcs中的配置文件:
database_password=*
foo=bar
Run Code Online (Sandbox Code Playgroud)
然后突然,配置文件发生了变化:
database_password=*
foo=bar
baz=foo
Run Code Online (Sandbox Code Playgroud)
每个开发人员都会使用本地版本:
database_password=own_secret
foo=bar
baz=foo
Run Code Online (Sandbox Code Playgroud)
这是我的解决方案.我怎么能实现这种行为?你如何存储你的配置文件?有没有办法做到这一点,还是我应该破解什么?
我正在尝试使用svn2git将我的存储库从svn导入到git,但是当它遇到分支时似乎失败了.有什么问题?
Found possible branch point: https://s.aaa.com/repo/trunk/project => https://s.aaa.com/repo/branches/project-beta1.0, 128
Use of uninitialized value in substitution (s///) at /opt/local/libexec/git-core/git-svn line 1728.
Use of uninitialized value in concatenation (.) or string at /opt/local/libexec/git-core/git-svn line 1728.
refs/remotes/trunk: 'https://s.aaa.com/repo' not found in ''
Running command: git branch -l --no-color
* master
Running command: git branch -r --no-color
trunk
Running command: git checkout trunk
Note: checking out 'trunk'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and …Run Code Online (Sandbox Code Playgroud) Git/Mercurial越来越受欢迎.我看过很多文章比较SVN和Git/Mercurial,但我想知道是否真的有任何理由继续使用SVN.现在Git/Mercurial似乎有很多工具可以帮助推广其企业采用.
有没有理由继续使用SVN?Mercurial/Git终于为公司采用做好了准备吗?
在我的svn回购许多快乐的承诺之后,突然之间关系变得很糟糕...... svn翻了个盖子喊道:" 工作复制文本基础已经腐败了! "
可能是什么导致了这个?我如何解决它?
Working copy text base is corrupt
svn: Commit failed (details follow):
svn: Checksum mismatch for '~/blah/.svn/text- base/sumonet.py.svn-base'; expected: '548b9bb4b24bc580ab8694c583b28013', actual: '8b2b3cf4615de3d8520ae4841b3b0a8b'
Run Code Online (Sandbox Code Playgroud) 我无法从Eclipse配置中删除Subclipse.
由于m2eclipse项目放弃了对Subclipse的支持,我决定切换到Subversive.
所以我卸载了Subclipse,然后使用About Eclipse - > Installation Details - > Uninstall方法安装Subversive.现在,当我进入任何与Team相关的选项/任务/首选项时,有两个可用的SVN选项(一个用于Subversive,一个用于Subclipse)使生活变得混乱.
抓住.metadata字符串的工作区文件夹后,subclipse我可以看到配置仍然充斥着对Subclipse的引用:
$ grep -lir "subclipse" .metadata/
.metadata/.plugins/org.eclipse.ui.workbench/workbench.xml
.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.workbench.prefs
.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.team.ui.prefs
.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.debug.ui.prefs
.metadata/.plugins/org.eclipse.epp.usagedata.recording/upload17.csv
.metadata/.plugins/org.eclipse.epp.usagedata.recording/upload23.csv
.metadata/.plugins/org.eclipse.epp.usagedata.recording/upload21.csv
.metadata/.plugins/org.eclipse.epp.usagedata.recording/upload19.csv
.metadata/.plugins/org.eclipse.epp.usagedata.recording/usagedata.csv
.metadata/.plugins/org.eclipse.epp.usagedata.recording/upload22.csv
.metadata/.plugins/org.eclipse.epp.usagedata.recording/upload14.csv
.metadata/.plugins/org.eclipse.epp.usagedata.recording/upload13.csv
.metadata/.plugins/org.eclipse.epp.usagedata.recording/upload20.csv
.metadata/.plugins/org.eclipse.epp.usagedata.recording/upload18.csv
.metadata/.plugins/org.eclipse.epp.usagedata.recording/upload16.csv
.metadata/.plugins/org.eclipse.epp.usagedata.recording/upload15.csv
.metadata/.plugins/org.eclipse.team.ui/dialog_settings.xml
.metadata/.plugins/org.eclipse.team.ui/syncParticipants.xml
.metadata/.plugins/org.eclipse.pde.core/-213569165961.target/.lazy
.metadata/.plugins/org.eclipse.pde.core/-213569165961.target/.state
.metadata/.plugins/org.eclipse.pde.core/-213569165961.target/.pluginInfo
.metadata/.plugins/org.eclipse.core.resources/.projects/jxse-tutorials/.syncinfo.snap
.metadata/.plugins/org.eclipse.core.resources/.projects/jxse-tutorials/.indexes/properties.index
.metadata/.plugins/org.eclipse.core.resources/.projects/BA_NAT_Traversal/.syncinfo
.metadata/.plugins/org.eclipse.core.resources/.projects/barchart-udt/.syncinfo
.metadata/.plugins/org.eclipse.core.resources/.projects/barchart-udt/.indexes/properties.index
.metadata/.plugins/org.eclipse.core.resources/.projects/netty-benchmark/.syncinfo
.metadata/.plugins/org.eclipse.core.resources/.projects/netty-benchmark/.indexes/properties.index
.metadata/.plugins/org.eclipse.core.resources/.projects/jxta/.syncinfo.snap
.metadata/.plugins/org.eclipse.core.resources/.root/73.tree
.metadata/.plugins/org.eclipse.core.resources/.snap
.metadata/.bak_0.log
Run Code Online (Sandbox Code Playgroud)
上面的所有项目现在都与SVN断开连接.显然有些参考文献如usagedata并不重要,但我更担心的是XML文件.手动浏览并删除与Subclipse相关的所有标签/属性是否安全?我觉得这种做法可能是不明智的.
有没有人知道如何在不丢失工作空间的情况下消除Subclipse的所有痕迹?关于我可能做错了什么的任何提示?在切换到Subversive之前,我是否应该手动断开所有SVN项目?
我听说过一些声称SVN比Git/Mercurial更好地处理二进制文件.这是真的,如果是这样,为什么呢?据我所知,没有版本控制系统(VCS)可以在相同二进制资源的两个版本之间区分和合并更改.
那么,并非所有VCS都不善于处理二进制文件吗?我不太了解特定VCS实现背后的技术细节,所以可能它们有一些优点和缺点.
我试图忽略我的项目中的构建文件夹,我尝试svn:ignore递归添加属性,添加到Settings > Version Control > Ignore Files,从Subversion下的右键菜单我不能选择忽略选项,它是灰色的.当我在项目中选择提交目录时,我完成了所有这些后,构建文件夹仍然显示.使文件夹被忽略的正确方法是什么?