mercurial

Accidentally committed a large amount of raw data in Mercurial, how do I keep it from overloading my bitbucket repository?

三世轮回 提交于 2019-12-19 06:21:32
问题 I copied a large amount of data from my labs file server to my laptop, then accidentally committed it to the Mercurial repository I'm using to back up my thesis. Now I have 200+ MB of data I don't need taking up space on my hard disk, even after I've deleted the files. This isn't really a problem, but the bitbucket repository I sync to only gives me 1 GB of space, which I will need for my data. Stupidly I then deleted the files and committed again, so I can't just use rollback as described in

When trying to connect through a proxy server TortoiseHg for Windows says “SSL error: unknown protocol”

南笙酒味 提交于 2019-12-18 23:13:47
问题 The scenario: You're behind a proxy server on Windows. You've configured TortoiseHg to use a proxy server; that is you've entered a server name/IP and port number. You are able to connect to the internet using Internet Explorer. But when you try to pull or push and it produces the error message "SSL error: unknown protocol". (I plan to answer this myself.) 回答1: The cause is that Internet Explorer is using an automatic proxy configuration script and TortoiseHg is using a particular proxy

When trying to connect through a proxy server TortoiseHg for Windows says “SSL error: unknown protocol”

断了今生、忘了曾经 提交于 2019-12-18 23:12:59
问题 The scenario: You're behind a proxy server on Windows. You've configured TortoiseHg to use a proxy server; that is you've entered a server name/IP and port number. You are able to connect to the internet using Internet Explorer. But when you try to pull or push and it produces the error message "SSL error: unknown protocol". (I plan to answer this myself.) 回答1: The cause is that Internet Explorer is using an automatic proxy configuration script and TortoiseHg is using a particular proxy

Simple way to revert .orig files?

本秂侑毒 提交于 2019-12-18 19:34:13
问题 I've just gone and accidentally run hg revert * . Does Mercurial come with a tool to move all the .orig files back into place? 回答1: No. If you're in bash you can always do: for thefile in *.orig ; do cp -v $thefile ${thefile%%.orig} ; done 回答2: This command will reinstate your .orig files from anywhere inside your repo: find `hg root` -name *.orig -exec rename -f 's/.orig//' {} \; You can add a hg alias for this in your .hgrc like so: [alias] reinstate= !find `$HG root` -name *.orig -exec

How (is it possible) to create an hg command alias that runs multiple commands?

ぃ、小莉子 提交于 2019-12-18 18:56:08
问题 I would like to define a Mercurial command alias in my hgrc file that invokes multiple commands. For example I would like to do something like the following: [alias] giveup = revert --all --no-backup; purge syncprod = fetch production; push production This would allow me to call hg syncprod and have it invoke a fetch and then a push. Haven't been able to determine if this capability exists. (I'm guessing that means no.) 回答1: Use the shell alias style like this: giveup = !$HG revert --all --no

Can I set Mercurial config options programmatically?

泄露秘密 提交于 2019-12-18 18:52:26
问题 I'm looking for a way to set .hgrc configuration items without actually editing the text file. I'm trying to standardize the setup of the hgrc across multiple developers and I would like a command like hg --config ui.username=foo but which also saves that config change into the hgrc file. It seems like this should be something that should be supported directly in the vanilla hg command, but I can't find it anywhere. 回答1: Someone -- either you or Mercurial -- will have to edit the

Creating a mercurial log for a specific branch

对着背影说爱祢 提交于 2019-12-18 18:36:28
问题 Is it possible to pull changes for just a single branch vs. the entire repository. We have parallel development on different branches and do not want changes from another build in the log. hg log -r %baseversion%:%releaseversion% --style changelog >> hglog.txt I tried doing this this way but it pulled every change between the base tag and the release tag. 回答1: If you're using proper hg branches, then you should be able to use the --only-branch option: hg log --only-branch my_branch That will

Mercurial error: repository is unrelated

陌路散爱 提交于 2019-12-18 13:53:20
问题 I've just started with Mercurial, I have a 'central' repository on Bitbucket which I cloned onto one machine and made changes and committed and pushed. I then cloned from Bitbucket to another machine committed and pushed which was fine. I then came back to the first machine, made changes committed and attempted to push, but got the error message. What am I doing wrong? Should I have pulled first? How can I resolve the error and push? Any help is appreciated! Darren. 回答1: A Mercurial

unicode filenames on windows mercurial 2.5 (or future)

ε祈祈猫儿з 提交于 2019-12-18 13:28:09
问题 First off, I am aware of Mercurial: Problem with non-ascii letters in filenames between Windows and Linux and What DVCS support Unicode filenames?. But they are old, and do not apply to the latest versions of mercurial. They both mention the FixUtf8 extension - which does not work with the latest version of mercurial (2.3.1 as of this writing) and apparently has not worked since mercurial 2.0. In fact enabling that extension will prevent you from adding any files at all, even plain "vanilla"

How to compare sets of changesets between 2 Mercurial branches?

天大地大妈咪最大 提交于 2019-12-18 12:17:18
问题 I've got a (remote) Hg repository with a couple branches. I want to verify that branch A has every changeset that branch B has (it may have more, and that's OK). Is there an easy way to do this with just hg ? I can write a little shell script to do it, but it seems like the sort of thing that might come up a lot, so maybe there's an easy built-in way. 回答1: This will show any ancestors of changeset b which are not an ancestor of changeset a : hg log -r "ancestors(b) and not ancestors(a)" This