dvcs

Mercurial Subrepositories: Prevent accidental recursive commits and pushes

亡梦爱人 提交于 2019-11-30 11:21:36
I work on a team where we have a code in a mercurial repository with several subrepositories: main/ main/subrepo1/ main/subrepo1/subrepo2/ The default behavior of Mercurial is that when a hg commit is performed in "main", any outstanding changes in the subrepositories "subrepo1" and "subrepo2" will also be committed. Similarly, when "main" is pushed, any outgoing commits in "subrepo1" and "subrepo2" will also be pushed. We find that people frequently inadvertently commit and push changes in their subrepositories (because they forgot they had made changes, and hg status by default does not show

DVCS Choices - What's good for Windows?

岁酱吖の 提交于 2019-11-30 11:04:21
So I want to get a project on a distributed version control system, such as mercurial, git, or bazaar. The catch is that I need the Windows support to be good, i.e. no instructions that start off with "install cygwin...". Now I've heard that git's Windows support is decent these days, but don't have any first hand experience. Also, it sounds like the bazaar team has an explicit goal of making it as multiplatform as possible. Can I get any recommendations? I use msys-git on windows every single day. Works fast and flawlessly. Although the newer build has some problems with git-svn, this build

How do you remove big files from history in mercurial?

不想你离开。 提交于 2019-11-30 10:45:50
问题 I have just created a mercurial repo created from a heterogeneous ecosystems of other repos. Before I publish it to my co-workers, I want to clean it as much as possible. To this end, I'd like to entirely remove a few big old files from history (pretend they never existed), so repo will be smaller. Is this possible with mercurial? 回答1: Check out the convert extension, particularly the --filemap option. Enable by adding the following to mercurial.ini : [extensions] convert = Create a map of

hg local ignore

淺唱寂寞╮ 提交于 2019-11-30 10:44:58
问题 I could have sworn there was a way to keep a local ignore file in an hg repo, i.e. a file similar in function to .hgignore, but not checked into the repo. This could be used to ignore changes to an IDE project file if different IDEs are being used, for example. I'm having trouble finding how it's done. Does anyone recall the details? 回答1: This is what I was looking for. Add the following to the repo's .hg/hgrc: [ui] ignore = /path/to/repo/.hg/hgignore and create a new file .hg/hgignore beside

Sorting out a Git mess

倖福魔咒の 提交于 2019-11-30 09:22:14
I've just inherited a project which was maintained using Git. At one point, the code was deployed onto 3 separate systems and each system maintained their own decentralised Git respository. Each of the 3 systems extended the original base system in 3 different directions. None of the 3 systems have been synchronised against each other. Some changes are on master branch, others are on new branches. How can I bring the 3 different sources together so that I can: find a common base to work with; find out which changes are bug fixes which should be applied across all 3 systems; and maintain the 3

Does any Version Control System like SVN, Git, or Mercurial let you “keep latest version” but not the revisions? (such as for binary files)

﹥>﹥吖頭↗ 提交于 2019-11-30 08:59:34
问题 In our project files, if there are binary files, such as .doc, .xls, .jpg, and we choose to not keep their past revisions (just keeping a latest version is ok), is there a way to tell SVN, Git, or Mercurial or some other tool to skip the revisions for these files or for a particular folder? Say, there is a 4MB .doc file that I need to check in hundred of times, but I don't really care so much about its past versions. So if the system keeps 100 revisions of it, that's already 400MB... checking

Does Mercurial support empty commit messages?

冷暖自知 提交于 2019-11-30 08:18:08
Is there a way to configure Mercurial to allow for empty commit messages? If you try hg commit through the CLI without entering a commit message, the commit is canceled with: abort: empty commit message . Now, I know that committing without a message is usually considered bad form, but does Mercurial allow it at all? You can use just a space, but I'd really discourage it: hg commit -m " " If the problem is that you don't want to enter the -m "blah" part you can always set up an alias. e.g. in hgrc [alias] qcommit = commit -m "quick commit - no message" If you don't like qcommit then you can

How do closed branches affect Mercurial performance?

巧了我就是萌 提交于 2019-11-30 08:13:46
I've noticed that some answers to questions about branch names quote the Mercurial wiki to indicate that the branch-per-feature or branch-per-bug naming conventions may cause performance problems. Does the ability to mark branches as closed with the --close-branch flag on commits have any affect on this performance claim? Martin Geisler Does the ability to mark branches as closed with the --close-branch flag on commits have any affect on this performance claim? Marking a branch closed with hg commit --close-branch merely creates a new changeset with a close=1 marker in the changeset meta data.

In Mercurial (hg), how do you see a list of files that will be pushed if an “hg push” is issued?

前提是你 提交于 2019-11-30 06:38:09
问题 We can see all the changesets and the files involved using hg outgoing -v but the filenames are all scattered in the list of changesets. Is there a way to just see a list of all the files that will go out if hg push is issued? 回答1: First, create a file with this content: changeset = "{files}" file = "{file}\n" Let's say you call it out-style.txt and put it in your home directory. Then you can give this command: hg -q outgoing --style ~/out-style.txt | sort -u 回答2: A somewhat under-appreciated

How to use mercurial for release management?

只谈情不闲聊 提交于 2019-11-30 06:13:19
问题 This is a cousin question with my earlier question of "How to manage concurrent development with mercurial", which covers individual developer workflow. The answer to this question will actually influence the choice for developer workflow. This is NOT a general "release management best practice" or CI question, as it has been asked many times with good answers, and there's a huge body of literature available to kill time. I'm only asking for specific ways to use mercurial within the context