开发者

how update source on standalone computer with hg?

I use mercurial on a standalone computer. I have also made some small changes of the source code on this computer. Now I want to update this code with a new version that I can bring to this computer on a CD or usb-stick as a gziped tar file. How do I do this update in the best way, and keep my changes of the standalone source.

Update: I forgot to mention that the files on the USB-stick is not from a mercurial database, t开发者_运维知识库hey are just a bunch of source-files from a perforce controlled source tree. We have mercurial only on the standalone computer.


On the remote machine (first time):

hg clone {path_to_repository} {path_on_usb_stick}

On subsequent runs:

cd {path_to_repository}
hg push {path_on_usb_stick}

Then on the local machine:

cd {path_to_repository}
hg commit
hg pull {path_on_usb_stick}
hg up

At some point, hg might warn you about multiple heads, which means there are conflicts that you need to resolve by running hg merge.

To get your changes from the local machine to the repo server, you reverse the procedure.


Why not just put Mercurial binaries and a .hg repo right on the flash drive. Then you can push/pull to/from it at home, and copy atop it at work.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜