mercurial

One repository/multiple projects without getting mixed up?

倖福魔咒の 提交于 2019-12-12 10:57:47
问题 After reading Joel's last article on Mercurial, I'm giving it a shot on XP as a single-user, single-computer source control system. One thing I'd like to check, though, is: It'd be easier to just create a repository of all the tiny projects I keep in eg. C:\VB.Net\, but the result is that the changes I make to the different projects therein (C:\VB.Net\ProjectA\, C:\VB.Net\ProjectB\, etc.) will be mixed in a single changelog. But if I use a single repository for all projects, when I do diff's

what are the valid colors for mercurial's color extension?

China☆狼群 提交于 2019-12-12 10:56:38
问题 Mercurial's color extension is great and all, but there isn't a list on that page of what the valid colors are. I looked for a python file named color, hoping I'd be able to read the source and see it there, but no luck. I was hoping to use grey or light grey for a color but it wasn't valid. Grey (or gray) seems like a pretty likely color to be in a list of colors. Where can I find a list of valid colors for the color extension? Or where can I find the source for the color extension? 回答1: You

How does mercurial compress files in repository?

拥有回忆 提交于 2019-12-12 10:56:31
问题 I'm seeing that mercurial efficiently compresses the files in repository (repo/.hg/store/data) Does anybody know what kind of compression is used for repository files? Thanks. 回答1: There are two levels of compression in Mercurial repositories: delta storage, and zlib compression. In addition, various other parts employ also compression. For example, bundles can be compressed with both gzip and bzip2, as can archive tarballs - but I don't think you were asking for these. 回答2: You might find

How to 'hg merge' without affecting the working directory?

限于喜欢 提交于 2019-12-12 10:46:24
问题 Suppose that: I have a repo called MyRepo. I have uncommitted changes in my working directory. I do a pull from Repo1 and that creates a branch in MyRepo I want to do a merge of what I already had in my repo with what I have just pulled. As described here, the merge process changes the state of the working directory. In my scenario, I don't want to loose the uncommitted changes that are in my working directory because at that point, I'm interested in changing the state of MyRepo; not the

Mercurial: enforce “hg pull -u” before “hg commit”

♀尐吖头ヾ 提交于 2019-12-12 10:39:51
问题 I have in some cases a need to enforce that Mercurial-users have run hg pull -u before any hg commit can be allowed, i.e., hg pull will mean that the incoming queue is empty — and furthermore I also want that the person is using the head version of the branch. How can I set up such a restriction? (I am fully aware that this goes against parts of the DVCS design core) 回答1: You could ask your developers to install [hooks] pre-commit = hg pull -u in their config files (it should probably be

What is hg syntax for: is commit A “reachable” from commit B

给你一囗甜甜゛ 提交于 2019-12-12 10:39:07
问题 The history of my repository is very complex. I often find myself wanting to know if a certain commit from the past "is in" or "is reachable from" a certain revision (usually one of my heads) How do I do this? 回答1: You can use the revsets syntax. Suppose you want to ask if revision 4 is "reachable" from revision 9. Simply do this: hg log -r "descendants(4) and 9" if it is reachable, you will see the log message for revision 9. If it is not, there will be no output. 来源: https://stackoverflow

Bitbucket ssh test returns `remote: ssh_exchange_identification: read: Operation timed out`

自作多情 提交于 2019-12-12 10:23:30
问题 I am setting up a new machine and in doing so, was trying to pull repos from bitbucket, which does not work for either git or hg. I have added my public key to bitbucket. This is what I see when I run the debugging command that bitbucket suggests in the troubleshooting guide: $ ssh -Tv hg@bitbucket.org OpenSSH_6.9p1, LibreSSL 2.1.8 debug1: Reading configuration data /Users/toadjamb/.ssh/config debug1: Reading configuration data /etc/ssh/ssh_config debug1: /etc/ssh/ssh_config line 21: Applying

Mercurial between server and local?

血红的双手。 提交于 2019-12-12 09:59:28
问题 I have a portal development work in process... I had some troubles time to time like losing, overwriting wrong files, etc... So I decided to go for Mercurial for this development. My first experience with Source Control. I work on server [bluehost] for this project, is there any way to keep update backups at local? Do I have to setup Mercurial to Bluehost? any way to sync changes on server to my local mac? 回答1: Here is a proposed configuration: a Mercurial repository on your server. That

How to remove current directory from python import path

浪尽此生 提交于 2019-12-12 09:36:00
问题 I want to work with the mercurial repository of hg itself. That is, I cloned Mercurial from https://www.mercurial-scm.org/repo/hg and want to run some hg commands inside the cloned repository. The problem is that when running hg inside this clone hg executable tries to load its python modules from this directory and not from /usr/lib/pythonVERSION etc. As I understand it this happens because Python import path sys.path contains an empty string as first entry which probably means "current

How to make local clone without pulling subrepos again?

倾然丶 夕夏残阳落幕 提交于 2019-12-12 08:54:16
问题 I often work with Mercurial by keeping a local store of my upstream clones, and then just cloning again locally for my actual working environment: $ cd /clones $ hg clone ssh://external-repo.example.com/some/repo/path/foo $ cd ~/Development $ hg clone /clones/foo This is particularly useful for me because I often want to make new clones on airplanes, etc., where I have no internet access. However, this doesn't work when the original clone contains subrepos - the presence of the .hgsubstate