开发者

How to commit files from different folders in MacHg?

开发者 https://www.devze.com 2022-12-30 02:19 出处:网络
In MacHg, how do you select one and only one file from one folder and one开发者_开发知识库 and only one file from another folder to commit when you have other changed files in the same folder?

In MacHg, how do you select one and only one file from one folder and one开发者_开发知识库 and only one file from another folder to commit when you have other changed files in the same folder?

In the command line it would be:

hg commit folder1/file1 folder2/file2 -m "Message."


Hi I am the author of MacHg (a native OSX 10.6+ GUI client for Mercurial).

First, good question!

Updated: You can now drop some changesets directly from the commit sheet. Ie you select a bunch of files and then go to commit them and this will open the commit sheet where you enter the commit message review the files, etc. In this sheet you can drop some of the files you have decided to commit.

Actually not that I have used GIT all that much but I have downloaded GitX and I really like the staging area idea. I can see that it could work quite nicely. Now although there are extensions for staging areas and stuff in Mercurial, I think the hard bit as far as MacHg is the UI for this feature. (I looked at the GitX source code and its a bit tricky in there where he does the hunk patch management.) I actually think I would do this hunk management through FileMerge though and have it a bit more like using the attic extension. On the back end it shouldn't be to difficult to use a patch queue or something to get the same desired effect of a staging area (although I haven't written this part of the code yet so I can't say for sure...) I'll let you know when I get there!

So there you go:

  1. You can drop files from the commit sheet (or use the collapse workaround if you want)
  2. In the future, something akin to a cross between staging area / attic extension sort of thing.

You can check out other FAQ's about MacHg there.


The MacHG guy says otherwise, but can't you just do this?

hg commit -I folder1/file1 -I folder2/file2 -m "Message."
0

精彩评论

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