mercurial

How to add .hgignore to my Mercurial folder?

故事扮演 提交于 2019-12-21 03:40:23
问题 I'm learning to use Mercurial, and its learning curve is pretty straightforward. But one of my problem is, I can't add the .hgignore file to Mercurial folder. Windows (7) does not allow me to do this, and when I run the command hg add .hgignore , it returns error: the system cannot find the specified file. How can I create/add this file? 回答1: Execute touch .hgignore or echo "" > .hgignore in the needed directory 回答2: Create it from the command line echo syntax: glob > .hgignore 回答3: You don't

How do I get a list of files modified between two arbitrary changesets?

﹥>﹥吖頭↗ 提交于 2019-12-21 03:36:06
问题 My only guess is something horrible like this: # files where something has been added hg diff -r AA -r BB|grep -- +++|cut -f1|cut -d/ -f2- >/tmp/ka # files where something has been removed hg diff -r AA -r BB|grep -- ---|cut -f1|cut -d/ -f2- >>/tmp/ka # filtering out "dev/null": it appears when a file is added or removed from the repository sort -u /tmp/ka |grep -v dev/null What I need is the files modified between changeset AA and changeset BB. Something like hg diff -r AA -r BB but file

Mercurial - backout an old merge

南笙酒味 提交于 2019-12-21 03:26:24
问题 I have a branch that looks like this: A->B->C->D->...->Z ^ 1->2-^ where C is a merge from 2 and its ancestors. I realize now that I should not have merged. I could go back to B and graft D ... Z but that's a lot of work. Can I backout JUST C ? When I try to hg backout --merge C I get abort: cannot backout a merge changeset . These changes have been pushed to the central repo and I'm not looking to modify history or anything, I just want the inverse of 2 and it's ancestors back to the common

Rollback multiple commits (before Pushed to public) in Mercurial

时光毁灭记忆、已成空白 提交于 2019-12-21 03:23:07
问题 I am aware that rollbacks can remove commits from the latest changeset in a local repository. However, is it possible to remove all the latest commits since the previous push without having to re-clone the share repository? 回答1: You could make a new repo with hg clone: hg clone -r last_good_changeset localrepo newlocalrepo 回答2: You can use the hg strip command, part of the mq extension: hg strip REV This will remove that revision + all its descendants. Before you try this, make a copy/clone

What is the difference between hg revert and hg backout?

你离开我真会死。 提交于 2019-12-21 03:18:11
问题 Both hg revert and hg backout revert changes made by a former revision. What is the difference between the two? 回答1: Given the history of changesets: A --- B --- C --- D --- E [bad] (*) hg revert -r B : Stay at current revision, but update the working directory as of revision B . It has the effect of a patch that revokes the changes of C , D and E . hg backout -r C : Update the working directory so that it contains the merge of revision C's parent ( B ) and the current revision, preserving

Automated web deployment on multiple servers with Mercurial

爱⌒轻易说出口 提交于 2019-12-21 02:40:34
问题 I've been looking at some workflows for Mercurial recently, as we start using it for our web development. We need an automated way to propagate changes that are pushed to the testing and live instances to multiple endpoints. Here's a diagram of the idea: +-------+ |Dev | | | +-------+ | Push +--------+ | V +-------+ Push +-------+ |Live |<--------|Test | |server | |server | +-------+ +-------+ | +-------+ | +-------+ +--->|Live 1 | +--->|Test 1 | | | | | | | | +-------+ | +-------+ | | | +---

Security: Deny access to .hg/* via mod_rewrite

房东的猫 提交于 2019-12-21 02:35:09
问题 My website is a mercurial repository with multiple subrepositories. I need to make sure I'm denying access to all files in every .hg directory on the server. For example, I have http://example.com/.hg/ and http://example.com/subrepo1/.hg/ I've added the following to .htaccess: <Files ~ "^\.(hg|ht)"> Order allow,deny Deny from all </Files> This is a good start, as it denies access to files beginning with .hg and .ht , but it doesn't deny access to the files inside .hg directories, so if

Mercurial: Branch specific changes keep coming back after dummy merge

大憨熊 提交于 2019-12-21 02:28:15
问题 I have a mercurial repository with two permanent branches, default and UAT. Every once in a while, we deploy (promote) a new version of our application to the UAT environment and we do this by merging a stable default commit across to the UAT branch. Occasionally things will get bug-fixed in the UAT branch, and these bug-fixes get merged back to default. On the UAT branch I need to change a few things for deployment purposes - connection strings and various environmental settings. What I

Mercurial Undo Merge

纵然是瞬间 提交于 2019-12-20 18:03:12
问题 Have a scenario where we un-intentionally merged a named branch ( ABC ) into our default branch. hg rollback is not an option because there have been a couple commits since. Is there a way to undo this? 回答1: If you haven't publish the repo publicly you can do this hg clone -r (parent1 of bad merge) -r (parent2 of bad merge) old new and delete the old repo. 回答2: You're going to need the Mq extension. If you don't have it turned on, do so by adding this to your Mercurial.ini or .hgrc file.

TortoiseHG and TortoiseSVN play well together?

半腔热情 提交于 2019-12-20 18:01:04
问题 I had TSVN installed first and been using for a long time. Then I install T-HG and when I right click I dont see any TortoiseHG. Does anyone have this same problem? All the T-SVN overlays are still there. 回答1: Starting with version 0.8 (released 2009-07-01) TortoiseHg supports Windows Vista 64bit explorer shell integration. Thanks to the new C++ shell extension (I contributed significantly to that). Check current release TortoiseHg-0.8.1-hg-1.3.1.exe available from http://bitbucket.org