本地提交到中央服务器 [英] Local commits pushing to a central server

查看:104
本文介绍了本地提交到中央服务器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在工作中,我们使用perforce,并鼓励定期提交它(我很好)。然而,我想运行一些类似于mercurial的东西,所以我可以在本地提交正在工作的东西,并且不一定需要编译/运行,然后从我这里定期提交给中央的perforce服务器。



我的问题有两点,首先,有人知道Visual Studio如何处理多个源代码管理绑定(理想情况下,我希望一切尽可能自治 - 嘿,第二,是否有任何可用的工具可以让我做一些简单的事情,比如检查mercurial repository的当前头部到perforce 。



我似乎记得GIT允许你做类似的事情,我并不完全反对。



如果我错过了任何明显的或者完全错误的想法,请随时反馈我);

干杯

解决方案

你的想法的兴趣在私下提交中并不像在离线开发中那样:即使没有连接到中央Perforce存储库,Mercurial或Git也可以让您工作。



但是对于分支,它们更易于创建或与Hg或Git合并,所以它可能是一个想法。

原则是在您的Perforce工作区中创建Hg或Git回购权。



这篇文章


使用mercurial和perforce(或其他一些集中式vcs)如果代码已经在执行,我将下载一个副本并将hg init放入本地存储库;否则我会初始化使用mercurial并在稍后检查perforce(通常这是针对尖峰)。

我会做一些工作,在我去mercurial时提交。

我的perforce提交往往是小型hg提交的汇总,或者如果我想特别跟踪更改,我将通过使用hg update滚动历史记录来检查各个hg提交(下面还有更多内容)。 >
请不要将.hg文件夹提交到perforce中


At work we use perforce and are encouraged to make regular commits to it (something I am fine with). However, I'd like to run something like mercurial so I can locally commit stuff that is work in progress and doesn't necessarily compile/run and then from this do my regular commits to the central perforce server.

My question here is kind of two-fold, first off, does anyone know how well Visual Studio would cope with multiple source control bindings (ideally I want everything to be as autonomous as possible - hey, I'm lazy:))

And secondly, are there any tools available that would allow me to do something as simple as "Check current head of mercurial repository in to perforce".

I seem to recall GIT allows you to do something similar to this, and I'm not entirely against trying it out.

If I've missed out anything obvious or am thinking about this in entirely the wrong way, please feel free to berate me ;)

Cheers

解决方案

The interest of your idea is not so much in the private commits as it would be in the "off-line development": Mercurial or Git would allow you to work even if not connected to the central Perforce repository.

But regarding branching, they are easier to create or merge with Hg or Git, so it could be an idea.
The principle would be to create your Hg or Git repo right in your Perforce workspace.

This article using mercurial with perforce (or some other centralized vcs) does illustrate a similar approach:

If the code is already in perforce, I'll pull down a copy and hg init a local repository; otherwise I'll init using mercurial and check into perforce later (typically this is for a spike).
The I'll do some work, committing as I go to mercurial.
My perforce commit tends to be a rollup of smaller hg commits, alternatively if I want to track changes specifically I'll check in the individual hg commits by rolling forward the history using "hg update" (some more on this below).
Don't commit the .hg folder into perforce by the way

这篇关于本地提交到中央服务器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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