QuestionId
stringlengths
3
8
QuestionTitle
stringlengths
15
149
QuestionScore
int64
1
27.2k
QuestionCreatedUtc
stringdate
2008-08-01 18:33:08
2025-06-16 04:59:48
QuestionBodyHtml
stringlengths
40
28.2k
QuestionViewCount
int64
78
16.5M
QuestionOwnerUserId
float64
4
25.2M
QuestionLastActivityUtc
stringdate
2008-09-08 19:26:01
2026-01-24 22:40:25
AcceptedAnswerId
int64
266
79.7M
AnswerScore
int64
2
30.1k
AnswerCreatedUtc
stringdate
2008-08-01 23:40:28
2025-06-16 05:23:39
AnswerOwnerUserId
float64
1
29.5M
AnswerLastActivityUtc
stringdate
2008-08-01 23:40:28
2026-01-23 17:46:09
QuestionLink
stringlengths
31
36
AnswerLink
stringlengths
31
36
AnswerBodyHtml
stringlengths
35
33k
AnswerBodyPreview
stringlengths
35
400
AllTagIdsCsv
stringlengths
2
37
AllTagNamesCsv
stringlengths
2
106
MergedQuestion
stringlengths
74
28.4k
quality_filter
stringclasses
10 values
unique_id
int64
0
29k
tag_major_lang
stringclasses
10 values
MergedQuestion_md
stringlengths
60
28.1k
AnswerBodyHtml_md
stringlengths
14
29.2k
6927733
Mercurial: How to deal with one branch that has two heads
31
2011-08-03 14:04:07
<p>What if one branch has two heads? I came to this situation weeks ago for some reason I didn't merged them back then and just continued developing on one head. Now I want to get rid of the other head. What should I do? Should I just merge them after so many changesets?</p>
29,140
523,517
2018-02-22 10:27:10
6,933,807
34
2011-08-03 21:56:54
67,988
2018-02-22 10:27:10
https://stackoverflow.com/q/6927733
https://stackoverflow.com/a/6933807
<p>So you have this:</p> <pre><code>o--o--o--A--B &lt;- older unnecessary head \ 1--2--3--4--5--6 &lt;- newer ‘good’ head </code></pre> <p>...and you don't need <code>A</code> and <code>B</code>, absolutely, 100% sure. <strong>If you aren't sure</strong>, and there are possibly salvageable things in ...
<p>So you have this:</p> <pre><code>o--o--o--A--B &lt;- older unnecessary head \ 1--2--3--4--5--6 &lt;- newer ‘good’ head </code></pre> <p>...and you don't need <code>A</code> and <code>B</code>, absolutely, 100% sure. <strong>If you aren't sure</strong>, and there are possibly salvageable things in ...
802, 1879
branch, mercurial
<h1>Mercurial: How to deal with one branch that has two heads</h1> <p>What if one branch has two heads? I came to this situation weeks ago for some reason I didn't merged them back then and just continued developing on one head. Now I want to get rid of the other head. What should I do? Should I just merge them after s...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
23,986
mercurial
# Mercurial: How to deal with one branch that has two heads What if one branch has two heads? I came to this situation weeks ago for some reason I didn't merged them back then and just continued developing on one head. Now I want to get rid of the other head. What should I do? Should I just merge them after so many ch...
So you have this: ``` o--o--o--A--B <- older unnecessary head \ 1--2--3--4--5--6 <- newer ‘good’ head ``` ...and you don't need `A` and `B`, absolutely, 100% sure. **If you aren't sure**, and there are possibly salvageable things in `A` and `B`, better merge the heads to combine the changes. As Aaron...
833326
Mercurial "hg status" and relative paths
31
2009-05-07 07:36:47
<p>I'm using both mercurial and git for different projects and like them both. What I find a bit annoying about mercurial is that "hg status" shows paths relative to the repository root, not to the current directory(unlike git). Can this behaviour be tweaked somehow?</p>
8,975
47,422
2018-02-12 20:36:33
833,387
34
2009-05-07 07:57:42
4,596
2011-06-08 06:54:10
https://stackoverflow.com/q/833326
https://stackoverflow.com/a/833387
<p>The usual workaround is to run:</p> <pre><code>hg status $(hg root) </code></pre> <p>For older versions of Mercurial, prior to 1.7, you could use this hack, adding to your repository's ".hg/hgrc" file:</p> <pre><code>[alias] sst = status /path/to/root </code></pre> <p>That needs the alias extension enabled, so ...
<p>The usual workaround is to run:</p> <pre><code>hg status $(hg root) </code></pre> <p>For older versions of Mercurial, prior to 1.7, you could use this hack, adding to your repository's ".hg/hgrc" file:</p> <pre><code>[alias] sst = status /path/to/root </code></pre> <p>That needs the alias extension enabled, so ...
802
mercurial
<h1>Mercurial "hg status" and relative paths</h1> <p>I'm using both mercurial and git for different projects and like them both. What I find a bit annoying about mercurial is that "hg status" shows paths relative to the repository root, not to the current directory(unlike git). Can this behaviour be tweaked somehow?</p...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
23,987
mercurial
# Mercurial "hg status" and relative paths I'm using both mercurial and git for different projects and like them both. What I find a bit annoying about mercurial is that "hg status" shows paths relative to the repository root, not to the current directory(unlike git). Can this behaviour be tweaked somehow?
The usual workaround is to run: ``` hg status $(hg root) ``` For older versions of Mercurial, prior to 1.7, you could use this hack, adding to your repository's ".hg/hgrc" file: ``` [alias] sst = status /path/to/root ``` That needs the alias extension enabled, so you may have to add "alias=" to your ~/.hgrc file. ...
4731190
How to show the diff specific to a named branch in mercurial
27
2011-01-19 02:25:05
<p>Assuming I have a named branch foo with two commits a, b:</p> <pre><code> a b c ------o-------o-------o------- # default \ d e ----------o---------o # branch foo </code></pre> <p>I want to see the diff between a and e (a not included). I could of course use the r...
9,758
11,465
2017-02-20 09:49:47
4,731,546
34
2011-01-19 03:46:08
8,992
2012-07-18 13:08:10
https://stackoverflow.com/q/4731190
https://stackoverflow.com/a/4731546
<p>You can do it using <a href="http://www.selenic.com/hg/help/revsets" rel="noreferrer">revsets</a>.</p> <p>In your specific example I think you could get a list of of just <code>d</code> and <code>e</code> using:</p> <pre><code>hg log -r "branch('foo') - branch('default')" </code></pre> <p>where that <code>-</code...
<p>You can do it using <a href="http://www.selenic.com/hg/help/revsets" rel="noreferrer">revsets</a>.</p> <p>In your specific example I think you could get a list of of just <code>d</code> and <code>e</code> using:</p> <pre><code>hg log -r "branch('foo') - branch('default')" </code></pre> <p>where that <code>-</code...
802
mercurial
<h1>How to show the diff specific to a named branch in mercurial</h1> <p>Assuming I have a named branch foo with two commits a, b:</p> <pre><code> a b c ------o-------o-------o------- # default \ d e ----------o---------o # branch foo </code></pre> <p>I want to see ...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
23,988
mercurial
# How to show the diff specific to a named branch in mercurial Assuming I have a named branch foo with two commits a, b: ``` a b c ------o-------o-------o------- # default \ d e ----------o---------o # branch foo ``` I want to see the diff between a and e (a not i...
You can do it using [revsets](http://www.selenic.com/hg/help/revsets). In your specific example I think you could get a list of of just `d` and `e` using: ``` hg log -r "branch('foo') - branch('default')" ``` where that `-` is defined as: ``` "x - y" Changesets in x but not in y. ``` Getting the diff from a ...
3630053
How to undo `hg pull`?
26
2010-09-02 18:31:15
<p>I accidentally did a <code>hg pull</code> and it created a branch in my local repo.</p> <p>What is the simplest to undo that and get my local repo back to previous state?</p>
10,048
121,445
2010-09-02 18:40:14
3,630,103
34
2010-09-02 18:37:28
282,912
2010-09-02 18:37:28
https://stackoverflow.com/q/3630053
https://stackoverflow.com/a/3630103
<p><code>hg rollback</code> but beware the caveats:</p> <blockquote> <p>This command should be used with care. There is only one level of rollback, and there is no way to undo a rollback. It will also restore the dirstate at the time of the last transaction, losing any dirstate changes since th...
<p><code>hg rollback</code> but beware the caveats:</p> <blockquote> <p>This command should be used with care. There is only one level of rollback, and there is no way to undo a rollback. It will also restore the dirstate at the time of the last transaction, losing any dirstate changes since th...
802
mercurial
<h1>How to undo `hg pull`?</h1> <p>I accidentally did a <code>hg pull</code> and it created a branch in my local repo.</p> <p>What is the simplest to undo that and get my local repo back to previous state?</p>
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
23,989
mercurial
# How to undo `hg pull`? I accidentally did a `hg pull` and it created a branch in my local repo. What is the simplest to undo that and get my local repo back to previous state?
`hg rollback` but beware the caveats: > This command should be used with care. > There is only one level of > rollback, and there is no way to > undo a rollback. It will also restore > the dirstate at the time of the last > transaction, losing any dirstate > changes since that time. This command > does not alter the w...
5330782
Finding changesets in mercurial by grepping the patch
22
2011-03-16 19:36:17
<p>Is there a way in mercurial to find a change by giving a pattern in the edit (the changed code), as opposed to the log message or filename? </p> <p>I've looked pretty thoroughly in "hg help revsets" and I think there's not a good way to do this. Here's the best hack I came up with, but I'm hoping I missed a capab...
8,058
411,282
2012-03-15 19:19:39
5,332,901
34
2011-03-16 23:06:37
633,281
2012-03-15 19:19:39
https://stackoverflow.com/q/5330782
https://stackoverflow.com/a/5332901
<p>You should take a look at <a href="http://www.selenic.com/mercurial/hg.1.html#grep" rel="noreferrer"><code>hg grep</code></a>.</p> <blockquote> <pre><code>Search revisions of files for a regular expression. This command behaves differently than Unix grep. It only accepts Python/Perl regexps. It searches repository...
<p>You should take a look at <a href="http://www.selenic.com/mercurial/hg.1.html#grep" rel="noreferrer"><code>hg grep</code></a>.</p> <blockquote> <pre><code>Search revisions of files for a regular expression. This command behaves differently than Unix grep. It only accepts Python/Perl regexps. It searches repository...
802
mercurial
<h1>Finding changesets in mercurial by grepping the patch</h1> <p>Is there a way in mercurial to find a change by giving a pattern in the edit (the changed code), as opposed to the log message or filename? </p> <p>I've looked pretty thoroughly in "hg help revsets" and I think there's not a good way to do this. Here'...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
23,990
mercurial
# Finding changesets in mercurial by grepping the patch Is there a way in mercurial to find a change by giving a pattern in the edit (the changed code), as opposed to the log message or filename? I've looked pretty thoroughly in "hg help revsets" and I think there's not a good way to do this. Here's the best hack I c...
You should take a look at [`hg grep`](http://www.selenic.com/mercurial/hg.1.html#grep). > ``` > Search revisions of files for a regular expression. > > This command behaves differently than Unix grep. It only accepts > Python/Perl regexps. It searches repository history, not the working > directory. It always prints t...
4300245
Can I force a remote hg repo to do hg update after I push to it?
22
2010-11-29 01:35:27
<p>I am writing code in a mercurial repository on my laptop, which I then push to a server via <code>hg push</code>, and then on the server, I run <code>hg update</code> and then run my newly-written code on the server. Is there any way to force the repo on the server to be automatically updated to the latest revision ...
4,233
125,921
2017-06-23 20:26:23
4,300,300
34
2010-11-29 01:52:27
432,745
2017-06-23 20:26:23
https://stackoverflow.com/q/4300245
https://stackoverflow.com/a/4300300
<p>Look at the following entry on HG faq : <a href="https://www.mercurial-scm.org/wiki/FAQ#FAQ.2FCommonProblems.Any_way_to_.27hg_push.27_and_have_an_automatic_.27hg_update.27_on_the_remote_server.3F" rel="nofollow noreferrer">Any way to 'hg push' and have an automatic 'hg update' on the remote server?</a>.</p> <p>As p...
<p>Look at the following entry on HG faq : <a href="https://www.mercurial-scm.org/wiki/FAQ#FAQ.2FCommonProblems.Any_way_to_.27hg_push.27_and_have_an_automatic_.27hg_update.27_on_the_remote_server.3F" rel="nofollow noreferrer">Any way to 'hg push' and have an automatic 'hg update' on the remote server?</a>.</p> <p>As p...
456, 802, 1652
mercurial, synchronization, version-control
<h1>Can I force a remote hg repo to do hg update after I push to it?</h1> <p>I am writing code in a mercurial repository on my laptop, which I then push to a server via <code>hg push</code>, and then on the server, I run <code>hg update</code> and then run my newly-written code on the server. Is there any way to force ...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
23,991
mercurial
# Can I force a remote hg repo to do hg update after I push to it? I am writing code in a mercurial repository on my laptop, which I then push to a server via `hg push`, and then on the server, I run `hg update` and then run my newly-written code on the server. Is there any way to force the repo on the server to be au...
Look at the following entry on HG faq : [Any way to 'hg push' and have an automatic 'hg update' on the remote server?](https://www.mercurial-scm.org/wiki/FAQ#FAQ.2FCommonProblems.Any_way_to_.27hg_push.27_and_have_an_automatic_.27hg_update.27_on_the_remote_server.3F). As per the Faq, you can use the hooks to automatica...
3113267
Show heads of one branch?
22
2010-06-24 19:28:56
<p>Is it possible to ask Mercurial to show only the heads of one branch? For example, I often want to double-check that <code>default</code> only has one head, but currently I need to do that "manually" (ie, checking the output of <code>hg heads</code> for more than one entry which is in <code>default</code>).</p>
9,088
71,522
2019-11-08 15:03:18
3,113,342
34
2010-06-24 19:41:58
167,958
2010-06-24 19:41:58
https://stackoverflow.com/q/3113267
https://stackoverflow.com/a/3113342
<p><code>hg heads &lt;branch name&gt;</code> works on Mercurial 1.5.3.</p>
<p><code>hg heads &lt;branch name&gt;</code> works on Mercurial 1.5.3.</p>
802
mercurial
<h1>Show heads of one branch?</h1> <p>Is it possible to ask Mercurial to show only the heads of one branch? For example, I often want to double-check that <code>default</code> only has one head, but currently I need to do that "manually" (ie, checking the output of <code>hg heads</code> for more than one entry which is...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
23,992
mercurial
# Show heads of one branch? Is it possible to ask Mercurial to show only the heads of one branch? For example, I often want to double-check that `default` only has one head, but currently I need to do that "manually" (ie, checking the output of `hg heads` for more than one entry which is in `default`).
`hg heads <branch name>` works on Mercurial 1.5.3.
9874643
How do I get a list of files modified between two arbitrary changesets?
16
2012-03-26 15:05:40
<p>My only guess is something horrible like this:</p> <pre><code># files where something has been added hg diff -r AA -r BB|grep -- +++|cut -f1|cut -d/ -f2- &gt;/tmp/ka # files where something has been removed hg diff -r AA -r BB|grep -- ---|cut -f1|cut -d/ -f2- &gt;&gt;/tmp/ka # filtering out "dev/null": it appears...
27,285
207,655
2019-07-17 16:42:52
9,875,452
34
2012-03-26 15:55:53
520,531
2015-07-19 22:05:56
https://stackoverflow.com/q/9874643
https://stackoverflow.com/a/9875452
<p><code>hg diff -r 182 -r 193 --stat</code></p> <p>or</p> <p><code>hg status --rev 182:193</code></p>
<p><code>hg diff -r 182 -r 193 --stat</code></p> <p>or</p> <p><code>hg status --rev 182:193</code></p>
802
mercurial
<h1>How do I get a list of files modified between two arbitrary changesets?</h1> <p>My only guess is something horrible like this:</p> <pre><code># files where something has been added hg diff -r AA -r BB|grep -- +++|cut -f1|cut -d/ -f2- &gt;/tmp/ka # files where something has been removed hg diff -r AA -r BB|grep --...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
23,993
mercurial
# How do I get a list of files modified between two arbitrary changesets? 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/ -f...
`hg diff -r 182 -r 193 --stat` or `hg status --rev 182:193`
17534025
Mercurial move bookmark to old commit
20
2013-07-08 19:00:24
<p>I currently have something looks like this:</p> <pre><code>@ changeset: 4 | bookmark: A | bookmark: B | tag: tip | o changeset: 3 | - | o changeset: 2 | - | o changeset: 1 | bookmark: master </code></pre> <p>I want to move my bookmark A down to changeset 3 and leave bookmark B at...
9,215
569,421
2013-07-08 19:59:52
17,534,279
33
2013-07-08 19:17:31
8,992
2013-07-08 19:59:52
https://stackoverflow.com/q/17534025
https://stackoverflow.com/a/17534279
<p>Should just be able to do </p> <pre><code>hg bookmark --rev 3 A </code></pre> <p>or if it complains</p> <pre><code>hg bookmark --rev 3 --force A </code></pre> <p>Try <code>hg help bookmark</code> for an explanation.</p>
<p>Should just be able to do </p> <pre><code>hg bookmark --rev 3 A </code></pre> <p>or if it complains</p> <pre><code>hg bookmark --rev 3 --force A </code></pre> <p>Try <code>hg help bookmark</code> for an explanation.</p>
456, 802
mercurial, version-control
<h1>Mercurial move bookmark to old commit</h1> <p>I currently have something looks like this:</p> <pre><code>@ changeset: 4 | bookmark: A | bookmark: B | tag: tip | o changeset: 3 | - | o changeset: 2 | - | o changeset: 1 | bookmark: master </code></pre> <p>I want to move my bookmar...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
23,994
mercurial
# Mercurial move bookmark to old commit I currently have something looks like this: ``` @ changeset: 4 | bookmark: A | bookmark: B | tag: tip | o changeset: 3 | - | o changeset: 2 | - | o changeset: 1 | bookmark: master ``` I want to move my bookmark A down to changeset 3 and leave...
Should just be able to do ``` hg bookmark --rev 3 A ``` or if it complains ``` hg bookmark --rev 3 --force A ``` Try `hg help bookmark` for an explanation.
1289816
Can Mercurial be made to preserve file permissions?
46
2009-08-17 19:05:38
<p>I've seen a number of blog posts, and have experienced for myself, that Mercurial does not preserve the permissions on files pushed from one repo to another. Does anyone know of a Mercurial extension that would preserve the permissions? I'm assuming it can't be done with a hook, because what does a hook know about...
15,373
41,661
2018-10-21 18:37:34
1,291,508
32
2009-08-18 02:30:29
41,661
2015-02-16 14:47:35
https://stackoverflow.com/q/1289816
https://stackoverflow.com/a/1291508
<p>It looks like it can be done using hooks and an auxiliary tool (and a little chewing gum and baling wire):</p> <ol> <li><p>Get David Hardeman's <a href="http://david.hardeman.nu/software.php#metastore" rel="nofollow noreferrer">Metastore</a>, which saves and restores file metadata.</p></li> <li><p>Alter the sources...
<p>It looks like it can be done using hooks and an auxiliary tool (and a little chewing gum and baling wire):</p> <ol> <li><p>Get David Hardeman's <a href="http://david.hardeman.nu/software.php#metastore" rel="nofollow noreferrer">Metastore</a>, which saves and restores file metadata.</p></li> <li><p>Alter the sources...
802, 2120
file-permissions, mercurial
<h1>Can Mercurial be made to preserve file permissions?</h1> <p>I've seen a number of blog posts, and have experienced for myself, that Mercurial does not preserve the permissions on files pushed from one repo to another. Does anyone know of a Mercurial extension that would preserve the permissions? I'm assuming it c...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
23,995
mercurial
# Can Mercurial be made to preserve file permissions? I've seen a number of blog posts, and have experienced for myself, that Mercurial does not preserve the permissions on files pushed from one repo to another. Does anyone know of a Mercurial extension that would preserve the permissions? I'm assuming it can't be don...
It looks like it can be done using hooks and an auxiliary tool (and a little chewing gum and baling wire): 1. Get David Hardeman's [Metastore](http://david.hardeman.nu/software.php#metastore), which saves and restores file metadata. 2. Alter the sources so it will ignore directory `.hg` as well as `.git`. 3. Use the f...
4197744
How to merge to get rid of head with Mercurial command line, like I can do with TortoiseHg?
39
2010-11-16 18:41:49
<p>My question is this:</p> <ul> <li>If I have two heads (branches with changes) in my Mercurial repository, and I'd like to get rid of one of them, but discard all the changes from that branch instead of merging them into the other, and I can't strip out those changesets so I have to merge, how can I do that with the...
8,322
267
2020-10-07 17:01:29
4,197,904
32
2010-11-16 18:59:35
198,244
2016-06-20 19:23:13
https://stackoverflow.com/q/4197744
https://stackoverflow.com/a/4197904
<p>According to TortoiseHG's <a href="http://bitbucket.org/tortoisehg/stable/src/tip/tortoisehg/" rel="noreferrer">source</a>, when you check <code>Discard all changes from merge target (other) revision</code>, it uses the <code>hg debugsetparents</code> command:</p> <pre><code>hg debugsetparents REV1 [REV2] manually...
<p>According to TortoiseHG's <a href="http://bitbucket.org/tortoisehg/stable/src/tip/tortoisehg/" rel="noreferrer">source</a>, when you check <code>Discard all changes from merge target (other) revision</code>, it uses the <code>hg debugsetparents</code> command:</p> <pre><code>hg debugsetparents REV1 [REV2] manually...
717, 802, 1879
branch, mercurial, merge
<h1>How to merge to get rid of head with Mercurial command line, like I can do with TortoiseHg?</h1> <p>My question is this:</p> <ul> <li>If I have two heads (branches with changes) in my Mercurial repository, and I'd like to get rid of one of them, but discard all the changes from that branch instead of merging them ...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
23,996
mercurial
# How to merge to get rid of head with Mercurial command line, like I can do with TortoiseHg? My question is this: - If I have two heads (branches with changes) in my Mercurial repository, and I'd like to get rid of one of them, but discard all the changes from that branch instead of merging them into the other, and ...
According to TortoiseHG's [source](http://bitbucket.org/tortoisehg/stable/src/tip/tortoisehg/), when you check `Discard all changes from merge target (other) revision`, it uses the `hg debugsetparents` command: ``` hg debugsetparents REV1 [REV2] manually set the parents of the current working directory This is u...
12245001
How to check which files are being ignored because of .hgignore?
20
2012-09-03 09:14:24
<p>I'm quite often concerned that my hgignore file may be excluding important files. For example I just noticed that I was excluding all .exe files which excluded some little executable tools which should be kept with the source. It was a simple change to include them but makes me worried that the rules could have un-i...
4,450
165,394
2012-09-05 20:58:28
12,245,030
32
2012-09-03 09:16:57
50,079
2012-09-03 09:16:57
https://stackoverflow.com/q/12245001
https://stackoverflow.com/a/12245030
<p>The command <code>hg status -i</code> does exactly that.</p>
<p>The command <code>hg status -i</code> does exactly that.</p>
802, 5310, 31419
file, hgignore, mercurial
<h1>How to check which files are being ignored because of .hgignore?</h1> <p>I'm quite often concerned that my hgignore file may be excluding important files. For example I just noticed that I was excluding all .exe files which excluded some little executable tools which should be kept with the source. It was a simple ...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
23,997
mercurial
# How to check which files are being ignored because of .hgignore? I'm quite often concerned that my hgignore file may be excluding important files. For example I just noticed that I was excluding all .exe files which excluded some little executable tools which should be kept with the source. It was a simple change to...
The command `hg status -i` does exactly that.
3384732
Pretty hg branch graphs
18
2010-08-02 03:01:18
<p>With hg, how I can see in command line the branches graphs? Similar to</p> <pre><code>git log --pretty=oneline --graph </code></pre>
10,600
348,081
2018-02-22 10:41:13
3,384,900
32
2010-08-02 04:00:36
180,197
2018-02-22 10:41:13
https://stackoverflow.com/q/3384732
https://stackoverflow.com/a/3384900
<p>For <code>Mercurial 2.3</code> and up, use</p> <pre><code>hg log -G </code></pre> <p>For older Mercurial, you need to first install the the <a href="https://www.mercurial-scm.org/wiki/GraphlogExtension" rel="noreferrer">graphlog extension</a> which will enable the above command. The graphlog extension also adds an...
<p>For <code>Mercurial 2.3</code> and up, use</p> <pre><code>hg log -G </code></pre> <p>For older Mercurial, you need to first install the the <a href="https://www.mercurial-scm.org/wiki/GraphlogExtension" rel="noreferrer">graphlog extension</a> which will enable the above command. The graphlog extension also adds an...
802, 1231, 1879
branch, command-line, mercurial
<h1>Pretty hg branch graphs</h1> <p>With hg, how I can see in command line the branches graphs? Similar to</p> <pre><code>git log --pretty=oneline --graph </code></pre>
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
23,998
mercurial
# Pretty hg branch graphs With hg, how I can see in command line the branches graphs? Similar to ``` git log --pretty=oneline --graph ```
For `Mercurial 2.3` and up, use ``` hg log -G ``` For older Mercurial, you need to first install the the [graphlog extension](https://www.mercurial-scm.org/wiki/GraphlogExtension) which will enable the above command. The graphlog extension also adds an alias ``` hg glog ``` in all versions of Mercurial.
11672707
How to switch from Ankhsvn plugin to VisualHG in Visual Studio 2010
16
2012-07-26 15:27:40
<p>When trying to switch my solution from using Ankhsvn to VisualHG (we've just migrated from SVN to Mercurial) I kept getting the following message:</p> <blockquote> <p>"The active solution or project is controlled by a different source control plug-in than the one you have selected. If you change the source co...
4,164
1,269,135
2018-04-05 09:18:29
11,672,708
32
2012-07-26 15:27:40
1,269,135
2012-07-26 15:27:40
https://stackoverflow.com/q/11672707
https://stackoverflow.com/a/11672708
<p>The solution required opening the .sln file in a text editor and manually removing the following block:</p> <pre><code>- GlobalSection(SubversionScc) = preSolution - Svn-Managed = True - Manager = AnkhSVN - Subversion Support for Visual Studio - EndGlobalSection </code></pre> <p>After that I was go...
<p>The solution required opening the .sln file in a text editor and manually removing the following block:</p> <pre><code>- GlobalSection(SubversionScc) = preSolution - Svn-Managed = True - Manager = AnkhSVN - Subversion Support for Visual Studio - EndGlobalSection </code></pre> <p>After that I was go...
456, 14456, 50760
version-control, visualhg, visual-studio-2010
<h1>How to switch from Ankhsvn plugin to VisualHG in Visual Studio 2010</h1> <p>When trying to switch my solution from using Ankhsvn to VisualHG (we've just migrated from SVN to Mercurial) I kept getting the following message:</p> <blockquote> <p>"The active solution or project is controlled by a different source ...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
23,999
mercurial
# How to switch from Ankhsvn plugin to VisualHG in Visual Studio 2010 When trying to switch my solution from using Ankhsvn to VisualHG (we've just migrated from SVN to Mercurial) I kept getting the following message: > "The active solution or project is controlled by a different source > control plug-in than the one ...
The solution required opening the .sln file in a text editor and manually removing the following block: ``` - GlobalSection(SubversionScc) = preSolution - Svn-Managed = True - Manager = AnkhSVN - Subversion Support for Visual Studio - EndGlobalSection ``` After that I was good to go.
5066696
How to checkout the source code from Mercurial
11
2011-02-21 13:44:24
<p>I need to download the source code from the Mercurial.</p> <pre><code>$ hg clone xmppframework.googlecode.com/hg xmppframework warning: xmppframework.googlecode.com certificate with fingerprint b1:af:83:76:f3:81:b0:57:70:d8:07:42:c8:c1:b3:67:38:c8:7a:bc not verified (check hostfingerprints or web.cacerts config ...
13,697
249,634
2017-06-19 13:25:12
5,066,728
32
2011-02-21 13:47:29
595,304
2012-05-17 21:37:41
https://stackoverflow.com/q/5066696
https://stackoverflow.com/a/5066728
<p>The problem is, that you didn't added the fingerprint of google to your hgrc file. There are two ways to solve the problem:</p> <ol> <li><p>Use <code>http</code> instead of <code>https</code>, the disadvantage would be, that your traffic isn't encrypted anymore.</p> <blockquote> <p>hg clone <a href="http://xmppf...
<p>The problem is, that you didn't added the fingerprint of google to your hgrc file. There are two ways to solve the problem:</p> <ol> <li><p>Use <code>http</code> instead of <code>https</code>, the disadvantage would be, that your traffic isn't encrypted anymore.</p> <blockquote> <p>hg clone <a href="http://xmppf...
802
mercurial
<h1>How to checkout the source code from Mercurial</h1> <p>I need to download the source code from the Mercurial.</p> <pre><code>$ hg clone xmppframework.googlecode.com/hg xmppframework warning: xmppframework.googlecode.com certificate with fingerprint b1:af:83:76:f3:81:b0:57:70:d8:07:42:c8:c1:b3:67:38:c8:7a:bc not...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,000
mercurial
# How to checkout the source code from Mercurial I need to download the source code from the Mercurial. ``` $ hg clone xmppframework.googlecode.com/hg xmppframework warning: xmppframework.googlecode.com certificate with fingerprint b1:af:83:76:f3:81:b0:57:70:d8:07:42:c8:c1:b3:67:38:c8:7a:bc not verified (check hos...
The problem is, that you didn't added the fingerprint of google to your hgrc file. There are two ways to solve the problem: 1. Use `http` instead of `https`, the disadvantage would be, that your traffic isn't encrypted anymore. > hg clone <http://xmppframework.googlecode.com/hg/> xmppframework 2. Or add the finger...
7728468
What is the Mercurial equivalent for showing commits in one branch but not in another?
9
2011-10-11 15:23:51
<p>In git, I can do the following:</p> <pre><code>git log foo ^bar </code></pre> <p>to show changesets in the branch <code>foo</code> but not in the branch <code>bar</code>. Is there a way to do that in Mercurial?</p> <p><strong>Edit:</strong> To explain a little more the use case. Say I have a branch in Mercurial (...
16,658
2,484
2014-11-17 03:42:11
7,728,919
32
2011-10-11 15:53:27
310,500
2011-10-11 19:15:21
https://stackoverflow.com/q/7728468
https://stackoverflow.com/a/7728919
<p>Try using <a href="http://selenic.com/hg/help/revsets" rel="noreferrer">revsets</a> (<code>hg help revsets</code>)</p> <pre><code>hg log -r "branch(foo) and not branch(bar)" </code></pre> <p>But this is kind of useless as a changeset can only be in one named branch at a time.</p> <p>Maybe you mean all ancestors o...
<p>Try using <a href="http://selenic.com/hg/help/revsets" rel="noreferrer">revsets</a> (<code>hg help revsets</code>)</p> <pre><code>hg log -r "branch(foo) and not branch(bar)" </code></pre> <p>But this is kind of useless as a changeset can only be in one named branch at a time.</p> <p>Maybe you mean all ancestors o...
802
mercurial
<h1>What is the Mercurial equivalent for showing commits in one branch but not in another?</h1> <p>In git, I can do the following:</p> <pre><code>git log foo ^bar </code></pre> <p>to show changesets in the branch <code>foo</code> but not in the branch <code>bar</code>. Is there a way to do that in Mercurial?</p> <p>...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,001
mercurial
# What is the Mercurial equivalent for showing commits in one branch but not in another? In git, I can do the following: ``` git log foo ^bar ``` to show changesets in the branch `foo` but not in the branch `bar`. Is there a way to do that in Mercurial? **Edit:** To explain a little more the use case. Say I have a ...
Try using [revsets](http://selenic.com/hg/help/revsets) (`hg help revsets`) ``` hg log -r "branch(foo) and not branch(bar)" ``` But this is kind of useless as a changeset can only be in one named branch at a time. Maybe you mean all ancestors of a bookmark that are not ancestor of another bookmark? ``` hg log -r ":...
125272
What's the easiest way to commit and push a single file while leaving other modifications alone?
72
2008-09-24 03:33:09
<p>I'm relatively new to Mercurial and my team is trying it out right now as a replacement for Subversion. </p> <p>How can I commit and push a single file out to another repository while leaving other modifications in my working directory uncommitted (or at least not pushed to the other repository)?</p> <p>This happ...
39,548
8,912
2018-12-21 12:42:09
125,301
31
2008-09-24 03:41:32
3,830
2018-12-21 12:42:00
https://stackoverflow.com/q/125272
https://stackoverflow.com/a/125301
<p>There's a Mercurial feature that implements shelve and unshelve commands, which give you an interactive way to specify changes to store away until a later time: <a href="http://www.selenic.com/mercurial/wiki/index.cgi/ShelveExtension" rel="nofollow noreferrer">Shelve</a>.</p> <p>Then you can <code>hg shelve</code> ...
<p>There's a Mercurial feature that implements shelve and unshelve commands, which give you an interactive way to specify changes to store away until a later time: <a href="http://www.selenic.com/mercurial/wiki/index.cgi/ShelveExtension" rel="nofollow noreferrer">Shelve</a>.</p> <p>Then you can <code>hg shelve</code> ...
456, 717, 802, 4236
mercurial, merge, push, version-control
<h1>What's the easiest way to commit and push a single file while leaving other modifications alone?</h1> <p>I'm relatively new to Mercurial and my team is trying it out right now as a replacement for Subversion. </p> <p>How can I commit and push a single file out to another repository while leaving other modificatio...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,002
mercurial
# What's the easiest way to commit and push a single file while leaving other modifications alone? I'm relatively new to Mercurial and my team is trying it out right now as a replacement for Subversion. How can I commit and push a single file out to another repository while leaving other modifications in my working d...
There's a Mercurial feature that implements shelve and unshelve commands, which give you an interactive way to specify changes to store away until a later time: [Shelve](http://www.selenic.com/mercurial/wiki/index.cgi/ShelveExtension). Then you can `hg shelve` and `hg unshelve` to temporarily store changes away. It le...
3575189
Mercurial log with one-liners
36
2010-08-26 12:52:12
<p>The regular <code>hg log</code> command gives output with at least 4 lines per changeset. For example</p> <pre><code>changeset: 238:03a214f2a1cf user: My Name &lt;my.name@example.com&gt; date: Thu Aug 26 09:49:32 2010 +0200 summary: Added tag v1.1 for changeset f22fd3974361 </code></pre> <p>I m...
13,980
39,321
2022-02-22 15:50:38
3,575,578
31
2010-08-26 13:34:59
357,150
2015-11-03 12:03:47
https://stackoverflow.com/q/3575189
https://stackoverflow.com/a/3575578
<pre><code> hg log --style compact </code></pre> <p>You can also use templates to display log out in different formats</p> <pre><code>hg help templates </code></pre> <p>In your case if you want to display only node ids do something like this</p> <pre><code>hg log --template "{node}\n" </code></pre>
<pre><code> hg log --style compact </code></pre> <p>You can also use templates to display log out in different formats</p> <pre><code>hg help templates </code></pre> <p>In your case if you want to display only node ids do something like this</p> <pre><code>hg log --template "{node}\n" </code></pre>
802, 1796
command, mercurial
<h1>Mercurial log with one-liners</h1> <p>The regular <code>hg log</code> command gives output with at least 4 lines per changeset. For example</p> <pre><code>changeset: 238:03a214f2a1cf user: My Name &lt;my.name@example.com&gt; date: Thu Aug 26 09:49:32 2010 +0200 summary: Added tag v1.1 for chang...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,003
mercurial
# Mercurial log with one-liners The regular `hg log` command gives output with at least 4 lines per changeset. For example ``` changeset: 238:03a214f2a1cf user: My Name <my.name@example.com> date: Thu Aug 26 09:49:32 2010 +0200 summary: Added tag v1.1 for changeset f22fd3974361 ``` I mean to reme...
``` hg log --style compact ``` You can also use templates to display log out in different formats ``` hg help templates ``` In your case if you want to display only node ids do something like this ``` hg log --template "{node}\n" ```
15668503
How to undo all added files in Mercurial
31
2013-03-27 20:13:36
<p>Say I type <code>hg add</code> in Mercurial, and there a bunch of untracked files in my working directory that are not ignored. What is the easiest way to un-add all those files without explicitly typing the name of each file?</p> <p>Can I just un-add them all with one command? </p>
20,292
233,087
2019-04-26 20:41:52
15,669,249
31
2013-03-27 20:54:01
960,558
2017-11-14 12:46:17
https://stackoverflow.com/q/15668503
https://stackoverflow.com/a/15669249
<p><strong>Preface</strong></p> <p>You must always ask questions, which contain <em>as much information as possible</em>. Because now your question, depending from some conditions, may have totally different answers.</p> <p><strong>Case One - no local modifications in already versioned files, only added (and not comm...
<p><strong>Preface</strong></p> <p>You must always ask questions, which contain <em>as much information as possible</em>. Because now your question, depending from some conditions, may have totally different answers.</p> <p><strong>Case One - no local modifications in already versioned files, only added (and not comm...
802, 5766, 14215
addition, mercurial, undo
<h1>How to undo all added files in Mercurial</h1> <p>Say I type <code>hg add</code> in Mercurial, and there a bunch of untracked files in my working directory that are not ignored. What is the easiest way to un-add all those files without explicitly typing the name of each file?</p> <p>Can I just un-add them all with ...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,004
mercurial
# How to undo all added files in Mercurial Say I type `hg add` in Mercurial, and there a bunch of untracked files in my working directory that are not ignored. What is the easiest way to un-add all those files without explicitly typing the name of each file? Can I just un-add them all with one command?
**Preface** You must always ask questions, which contain *as much information as possible*. Because now your question, depending from some conditions, may have totally different answers. **Case One - no local modifications in already versioned files, only added (and not committed) files** `hg revert` will return you...
7729122
Mercurial: Switch working directory to branch without losing changes?
25
2011-10-11 16:08:30
<p>Let's say that I have a named branch 'B1' which I'm doing feature development on. I am at a good stopping point before a demo though not done with the feature so I:</p> <pre><code>hg up default hg merge B1 hg ci -m "merged in feature drop" hg push </code></pre> <p>Now I continue working for a half an hour or so an...
6,105
5,056
2019-02-15 09:49:00
7,730,026
31
2011-10-11 17:29:07
975,761
2011-10-11 17:29:07
https://stackoverflow.com/q/7729122
https://stackoverflow.com/a/7730026
<p>Two ways. First, the obvious way:</p> <pre><code>hg diff &gt; foo hg up -C b1 hg import --no-commit foo rm foo </code></pre> <p>Second, the magical way:</p> <pre><code>hg up -r 'ancestor(., b1)' # take working dir back to the fork point hg up b1 # take it forward to the branch head </code></pr...
<p>Two ways. First, the obvious way:</p> <pre><code>hg diff &gt; foo hg up -C b1 hg import --no-commit foo rm foo </code></pre> <p>Second, the magical way:</p> <pre><code>hg up -r 'ancestor(., b1)' # take working dir back to the fork point hg up b1 # take it forward to the branch head </code></pr...
802, 1879
branch, mercurial
<h1>Mercurial: Switch working directory to branch without losing changes?</h1> <p>Let's say that I have a named branch 'B1' which I'm doing feature development on. I am at a good stopping point before a demo though not done with the feature so I:</p> <pre><code>hg up default hg merge B1 hg ci -m "merged in feature dro...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,005
mercurial
# Mercurial: Switch working directory to branch without losing changes? Let's say that I have a named branch 'B1' which I'm doing feature development on. I am at a good stopping point before a demo though not done with the feature so I: ``` hg up default hg merge B1 hg ci -m "merged in feature drop" hg push ``` Now ...
Two ways. First, the obvious way: ``` hg diff > foo hg up -C b1 hg import --no-commit foo rm foo ``` Second, the magical way: ``` hg up -r 'ancestor(., b1)' # take working dir back to the fork point hg up b1 # take it forward to the branch head ``` This way involves merges. Depending on how much...
1477167
Mercurial: TortoiseHg's "guess rename" from the commandline?
24
2009-09-25 13:02:09
<p>Is there any hg functionality to mimic the "guess renames" command of TortoiseHG?</p> <p>I really dig this one, however I am currently using MacOS and have <a href="http://bitbucket.org/snej/murky/wiki/Home" rel="noreferrer">Murky</a> or the commandline interface available.</p>
1,163
125,407
2009-09-25 13:11:39
1,477,210
31
2009-09-25 13:11:39
37,078
2009-09-25 13:11:39
https://stackoverflow.com/q/1477167
https://stackoverflow.com/a/1477210
<p>You can do </p> <pre><code>hg addremove --similarity &lt;percent&gt; </code></pre> <p>Type hg help addremove for details.</p>
<p>You can do </p> <pre><code>hg addremove --similarity &lt;percent&gt; </code></pre> <p>Type hg help addremove for details.</p>
369, 802, 4510
macos, mercurial, rename
<h1>Mercurial: TortoiseHg's "guess rename" from the commandline?</h1> <p>Is there any hg functionality to mimic the "guess renames" command of TortoiseHG?</p> <p>I really dig this one, however I am currently using MacOS and have <a href="http://bitbucket.org/snej/murky/wiki/Home" rel="noreferrer">Murky</a> or the comm...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,006
mercurial
# Mercurial: TortoiseHg's "guess rename" from the commandline? Is there any hg functionality to mimic the "guess renames" command of TortoiseHG? I really dig this one, however I am currently using MacOS and have [Murky](http://bitbucket.org/snej/murky/wiki/Home) or the commandline interface available.
You can do ``` hg addremove --similarity <percent> ``` Type hg help addremove for details.
8304675
How to restore from a mercurial backup
15
2011-11-29 01:22:04
<p>I created a backup of my mercurial repository using </p> <pre><code>hg bundle --all name.hg </code></pre> <p>Now, how would i restore my repository using the backup file? Say if my whole repository is corrupted and all i have is just this *.hg file., Is it possible to restore my repository(assuming that is what ba...
12,672
753,909
2012-11-17 23:48:27
8,304,711
31
2011-11-29 01:26:02
14,955
2011-11-29 01:26:02
https://stackoverflow.com/q/8304675
https://stackoverflow.com/a/8304711
<p>To quote the help page:</p> <blockquote> <p>The bundle file can then be transferred using conventional means and applied to another repository with the unbundle or pull command. This is useful when direct push and pull are not available or when exporting an entire repository is undesirable.</p> ...
<p>To quote the help page:</p> <blockquote> <p>The bundle file can then be transferred using conventional means and applied to another repository with the unbundle or pull command. This is useful when direct push and pull are not available or when exporting an entire repository is undesirable.</p> ...
802
mercurial
<h1>How to restore from a mercurial backup</h1> <p>I created a backup of my mercurial repository using </p> <pre><code>hg bundle --all name.hg </code></pre> <p>Now, how would i restore my repository using the backup file? Say if my whole repository is corrupted and all i have is just this *.hg file., Is it possible t...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,007
mercurial
# How to restore from a mercurial backup I created a backup of my mercurial repository using ``` hg bundle --all name.hg ``` Now, how would i restore my repository using the backup file? Say if my whole repository is corrupted and all i have is just this *.hg file., Is it possible to restore my repository(assuming t...
To quote the help page: > The bundle file can then be transferred using conventional means > and applied to another repository with the unbundle or pull > command. This is useful when direct push and pull are not > available or when exporting an entire repository is undesirable. So you would be creating a new empty r...
12093528
How to fix "remote: ssl required" when pushing to Bitbucket?
13
2012-08-23 14:06:33
<p>I am getting the above error whenever I try to push my changes. I am using TortoiseHg as client.</p> <p>Here is the debug output for <code>hg push</code>:</p> <pre><code>pushing to https://nulldev@bitbucket.org/nulldev/windows-phone using https://bitbucket.org/nulldev/windows-phone proxying through http://...
12,103
6,621
2019-05-28 11:23:43
12,093,853
31
2012-08-23 14:22:22
6,309
2019-05-28 11:23:43
https://stackoverflow.com/q/12093528
https://stackoverflow.com/a/12093853
<p>This is usually due to a config issue on the server side (ie on BitBucket's side), as illustrated by this <a href="https://bitbucket.org/site/master/issue/2593/getting-ssl-required-when-pushing-to-wiki" rel="nofollow noreferrer">old ticket</a> (which suddenly got a few new entries, all mentioning your error).</p> <...
<p>This is usually due to a config issue on the server side (ie on BitBucket's side), as illustrated by this <a href="https://bitbucket.org/site/master/issue/2593/getting-ssl-required-when-pushing-to-wiki" rel="nofollow noreferrer">old ticket</a> (which suddenly got a few new entries, all mentioning your error).</p> <...
802, 8122
mercurial, tortoisehg
<h1>How to fix "remote: ssl required" when pushing to Bitbucket?</h1> <p>I am getting the above error whenever I try to push my changes. I am using TortoiseHg as client.</p> <p>Here is the debug output for <code>hg push</code>:</p> <pre><code>pushing to https://nulldev@bitbucket.org/nulldev/windows-phone using ht...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,008
mercurial
# How to fix "remote: ssl required" when pushing to Bitbucket? I am getting the above error whenever I try to push my changes. I am using TortoiseHg as client. Here is the debug output for `hg push`: ``` pushing to https://nulldev@bitbucket.org/nulldev/windows-phone using https://bitbucket.org/nulldev/windows-ph...
This is usually due to a config issue on the server side (ie on BitBucket's side), as illustrated by this [old ticket](https://bitbucket.org/site/master/issue/2593/getting-ssl-required-when-pushing-to-wiki) (which suddenly got a few new entries, all mentioning your error). ``` pushing to https://nulldev@bitbucket.org/...
2856571
Mercurial: How to ignore changes to a tracked file
53
2010-05-18 11:03:09
<p>I have a file with database settings in my project which I have set to some defaults. The file is tracked by Mercurial and checked in. Since this file will be edited with different values various developer machines, is there a way I can tell Mercurial to ignore new changes to this file?</p> <p>I tried adding the fi...
19,527
39,321
2018-12-12 18:39:42
2,857,512
30
2010-05-18 13:09:27
16,718
2010-05-18 13:09:27
https://stackoverflow.com/q/2856571
https://stackoverflow.com/a/2857512
<p>Using a file template is definitely the best solution. For example, if you have a <code>database.ini</code> file, commit a <code>database.ini.template</code> file and ignore database.ini in <code>.hgignore</code></p>
<p>Using a file template is definitely the best solution. For example, if you have a <code>database.ini</code> file, commit a <code>database.ini.template</code> file and ignore database.ini in <code>.hgignore</code></p>
456, 802, 9084, 31419
configuration-files, hgignore, mercurial, version-control
<h1>Mercurial: How to ignore changes to a tracked file</h1> <p>I have a file with database settings in my project which I have set to some defaults. The file is tracked by Mercurial and checked in. Since this file will be edited with different values various developer machines, is there a way I can tell Mercurial to ig...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,009
mercurial
# Mercurial: How to ignore changes to a tracked file I have a file with database settings in my project which I have set to some defaults. The file is tracked by Mercurial and checked in. Since this file will be edited with different values various developer machines, is there a way I can tell Mercurial to ignore new ...
Using a file template is definitely the best solution. For example, if you have a `database.ini` file, commit a `database.ini.template` file and ignore database.ini in `.hgignore`
10531853
Resolving Mercurial Case-Folding Collision in Windows
32
2012-05-10 10:12:34
<p>I've seen the other Mercurial case-folding Answers on StackOverflow - they say that if you have access to a case sensitive file system like unix then check out there and it should fix it. Problem is, I don't have access to a unix box, I'm a windows developer developing a windows application.</p> <p>How do I fix th...
24,142
166,303
2018-07-27 14:14:22
10,533,063
30
2012-05-10 11:29:49
310,500
2017-06-19 12:09:05
https://stackoverflow.com/q/10531853
https://stackoverflow.com/a/10533063
<p>There is a <code>filesystem</code> help topic being worked on that will be included in the next version of Mercurial:</p> <p><a href="https://www.mercurial-scm.org/pipermail/mercurial-devel/2012-April/039522.html" rel="noreferrer">https://www.mercurial-scm.org/pipermail/mercurial-devel/2012-April/039522.html</a></p...
<p>There is a <code>filesystem</code> help topic being worked on that will be included in the next version of Mercurial:</p> <p><a href="https://www.mercurial-scm.org/pipermail/mercurial-devel/2012-April/039522.html" rel="noreferrer">https://www.mercurial-scm.org/pipermail/mercurial-devel/2012-April/039522.html</a></p...
802
mercurial
<h1>Resolving Mercurial Case-Folding Collision in Windows</h1> <p>I've seen the other Mercurial case-folding Answers on StackOverflow - they say that if you have access to a case sensitive file system like unix then check out there and it should fix it. Problem is, I don't have access to a unix box, I'm a windows deve...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,010
mercurial
# Resolving Mercurial Case-Folding Collision in Windows I've seen the other Mercurial case-folding Answers on StackOverflow - they say that if you have access to a case sensitive file system like unix then check out there and it should fix it. Problem is, I don't have access to a unix box, I'm a windows developer deve...
There is a `filesystem` help topic being worked on that will be included in the next version of Mercurial: <https://www.mercurial-scm.org/pipermail/mercurial-devel/2012-April/039522.html> > **Renaming colliding files** > > On case-insensitive filesystems, updating to revisions which have > files with case collisions ...
1574371
Empty repository after subversion -> mercurial conversion
24
2009-10-15 19:03:38
<p>I've used the 'hg convert' command to try to move my SVN repository to hg, and it seems to work (takes a while and prints out all the commit messages as it goes), but at the end the resulting Mercurial directory is empty. It has the .hg hidden subdirectory in it, and it's about 200 MB so SOMETHING happened, but non...
1,463
172,387
2010-11-04 10:25:44
1,574,696
30
2009-10-15 20:02:00
52,626
2010-11-04 10:25:44
https://stackoverflow.com/q/1574371
https://stackoverflow.com/a/1574696
<p>You need to run <code>hg update</code> to get a working copy.</p> <p>(Such mercurial repositories without a working copy can be used as pure communication points where revisions are pushed to or pulled from, much like a subversion server. In this case it was created by hg convert, but you can also create such repos...
<p>You need to run <code>hg update</code> to get a working copy.</p> <p>(Such mercurial repositories without a working copy can be used as pure communication points where revisions are pushed to or pulled from, much like a subversion server. In this case it was created by hg convert, but you can also create such repos...
63, 802
mercurial, svn
<h1>Empty repository after subversion -> mercurial conversion</h1> <p>I've used the 'hg convert' command to try to move my SVN repository to hg, and it seems to work (takes a while and prints out all the commit messages as it goes), but at the end the resulting Mercurial directory is empty. It has the .hg hidden subdi...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,011
mercurial
# Empty repository after subversion -> mercurial conversion I've used the 'hg convert' command to try to move my SVN repository to hg, and it seems to work (takes a while and prints out all the commit messages as it goes), but at the end the resulting Mercurial directory is empty. It has the .hg hidden subdirectory in...
You need to run `hg update` to get a working copy. (Such mercurial repositories without a working copy can be used as pure communication points where revisions are pushed to or pulled from, much like a subversion server. In this case it was created by hg convert, but you can also create such repositories with `hg clon...
12213250
How to delete Mercurial branch after merge
23
2012-08-31 10:10:20
<p>I am creating named Mercurial branches for new features in my application, and after I finish a particular feature, I merge that branch into <strong>default</strong> branch, and close this feature branch.</p> <p>But I wonder if there is way to remove those named branches completely, without losing changes that are ...
12,436
983,775
2014-12-09 15:14:48
12,215,244
30
2012-08-31 12:19:05
85,615
2012-08-31 12:19:05
https://stackoverflow.com/q/12213250
https://stackoverflow.com/a/12215244
<p>No there isn't.</p> <p>When you have merged the two branches, the merge commit depends on the existence of its two parent commits. That means that you can't remove the commits making up the merged branch, unless you also delete the merge commit, which you don't want to do.</p> <p>This is also not the "Mercurial wa...
<p>No there isn't.</p> <p>When you have merged the two branches, the merge commit depends on the existence of its two parent commits. That means that you can't remove the commits making up the merged branch, unless you also delete the merge commit, which you don't want to do.</p> <p>This is also not the "Mercurial wa...
802
mercurial
<h1>How to delete Mercurial branch after merge</h1> <p>I am creating named Mercurial branches for new features in my application, and after I finish a particular feature, I merge that branch into <strong>default</strong> branch, and close this feature branch.</p> <p>But I wonder if there is way to remove those named b...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,012
mercurial
# How to delete Mercurial branch after merge I am creating named Mercurial branches for new features in my application, and after I finish a particular feature, I merge that branch into **default** branch, and close this feature branch. But I wonder if there is way to remove those named branches completely, without l...
No there isn't. When you have merged the two branches, the merge commit depends on the existence of its two parent commits. That means that you can't remove the commits making up the merged branch, unless you also delete the merge commit, which you don't want to do. This is also not the "Mercurial way" to do things. ...
12185048
Mercurial (HG) pull parameters: username and password
22
2012-08-29 19:20:07
<p>I have to write a script that automates pulling from a mercurial repo. Is there anyway I can perform an <code>hg pull -u</code> that includes passing the requested username and password in the same command? I know there's an interactive method which is the default behaviour, and I don't want to save the username an...
27,726
1,176,436
2025-08-05 07:17:22
22,126,365
30
2014-03-02 10:22:11
12,291
2014-03-02 10:22:11
https://stackoverflow.com/q/12185048
https://stackoverflow.com/a/22126365
<p>I found two solutions:</p> <p>1. Explicitly provide the URL, including full credentials:</p> <blockquote> <p><code>hg pull -u https://user:pass@host/path</code></p> </blockquote> <p>2. Provide the credentials with --config, using * as a prefix (from Victor's answer):</p> <blockquote> <p><code>hg pull -u --...
<p>I found two solutions:</p> <p>1. Explicitly provide the URL, including full credentials:</p> <blockquote> <p><code>hg pull -u https://user:pass@host/path</code></p> </blockquote> <p>2. Provide the credentials with --config, using * as a prefix (from Victor's answer):</p> <blockquote> <p><code>hg pull -u --...
5, 802
mercurial, php
<h1>Mercurial (HG) pull parameters: username and password</h1> <p>I have to write a script that automates pulling from a mercurial repo. Is there anyway I can perform an <code>hg pull -u</code> that includes passing the requested username and password in the same command? I know there's an interactive method which is ...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,013
mercurial
# Mercurial (HG) pull parameters: username and password I have to write a script that automates pulling from a mercurial repo. Is there anyway I can perform an `hg pull -u` that includes passing the requested username and password in the same command? I know there's an interactive method which is the default behaviour...
I found two solutions: 1. Explicitly provide the URL, including full credentials: > `hg pull -u https://user:pass@host/path` 2. Provide the credentials with --config, using * as a prefix (from Victor's answer): > `hg pull -u > --config auth.x.prefix=* > --config auth.x.username=user > --config auth.x.password=pass`
9782383
How to automatically merge .hgtags in Mercurial?
22
2012-03-20 06:41:57
<p>I have a script running some Mercurial commands in non-interactive mode on a build server. One of the commands merges two branches and there is always a conflict in the <code>.hgtags</code> file during the merge because of the way the build scripts are set up.</p> <p>How can I force Mercurial to always merge the <c...
5,094
46,026
2018-02-22 10:24:25
9,783,478
30
2012-03-20 08:27:18
110,204
2018-02-22 10:24:25
https://stackoverflow.com/q/9782383
https://stackoverflow.com/a/9783478
<p><em>Please see the <a href="https://stackoverflow.com/a/26012910/110204">answer below</a> by Magras de La Mancha for better solution with Mercurial 3.1.</em> The below is a simpler and more naive solution for older versions of Mercurial.</p> <hr> <p>Yes, you need to configure a custom <a href="https://www.mercuria...
<p><em>Please see the <a href="https://stackoverflow.com/a/26012910/110204">answer below</a> by Magras de La Mancha for better solution with Mercurial 3.1.</em> The below is a simpler and more naive solution for older versions of Mercurial.</p> <hr> <p>Yes, you need to configure a custom <a href="https://www.mercuria...
717, 802, 3346, 62599, 66286
.hgtags, dvcs, mercurial, merge, merge-conflict-resolution
<h1>How to automatically merge .hgtags in Mercurial?</h1> <p>I have a script running some Mercurial commands in non-interactive mode on a build server. One of the commands merges two branches and there is always a conflict in the <code>.hgtags</code> file during the merge because of the way the build scripts are set up...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,014
mercurial
# How to automatically merge .hgtags in Mercurial? I have a script running some Mercurial commands in non-interactive mode on a build server. One of the commands merges two branches and there is always a conflict in the `.hgtags` file during the merge because of the way the build scripts are set up. How can I force M...
*Please see the [answer below](https://stackoverflow.com/a/26012910/110204) by Magras de La Mancha for better solution with Mercurial 3.1.* The below is a simpler and more naive solution for older versions of Mercurial. --- Yes, you need to configure a custom [merge tool](https://www.mercurial-scm.org/wiki/MergeToolC...
9169598
How do closed branches affect Mercurial performance?
20
2012-02-07 00:51:24
<p>I've noticed that <a href="https://stackoverflow.com/a/9155138/203002">some</a> <a href="https://stackoverflow.com/a/8870937/203002">answers</a> to questions about branch names <a href="https://www.mercurial-scm.org/wiki/StandardBranching#Don.27t_treat_branch_names_as_disposable" rel="nofollow noreferrer">quote the ...
2,877
203,002
2025-06-25 12:50:41
9,173,483
30
2012-02-07 09:03:52
110,204
2025-06-25 12:50:41
https://stackoverflow.com/q/9169598
https://stackoverflow.com/a/9173483
<blockquote> <p>Does the ability to mark branches as closed with the <code>--close-branch</code> flag on commits have any affect on this performance claim?</p> </blockquote> <p>Marking a branch closed with <code>hg commit --close-branch</code> merely creates a new changeset with a <code>close=1</code> marker in the cha...
<blockquote> <p>Does the ability to mark branches as closed with the <code>--close-branch</code> flag on commits have any affect on this performance claim?</p> </blockquote> <p>Marking a branch closed with <code>hg commit --close-branch</code> merely creates a new changeset with a <code>close=1</code> marker in the cha...
802, 1879, 3346, 64464
branch, branching-strategy, dvcs, mercurial
<h1>How do closed branches affect Mercurial performance?</h1> <p>I've noticed that <a href="https://stackoverflow.com/a/9155138/203002">some</a> <a href="https://stackoverflow.com/a/8870937/203002">answers</a> to questions about branch names <a href="https://www.mercurial-scm.org/wiki/StandardBranching#Don.27t_treat_br...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,015
mercurial
# How do closed branches affect Mercurial performance? I've noticed that [some](https://stackoverflow.com/a/9155138/203002) [answers](https://stackoverflow.com/a/8870937/203002) to questions about branch names [quote the Mercurial wiki](https://www.mercurial-scm.org/wiki/StandardBranching#Don.27t_treat_branch_names_as...
> 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 metadata. Commands like `hg branches` and `hg heads` will th...
2605017
Difference between cloning and copying in Mercurial
19
2010-04-09 03:57:39
<p>Is copying the .hg directory to another directory the same as cloning in Mercurial (using TortoiseHg although I think that's irrelevant) or does the cloning command in Mercurial do something special during that process?</p>
1,932
1,463
2010-04-09 05:37:19
2,605,295
30
2010-04-09 05:37:19
8,992
2010-04-09 05:37:19
https://stackoverflow.com/q/2605017
https://stackoverflow.com/a/2605295
<p>It's <em>almost</em> the same. Cloning does a few things different, none of which are required, but some of which are cool:</p> <ul> <li>clones get a working directory too (which you can avoid with -U)</li> <li>clones get the source repo set as default for push/pull in the .hg/hgrc file</li> <li>clones can get jus...
<p>It's <em>almost</em> the same. Cloning does a few things different, none of which are required, but some of which are cool:</p> <ul> <li>clones get a working directory too (which you can avoid with -U)</li> <li>clones get the source repo set as default for push/pull in the .hg/hgrc file</li> <li>clones can get jus...
802, 8122
mercurial, tortoisehg
<h1>Difference between cloning and copying in Mercurial</h1> <p>Is copying the .hg directory to another directory the same as cloning in Mercurial (using TortoiseHg although I think that's irrelevant) or does the cloning command in Mercurial do something special during that process?</p>
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,016
mercurial
# Difference between cloning and copying in Mercurial Is copying the .hg directory to another directory the same as cloning in Mercurial (using TortoiseHg although I think that's irrelevant) or does the cloning command in Mercurial do something special during that process?
It's *almost* the same. Cloning does a few things different, none of which are required, but some of which are cool: - clones get a working directory too (which you can avoid with -U) - clones get the source repo set as default for push/pull in the .hg/hgrc file - clones can get just a subset of the original (clone -r...
8493733
Mercurial: remote: abort: There is no Mercurial repository here (.hg not found)!
18
2011-12-13 17:47:48
<p>all,</p> <p>I have searched for this problem for long time and tried different methods.</p> <p>I want to maintain my code on the server through only SSH. But when I run this:</p> <pre><code>sudo hg clone -v ssh://carl@hostname//home/carl/Java/Projects/peta/ </code></pre> <p>Mercurial keeps telling me <code>remot...
23,313
978,320
2015-07-28 08:07:30
8,495,451
30
2011-12-13 20:06:40
960,558
2011-12-13 20:06:40
https://stackoverflow.com/q/8493733
https://stackoverflow.com/a/8495451
<p>Extraction from <code>hg help urls</code></p> <blockquote> <p>Some notes about using SSH with Mercurial:</p> <ul> <li>SSH requires an accessible shell account on the destination machine and a copy of hg in the remote path or specified with as remotecmd.</li> <li><p>path is relative to the remote user...
<p>Extraction from <code>hg help urls</code></p> <blockquote> <p>Some notes about using SSH with Mercurial:</p> <ul> <li>SSH requires an accessible shell account on the destination machine and a copy of hg in the remote path or specified with as remotecmd.</li> <li><p>path is relative to the remote user...
386, 802
mercurial, ssh
<h1>Mercurial: remote: abort: There is no Mercurial repository here (.hg not found)!</h1> <p>all,</p> <p>I have searched for this problem for long time and tried different methods.</p> <p>I want to maintain my code on the server through only SSH. But when I run this:</p> <pre><code>sudo hg clone -v ssh://carl@hostna...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,017
mercurial
# Mercurial: remote: abort: There is no Mercurial repository here (.hg not found)! all, I have searched for this problem for long time and tried different methods. I want to maintain my code on the server through only SSH. But when I run this: ``` sudo hg clone -v ssh://carl@hostname//home/carl/Java/Projects/peta/ ...
Extraction from `hg help urls` > Some notes about using SSH with Mercurial: > > - SSH requires an accessible shell account on the destination machine and > a copy of hg in the remote path or specified with as remotecmd. > - path is relative to the remote user's home directory by default. Use an > extra slash at th...
15241394
Mercurial command to combine hg pull; hg up
15
2013-03-06 07:27:09
<p>How can I combine the Mercurial commands <code>hg pull</code> and <code>hg update</code> into one?</p>
9,730
198,927
2014-05-21 16:53:37
15,244,773
30
2013-03-06 10:27:58
158,226
2013-03-06 10:27:58
https://stackoverflow.com/q/15241394
https://stackoverflow.com/a/15244773
<p>Obviously, <code>hg pull -u</code> is the answer here.</p> <p>However, there's a caveat that deserves mentioning: <code>hg pull -u</code> is not exactly equivalent to <code>hg pull</code> &amp;&amp; <code>hg update</code>. This is briefly mentioned in the documentation, but it can be surprising if you first run int...
<p>Obviously, <code>hg pull -u</code> is the answer here.</p> <p>However, there's a caveat that deserves mentioning: <code>hg pull -u</code> is not exactly equivalent to <code>hg pull</code> &amp;&amp; <code>hg update</code>. This is briefly mentioned in the documentation, but it can be surprising if you first run int...
802, 4860
mercurial, pull
<h1>Mercurial command to combine hg pull; hg up</h1> <p>How can I combine the Mercurial commands <code>hg pull</code> and <code>hg update</code> into one?</p>
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,018
mercurial
# Mercurial command to combine hg pull; hg up How can I combine the Mercurial commands `hg pull` and `hg update` into one?
Obviously, `hg pull -u` is the answer here. However, there's a caveat that deserves mentioning: `hg pull -u` is not exactly equivalent to `hg pull` && `hg update`. This is briefly mentioned in the documentation, but it can be surprising if you first run into it; if there's nothing to pull (e.g. no new changesets came ...
2339716
.hgignore not working for mercurial
12
2010-02-26 05:43:12
<p>I use mercurial for php projects and my <code>.hgignore</code> file is not working. It's supposed to be placed in the <code>.hg/</code> folder, isn't it?</p> <h3>.hgignore</h3> <pre><code>/.hg/.hgignore file # Allow *. syntax syntax:glob # Ignore these files .hgignore .htaccess .hg/* </code></pre>
12,773
150,225
2018-02-22 10:31:58
2,339,981
30
2010-02-26 07:02:11
6,309
2018-02-22 10:31:58
https://stackoverflow.com/q/2339716
https://stackoverflow.com/a/2339981
<p>There is no mention in the <a href="https://www.mercurial-scm.org/wiki/.hgignore" rel="nofollow noreferrer">.hgignore</a> page of that file being <em>inside</em> <code>.hg</code>:</p> <blockquote> <p>The <code>.hgignore</code> file <strong>sits in the working directory, next to the <code>.hg</code> folder</stron...
<p>There is no mention in the <a href="https://www.mercurial-scm.org/wiki/.hgignore" rel="nofollow noreferrer">.hgignore</a> page of that file being <em>inside</em> <code>.hg</code>:</p> <blockquote> <p>The <code>.hgignore</code> file <strong>sits in the working directory, next to the <code>.hg</code> folder</stron...
802, 31419
hgignore, mercurial
<h1>.hgignore not working for mercurial</h1> <p>I use mercurial for php projects and my <code>.hgignore</code> file is not working. It's supposed to be placed in the <code>.hg/</code> folder, isn't it?</p> <h3>.hgignore</h3> <pre><code>/.hg/.hgignore file # Allow *. syntax syntax:glob # Ignore these files .hgignore ....
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,019
mercurial
# .hgignore not working for mercurial I use mercurial for php projects and my `.hgignore` file is not working. It's supposed to be placed in the `.hg/` folder, isn't it? ### .hgignore ``` /.hg/.hgignore file # Allow *. syntax syntax:glob # Ignore these files .hgignore .htaccess .hg/* ```
There is no mention in the [.hgignore](https://www.mercurial-scm.org/wiki/.hgignore) page of that file being *inside* `.hg`: > The `.hgignore` file **sits in the working directory, next to the `.hg` folder**. And whatever file you want to ignore, you must be sure they are not already tracked. If they are, you need to...
2684898
Mercurial Remove History
54
2010-04-21 16:53:34
<p>Is there a way in mercurial to remove old changesets from a database? I have a repository that is 60GB and that makes it pretty painful to do a clone. I would like to trim off everything before a certain date and put the huge database away to collect dust.</p>
18,283
632
2019-05-23 16:49:33
2,685,223
29
2010-04-21 17:40:02
8,992
2019-05-23 16:49:33
https://stackoverflow.com/q/2684898
https://stackoverflow.com/a/2685223
<p>You can do it, but in doing so you invalidate all the clones out there, so it's generally not wise to do unless you're working entirely alone.</p> <p>Every changeset in mercurial is uniquely identified by a hashcode, which is a combination of (among other things) the source code changes, metadata, and the hashes of...
<p>You can do it, but in doing so you invalidate all the clones out there, so it's generally not wise to do unless you're working entirely alone.</p> <p>Every changeset in mercurial is uniquely identified by a hashcode, which is a combination of (among other things) the source code changes, metadata, and the hashes of...
802
mercurial
<h1>Mercurial Remove History</h1> <p>Is there a way in mercurial to remove old changesets from a database? I have a repository that is 60GB and that makes it pretty painful to do a clone. I would like to trim off everything before a certain date and put the huge database away to collect dust.</p>
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,020
mercurial
# Mercurial Remove History Is there a way in mercurial to remove old changesets from a database? I have a repository that is 60GB and that makes it pretty painful to do a clone. I would like to trim off everything before a certain date and put the huge database away to collect dust.
You can do it, but in doing so you invalidate all the clones out there, so it's generally not wise to do unless you're working entirely alone. Every changeset in mercurial is uniquely identified by a hashcode, which is a combination of (among other things) the source code changes, metadata, and the hashes of its one o...
8663483
Move local Mercurial repository to Bitbucket
28
2011-12-29 02:45:41
<p>Has anyone taken a local repo and imported it into Bitbucket? When I go to do this, the Import page asks for a URL, but I'm working on a local computer that does not have port <code>8000</code> open to the outside world. </p> <p>Can I just use some special form of a file path?</p>
6,611
527,516
2019-02-01 08:17:03
8,664,049
29
2011-12-29 04:37:36
688,393
2011-12-29 04:46:37
https://stackoverflow.com/q/8663483
https://stackoverflow.com/a/8664049
<p>First you need to create a repository in <a href="https://bitbucket.org/">Bitbucket</a>, go to <code>Repositories -&gt; create repository</code>. Then you can choose between HTTPS or SSH.</p> <p>You can customize your <a href="http://www.selenic.com/mercurial/hgrc.5.html">hgrc</a> file like this:</p> <pre><code>[u...
<p>First you need to create a repository in <a href="https://bitbucket.org/">Bitbucket</a>, go to <code>Repositories -&gt; create repository</code>. Then you can choose between HTTPS or SSH.</p> <p>You can customize your <a href="http://www.selenic.com/mercurial/hgrc.5.html">hgrc</a> file like this:</p> <pre><code>[u...
802, 8337
bitbucket, mercurial
<h1>Move local Mercurial repository to Bitbucket</h1> <p>Has anyone taken a local repo and imported it into Bitbucket? When I go to do this, the Import page asks for a URL, but I'm working on a local computer that does not have port <code>8000</code> open to the outside world. </p> <p>Can I just use some special for...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,021
mercurial
# Move local Mercurial repository to Bitbucket Has anyone taken a local repo and imported it into Bitbucket? When I go to do this, the Import page asks for a URL, but I'm working on a local computer that does not have port `8000` open to the outside world. Can I just use some special form of a file path?
First you need to create a repository in [Bitbucket](https://bitbucket.org/), go to `Repositories -> create repository`. Then you can choose between HTTPS or SSH. You can customize your [hgrc](http://www.selenic.com/mercurial/hgrc.5.html) file like this: ``` [ui] username = Your Name <youremail@example.com> [paths] ...
1898994
Converting from Mercurial to Subversion
24
2009-12-14 04:55:15
<p>Due to lack of Mercurial support in several tools, and managerial oppression it has become necessary to convert several trial Mercurial repositories to Subversion in order to conform with the company standard.</p> <p>Are there any tools or suggestions for how to achieve this without a loss of revision history and t...
11,440
149,482
2015-06-22 18:25:48
1,899,076
29
2009-12-14 05:27:52
8,992
2010-04-24 01:40:18
https://stackoverflow.com/q/1898994
https://stackoverflow.com/a/1899076
<p>The convert extension that ships with mercurial can use mercurial as a src and subversion as a dest.</p> <pre><code>hg convert --dest-type svn hgreponame svnreponame </code></pre> <p>Make sure to enable it in your .hgrc file.</p> <p>If you want to keep using mercurial on the sly, then <a href="http://bitbucket.or...
<p>The convert extension that ships with mercurial can use mercurial as a src and subversion as a dest.</p> <pre><code>hg convert --dest-type svn hgreponame svnreponame </code></pre> <p>Make sure to enable it in your .hgrc file.</p> <p>If you want to keep using mercurial on the sly, then <a href="http://bitbucket.or...
63, 97, 456, 802
mercurial, migration, svn, version-control
<h1>Converting from Mercurial to Subversion</h1> <p>Due to lack of Mercurial support in several tools, and managerial oppression it has become necessary to convert several trial Mercurial repositories to Subversion in order to conform with the company standard.</p> <p>Are there any tools or suggestions for how to achi...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,023
mercurial
# Converting from Mercurial to Subversion Due to lack of Mercurial support in several tools, and managerial oppression it has become necessary to convert several trial Mercurial repositories to Subversion in order to conform with the company standard. Are there any tools or suggestions for how to achieve this without...
The convert extension that ships with mercurial can use mercurial as a src and subversion as a dest. ``` hg convert --dest-type svn hgreponame svnreponame ``` Make sure to enable it in your .hgrc file. If you want to keep using mercurial on the sly, then [hgsubversion](http://bitbucket.org/durin42/hgsubversion/wiki/...
20575401
Mercurial ignores a file rename (changing case)
22
2013-12-13 20:26:48
<p>I'm working with a project I inherited from a Windows guy. It's under Hg version control. It got some inconsistent filename convention which I'm trying to fix so I renamed a file named <code>jquery.fullpage.js</code> to <code>jquery.fullPage.js</code> (just uppercased "P") to adhere to the original author of that jQ...
5,503
1,252,647
2019-01-15 13:04:05
20,576,001
29
2013-12-13 21:07:15
2,217,862
2013-12-13 21:07:15
https://stackoverflow.com/q/20575401
https://stackoverflow.com/a/20576001
<p>This is a case folding problem. Try to rename the file through Mercurial: <code>hg rename jquery.fullpage.js jquery.fullPage.js</code>.</p>
<p>This is a case folding problem. Try to rename the file through Mercurial: <code>hg rename jquery.fullpage.js jquery.fullPage.js</code>.</p>
802
mercurial
<h1>Mercurial ignores a file rename (changing case)</h1> <p>I'm working with a project I inherited from a Windows guy. It's under Hg version control. It got some inconsistent filename convention which I'm trying to fix so I renamed a file named <code>jquery.fullpage.js</code> to <code>jquery.fullPage.js</code> (just up...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,024
mercurial
# Mercurial ignores a file rename (changing case) I'm working with a project I inherited from a Windows guy. It's under Hg version control. It got some inconsistent filename convention which I'm trying to fix so I renamed a file named `jquery.fullpage.js` to `jquery.fullPage.js` (just uppercased "P") to adhere to the ...
This is a case folding problem. Try to rename the file through Mercurial: `hg rename jquery.fullpage.js jquery.fullPage.js`.
23136618
Mercurial:Remove last commit
16
2014-04-17 14:58:17
<p>I was working in default, but thought to be working in another branch. I commited, but didn't push.</p> <p>Now I want to change branches and commit the changes to another branch, but also dont want the commit to go to default.</p> <p>How do I undo that commit?</p>
19,641
1,571,481
2015-01-23 03:50:39
23,136,968
29
2014-04-17 15:14:27
870,953
2015-01-23 03:50:39
https://stackoverflow.com/q/23136618
https://stackoverflow.com/a/23136968
<p>If you are still in the <em>draft</em> phase (not pushed elsewhere yet), use the built-in extension <code>hg strip &lt;rev&gt;</code> command. Otherwise, you should do a <code>hg backout</code>, which will reverse the changeset.</p> <p>In case you still need the commit you made, I suggest you <code>export</code> it...
<p>If you are still in the <em>draft</em> phase (not pushed elsewhere yet), use the built-in extension <code>hg strip &lt;rev&gt;</code> command. Otherwise, you should do a <code>hg backout</code>, which will reverse the changeset.</p> <p>In case you still need the commit you made, I suggest you <code>export</code> it...
802
mercurial
<h1>Mercurial:Remove last commit</h1> <p>I was working in default, but thought to be working in another branch. I commited, but didn't push.</p> <p>Now I want to change branches and commit the changes to another branch, but also dont want the commit to go to default.</p> <p>How do I undo that commit?</p>
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,025
mercurial
# Mercurial:Remove last commit I was working in default, but thought to be working in another branch. I commited, but didn't push. Now I want to change branches and commit the changes to another branch, but also dont want the commit to go to default. How do I undo that commit?
If you are still in the *draft* phase (not pushed elsewhere yet), use the built-in extension `hg strip <rev>` command. Otherwise, you should do a `hg backout`, which will reverse the changeset. In case you still need the commit you made, I suggest you `export` it to `import` it again in the correct branch, before stri...
2679605
How to pull in upstream changes into a fork using Mercurial?
37
2010-04-21 00:31:48
<p>I've forked a Mercurial repository, and now I want to pull the changes from the main repository into my fork. If this were git, I would do something like...</p> <pre><code>git remote add upstream &lt;url&gt; git pull upstream master </code></pre> <p>How do I do this sort of thing in Mercurial?</p>
7,904
50,986
2014-03-14 17:30:18
2,679,659
28
2010-04-21 00:50:00
106,189
2010-04-21 00:50:00
https://stackoverflow.com/q/2679605
https://stackoverflow.com/a/2679659
<p>If you cloned the repository from the one you want to pull changes from, you can simply do:</p> <pre><code>hg pull </code></pre> <p>If you cloned the repository from another repository, you can:</p> <pre><code>hg pull &lt;location of repository to pull from&gt; </code></pre> <p>You'll then need to update your wo...
<p>If you cloned the repository from the one you want to pull changes from, you can simply do:</p> <pre><code>hg pull </code></pre> <p>If you cloned the repository from another repository, you can:</p> <pre><code>hg pull &lt;location of repository to pull from&gt; </code></pre> <p>You'll then need to update your wo...
802
mercurial
<h1>How to pull in upstream changes into a fork using Mercurial?</h1> <p>I've forked a Mercurial repository, and now I want to pull the changes from the main repository into my fork. If this were git, I would do something like...</p> <pre><code>git remote add upstream &lt;url&gt; git pull upstream master </code></pre...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,026
mercurial
# How to pull in upstream changes into a fork using Mercurial? I've forked a Mercurial repository, and now I want to pull the changes from the main repository into my fork. If this were git, I would do something like... ``` git remote add upstream <url> git pull upstream master ``` How do I do this sort of thing in ...
If you cloned the repository from the one you want to pull changes from, you can simply do: ``` hg pull ``` If you cloned the repository from another repository, you can: ``` hg pull <location of repository to pull from> ``` You'll then need to update your working copy: ``` hg update ``` That's the basics, anyway...
3066298
Split large repo into multiple subrepos and preserve history (Mercurial)
29
2010-06-17 23:19:24
<p>We have a large base of code that contains several shared projects, solution files, etc in one directory in SVN. We're migrating to Mercurial. I would like to take this opportunity to reorganize our code into several repositories to make cloning for branching have less overhead. I've already successfully converted o...
4,365
169,491
2010-06-21 16:45:28
3,067,054
28
2010-06-18 03:35:13
8,992
2010-06-18 03:35:13
https://stackoverflow.com/q/3066298
https://stackoverflow.com/a/3067054
<p>This can absolutely be done. You'll want to use the <code>hg convert</code> command. Here's the process I'd use:</p> <ol> <li>convert everything to a single hg repository using <code>hg convert</code> with a source type of svn and a dest type of hg (it sounds like you've already done this step)</li> <li>create a ...
<p>This can absolutely be done. You'll want to use the <code>hg convert</code> command. Here's the process I'd use:</p> <ol> <li>convert everything to a single hg repository using <code>hg convert</code> with a source type of svn and a dest type of hg (it sounds like you've already done this step)</li> <li>create a ...
63, 802, 33953, 49387
mercurial, subrepos, svn, visual-studio
<h1>Split large repo into multiple subrepos and preserve history (Mercurial)</h1> <p>We have a large base of code that contains several shared projects, solution files, etc in one directory in SVN. We're migrating to Mercurial. I would like to take this opportunity to reorganize our code into several repositories to ma...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,027
mercurial
# Split large repo into multiple subrepos and preserve history (Mercurial) We have a large base of code that contains several shared projects, solution files, etc in one directory in SVN. We're migrating to Mercurial. I would like to take this opportunity to reorganize our code into several repositories to make clonin...
This can absolutely be done. You'll want to use the `hg convert` command. Here's the process I'd use: 1. convert everything to a single hg repository using `hg convert` with a source type of svn and a dest type of hg (it sounds like you've already done this step) 2. create a collection of `filemap` files for use with ...
8482538
How to stop tracking a file without deleting it on Mercurial
27
2011-12-12 23:42:55
<p>I saw <a href="https://stackoverflow.com/questions/7072213/how-to-stop-tracking-a-file-without-removing-it-from-repo">this thread</a> which discusses a solution for <code>git</code>, and found <a href="http://mercurial.808500.n3.nabble.com/How-to-stop-tracking-a-file-without-deleting-the-file-td797836.html" rel="nor...
20,597
283,296
2014-05-14 12:11:29
8,482,559
28
2011-12-12 23:45:37
688,393
2011-12-13 02:39:31
https://stackoverflow.com/q/8482538
https://stackoverflow.com/a/8482559
<p>You can just use <code>hg forget</code> or maybe add the file to your <code>.hgignore</code> file</p> <p>And to answer the last question about the <code>R</code> in <code>my_file</code>. If you see the help for <code>hg rm --help</code>:</p> <blockquote> <p>hg remove [OPTION]... FILE...</p> <p>aliases: rm</...
<p>You can just use <code>hg forget</code> or maybe add the file to your <code>.hgignore</code> file</p> <p>And to answer the last question about the <code>R</code> in <code>my_file</code>. If you see the help for <code>hg rm --help</code>:</p> <blockquote> <p>hg remove [OPTION]... FILE...</p> <p>aliases: rm</...
802
mercurial
<h1>How to stop tracking a file without deleting it on Mercurial</h1> <p>I saw <a href="https://stackoverflow.com/questions/7072213/how-to-stop-tracking-a-file-without-removing-it-from-repo">this thread</a> which discusses a solution for <code>git</code>, and found <a href="http://mercurial.808500.n3.nabble.com/How-to-...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,028
mercurial
# How to stop tracking a file without deleting it on Mercurial I saw [this thread](https://stackoverflow.com/questions/7072213/how-to-stop-tracking-a-file-without-removing-it-from-repo) which discusses a solution for `git`, and found [this thread](http://mercurial.808500.n3.nabble.com/How-to-stop-tracking-a-file-witho...
You can just use `hg forget` or maybe add the file to your `.hgignore` file And to answer the last question about the `R` in `my_file`. If you see the help for `hg rm --help`: > hg remove [OPTION]... FILE... > > aliases: rm > > remove the specified files on the next commit > > ``` > Schedule the indicated files for r...
1304121
Configuring Mercurial - FileMerge for Apple Mac OS X
23
2009-08-20 05:29:37
<p>How do I configure Apple's FileMerge program to function as Mercurial's merge tool? I have my .hgrc file setup in my home directory and I simply want to configure FileMerge as the merge program.</p>
11,786
18,196
2017-06-20 07:37:19
1,304,624
28
2009-08-20 07:55:47
145,403
2017-06-20 07:37:19
https://stackoverflow.com/q/1304121
https://stackoverflow.com/a/1304624
<p>As described in the <a href="https://www.mercurial-scm.org/wiki/MacOSXFileMerge" rel="nofollow noreferrer">hg wiki</a>, this has worked for me with various versions of hg:</p> <ul> <li>Create a script somewhere in your <code>$PATH</code>, say in <code>/usr/local/bin</code>:</li> </ul> <blockquote> <pre><code>$ vim...
<p>As described in the <a href="https://www.mercurial-scm.org/wiki/MacOSXFileMerge" rel="nofollow noreferrer">hg wiki</a>, this has worked for me with various versions of hg:</p> <ul> <li>Create a script somewhere in your <code>$PATH</code>, say in <code>/usr/local/bin</code>:</li> </ul> <blockquote> <pre><code>$ vim...
369, 725, 802, 17349
configuration, filemerge, macos, mercurial
<h1>Configuring Mercurial - FileMerge for Apple Mac OS X</h1> <p>How do I configure Apple's FileMerge program to function as Mercurial's merge tool? I have my .hgrc file setup in my home directory and I simply want to configure FileMerge as the merge program.</p>
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,029
mercurial
# Configuring Mercurial - FileMerge for Apple Mac OS X How do I configure Apple's FileMerge program to function as Mercurial's merge tool? I have my .hgrc file setup in my home directory and I simply want to configure FileMerge as the merge program.
As described in the [hg wiki](https://www.mercurial-scm.org/wiki/MacOSXFileMerge), this has worked for me with various versions of hg: - Create a script somewhere in your `$PATH`, say in `/usr/local/bin`: > ``` > $ vim /usr/local/bin/opendiff-w > > #!/bin/sh > # opendiff returns immediately, without waiting for FileM...
14984793
Mercurial - close default branch and replace with a named branch as new default
17
2013-02-20 16:22:33
<p>In a mercurial repo, the "default" branch has fallen very out of date to the point where it no longer makes sense to merge in the changes from "develop", a named branch which has the latest deployed version of the application. </p> <p>Instead of merging develop into default, how can I close the current default bran...
4,693
1,630,486
2013-02-21 08:02:32
14,991,454
28
2013-02-20 22:51:44
479,199
2013-02-20 22:51:44
https://stackoverflow.com/q/14984793
https://stackoverflow.com/a/14991454
<p>If <code>default</code> has diverged somewhat from <code>develop</code> and you want <code>default</code> to be exactly the same as <code>develop</code> after the merge, you need a slightly different set of commands from what Edward gave you (this will also work where <code>develop</code> is a direct descendant of <...
<p>If <code>default</code> has diverged somewhat from <code>develop</code> and you want <code>default</code> to be exactly the same as <code>develop</code> after the merge, you need a slightly different set of commands from what Edward gave you (this will also work where <code>develop</code> is a direct descendant of <...
802, 53847
branching-and-merging, mercurial
<h1>Mercurial - close default branch and replace with a named branch as new default</h1> <p>In a mercurial repo, the "default" branch has fallen very out of date to the point where it no longer makes sense to merge in the changes from "develop", a named branch which has the latest deployed version of the application. <...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,030
mercurial
# Mercurial - close default branch and replace with a named branch as new default In a mercurial repo, the "default" branch has fallen very out of date to the point where it no longer makes sense to merge in the changes from "develop", a named branch which has the latest deployed version of the application. Instead o...
If `default` has diverged somewhat from `develop` and you want `default` to be exactly the same as `develop` after the merge, you need a slightly different set of commands from what Edward gave you (this will also work where `develop` is a direct descendant of `default`). ``` hg update -C default hg -y merge --tool in...
5220001
Mercurial paths in hgrc
14
2011-03-07 12:58:15
<p>I need to know if i it is possible to add in my hgrc file something like this:</p> <pre><code>[paths] default = http://somehost.com/repos/ live = ssh://user@host.com//home/user/public_html </code></pre> <p>I read some information about this in <a href="http://www.selenic.com/mercurial/hgrc.5.html#paths" rel="noref...
11,354
584,332
2011-03-07 13:08:46
5,220,112
28
2011-03-07 13:08:46
63,147
2011-03-07 13:08:46
https://stackoverflow.com/q/5220001
https://stackoverflow.com/a/5220112
<p>From <a href="http://www.selenic.com/hg/help/urls"><code>hg help urls</code></a>:</p> <blockquote> <p>URLs can all be stored in your configuration file with path aliases under the [paths] section like so:</p> <pre><code> [paths] alias1 = URL1 alias2 = URL2 ... </code></pre> <p>You can then use th...
<p>From <a href="http://www.selenic.com/hg/help/urls"><code>hg help urls</code></a>:</p> <blockquote> <p>URLs can all be stored in your configuration file with path aliases under the [paths] section like so:</p> <pre><code> [paths] alias1 = URL1 alias2 = URL2 ... </code></pre> <p>You can then use th...
802
mercurial
<h1>Mercurial paths in hgrc</h1> <p>I need to know if i it is possible to add in my hgrc file something like this:</p> <pre><code>[paths] default = http://somehost.com/repos/ live = ssh://user@host.com//home/user/public_html </code></pre> <p>I read some information about this in <a href="http://www.selenic.com/mercur...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,031
mercurial
# Mercurial paths in hgrc I need to know if i it is possible to add in my hgrc file something like this: ``` [paths] default = http://somehost.com/repos/ live = ssh://user@host.com//home/user/public_html ``` I read some information about this in <http://www.selenic.com/mercurial/hgrc.5.html#paths> But my problem is ...
From [`hg help urls`](http://www.selenic.com/hg/help/urls): > URLs can all be stored in your > configuration file with path aliases > under the [paths] section like so: > > ``` > [paths] > alias1 = URL1 > alias2 = URL2 > ... > ``` > > You can then use the alias for any > command that uses a URL (for example > ...
5366869
How to entirely disable SSL certificate checks in Mercurial / TortoiseHg?
47
2011-03-20 05:02:45
<p>I'm looking for a way to make <code>--insecure</code> option the default one for any <code>hg</code> \ TortoiseHg command.</p> <p>Please don't write this is a bad practice - I aware about possible risks and consider they're fully acceptable.</p>
43,309
106,042
2019-06-13 12:30:54
5,371,180
27
2011-03-20 20:10:48
8,992
2018-02-22 10:35:22
https://stackoverflow.com/q/5366869
https://stackoverflow.com/a/5371180
<p>Setting <code>cacerts</code> in the <code>[web]</code> section to the empty string looks to be the same thing. From <a href="https://www.mercurial-scm.org/repo/hg/file/48d606d7192b/mercurial/dispatch.py#l560" rel="nofollow noreferrer">the source</a>:</p> <pre><code>if cmdoptions.get('insecure', False): ui.setc...
<p>Setting <code>cacerts</code> in the <code>[web]</code> section to the empty string looks to be the same thing. From <a href="https://www.mercurial-scm.org/repo/hg/file/48d606d7192b/mercurial/dispatch.py#l560" rel="nofollow noreferrer">the source</a>:</p> <pre><code>if cmdoptions.get('insecure', False): ui.setc...
641, 802, 8122
mercurial, ssl, tortoisehg
<h1>How to entirely disable SSL certificate checks in Mercurial / TortoiseHg?</h1> <p>I'm looking for a way to make <code>--insecure</code> option the default one for any <code>hg</code> \ TortoiseHg command.</p> <p>Please don't write this is a bad practice - I aware about possible risks and consider they're fully acc...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,034
mercurial
# How to entirely disable SSL certificate checks in Mercurial / TortoiseHg? I'm looking for a way to make `--insecure` option the default one for any `hg` \ TortoiseHg command. Please don't write this is a bad practice - I aware about possible risks and consider they're fully acceptable.
Setting `cacerts` in the `[web]` section to the empty string looks to be the same thing. From [the source](https://www.mercurial-scm.org/repo/hg/file/48d606d7192b/mercurial/dispatch.py#l560): ``` if cmdoptions.get('insecure', False): ui.setconfig('web', 'cacerts', '!', '--insecure') ``` which [the wiki confirms](...
2509609
How to forget all removed files with Mercurial
23
2010-03-24 16:47:11
<p>I am new to Mercurial and after a cleanup of the image folder in my project, I have a ton of files showing with ! in the 'hg status'. I can type a 'hg forget ' for each, but there must be an easier way.</p> <p>So how can I tell mercurial to forget about all the removed (status = !) files in a folder?</p>
5,997
3,610
2014-01-22 06:29:21
2,510,525
27
2010-03-24 18:47:48
8,992
2010-03-24 18:47:48
https://stackoverflow.com/q/2509609
https://stackoverflow.com/a/2510525
<p>If you're also okay with adding any files that exist and aren't ignored then:</p> <pre><code>hg addremove </code></pre> <p>would a popular way to do that.</p>
<p>If you're also okay with adding any files that exist and aren't ignored then:</p> <pre><code>hg addremove </code></pre> <p>would a popular way to do that.</p>
802
mercurial
<h1>How to forget all removed files with Mercurial</h1> <p>I am new to Mercurial and after a cleanup of the image folder in my project, I have a ton of files showing with ! in the 'hg status'. I can type a 'hg forget ' for each, but there must be an easier way.</p> <p>So how can I tell mercurial to forget about all th...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,036
mercurial
# How to forget all removed files with Mercurial I am new to Mercurial and after a cleanup of the image folder in my project, I have a ton of files showing with ! in the 'hg status'. I can type a 'hg forget ' for each, but there must be an easier way. So how can I tell mercurial to forget about all the removed (statu...
If you're also okay with adding any files that exist and aren't ignored then: ``` hg addremove ``` would a popular way to do that.
19442
how to allow files starting with period and no extension in windows 2003 server?
23
2008-08-21 07:26:27
<p>How can I create this file in a directory in windows 2003 SP2:</p> <pre><code>.hgignore </code></pre> <p>I get error: You must type a file name.</p>
5,537
479
2021-12-06 17:35:58
19,443
27
2008-08-21 07:28:37
227
2008-08-21 07:28:37
https://stackoverflow.com/q/19442
https://stackoverflow.com/a/19443
<p>That's a "feature" of Windows Explorer. Try to create your files from a command line (or from a batch/program you wrote) and it should work fine. Try this from a dos prompt:</p> <pre><code>echo Hello there! &gt; .hgignore </code></pre>
<p>That's a "feature" of Windows Explorer. Try to create your files from a command line (or from a batch/program you wrote) and it should work fine. Try this from a dos prompt:</p> <pre><code>echo Hello there! &gt; .hgignore </code></pre>
802, 23964, 31419
hgignore, mercurial, windows-server-2003
<h1>how to allow files starting with period and no extension in windows 2003 server?</h1> <p>How can I create this file in a directory in windows 2003 SP2:</p> <pre><code>.hgignore </code></pre> <p>I get error: You must type a file name.</p>
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,037
mercurial
# how to allow files starting with period and no extension in windows 2003 server? How can I create this file in a directory in windows 2003 SP2: ``` .hgignore ``` I get error: You must type a file name.
That's a "feature" of Windows Explorer. Try to create your files from a command line (or from a batch/program you wrote) and it should work fine. Try this from a dos prompt: ``` echo Hello there! > .hgignore ```
12777906
How to set Mercurial upstream
22
2012-10-08 08:28:57
<p>I created local hg repository for new project: <code>hg init ; hg addremove</code>, then I created empty upstream repo, and pushed first version there: <code>hg push https://remoterepo</code>.</p> <p>Now, I want to set that <code>https://remoterepo</code> as default upstream, so I can just do hg push/pull without g...
4,624
1,717,300
2012-10-08 08:44:29
12,778,056
27
2012-10-08 08:39:23
853,611
2012-10-08 08:44:29
https://stackoverflow.com/q/12777906
https://stackoverflow.com/a/12778056
<p>You can do that by adding the upstream URL to <code>/project/.hg/hgrc</code> like this: </p> <pre><code>[paths] default = ssh://test@bitbucket.com/repos/something upstream = ssh://test@bitbucket.com/repos/something_else </code></pre> <p>and now <code>upstream</code> is an alias for repo <code>something_else</code>...
<p>You can do that by adding the upstream URL to <code>/project/.hg/hgrc</code> like this: </p> <pre><code>[paths] default = ssh://test@bitbucket.com/repos/something upstream = ssh://test@bitbucket.com/repos/something_else </code></pre> <p>and now <code>upstream</code> is an alias for repo <code>something_else</code>...
802, 4236, 4860
mercurial, pull, push
<h1>How to set Mercurial upstream</h1> <p>I created local hg repository for new project: <code>hg init ; hg addremove</code>, then I created empty upstream repo, and pushed first version there: <code>hg push https://remoterepo</code>.</p> <p>Now, I want to set that <code>https://remoterepo</code> as default upstream, ...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,038
mercurial
# How to set Mercurial upstream I created local hg repository for new project: `hg init ; hg addremove`, then I created empty upstream repo, and pushed first version there: `hg push https://remoterepo`. Now, I want to set that `https://remoterepo` as default upstream, so I can just do hg push/pull without giving it. ...
You can do that by adding the upstream URL to `/project/.hg/hgrc` like this: ``` [paths] default = ssh://test@bitbucket.com/repos/something upstream = ssh://test@bitbucket.com/repos/something_else ``` and now `upstream` is an alias for repo `something_else` which you can then pull from or push to: ``` hg pull upstre...
7791903
How can I list a series of revisions using 'hg log'?
21
2011-10-17 09:39:53
<p>I'm attempting to use the <code>hg log</code> command to show a series of revisions, <em>x</em> through <em>y</em>.</p> <p>When I do this:</p> <pre><code>hg log -r 1+5 </code></pre> <p>I get this:</p> <pre><code>changeset: 1:7320d2a9baa5 user: Tim Post &lt;tpost@whereiwork.com&gt; date: Fri Sep 3...
17,699
null
2011-11-27 15:57:13
7,792,230
27
2011-10-17 10:08:31
351,301
2011-10-17 10:08:31
https://stackoverflow.com/q/7791903
https://stackoverflow.com/a/7792230
<p><code>hg log -r1:5</code>.</p> <p>Mercurial has an entire mini-language devoted to selecting revisions for commands (not just for logs). <a href="http://www.selenic.com/mercurial/hg.1.html#revsets" title="Mercurial docs">For more information, see <code>hg help revsets</code></a> (needs Mercurial 1.6+).</p>
<p><code>hg log -r1:5</code>.</p> <p>Mercurial has an entire mini-language devoted to selecting revisions for commands (not just for logs). <a href="http://www.selenic.com/mercurial/hg.1.html#revsets" title="Mercurial docs">For more information, see <code>hg help revsets</code></a> (needs Mercurial 1.6+).</p>
802, 73625
mercurial, mercurial-api
<h1>How can I list a series of revisions using 'hg log'?</h1> <p>I'm attempting to use the <code>hg log</code> command to show a series of revisions, <em>x</em> through <em>y</em>.</p> <p>When I do this:</p> <pre><code>hg log -r 1+5 </code></pre> <p>I get this:</p> <pre><code>changeset: 1:7320d2a9baa5 user: ...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,039
mercurial
# How can I list a series of revisions using 'hg log'? I'm attempting to use the `hg log` command to show a series of revisions, *x* through *y*. When I do this: ``` hg log -r 1+5 ``` I get this: ``` changeset: 1:7320d2a9baa5 user: Tim Post <tpost@whereiwork.com> date: Fri Sep 30 20:38:29 2011 +080...
`hg log -r1:5`. Mercurial has an entire mini-language devoted to selecting revisions for commands (not just for logs). [For more information, see `hg help revsets`](http://www.selenic.com/mercurial/hg.1.html#revsets "Mercurial docs") (needs Mercurial 1.6+).
6880556
Pulling from Mercurial - certificate error
21
2011-07-30 01:44:36
<p>I was trying to pull from a server, and I get the following error:</p> <pre><code>C:\Users\User\hg_repo&gt;hg pull abort: error: _ssl.c:490: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICAT E:certificate verify failed </code></pre> <p>I have downloaded the certificate and installed it into Windows' Trusted R...
20,470
14,902
2012-04-21 12:57:40
6,880,570
27
2011-07-30 01:47:01
14,902
2012-01-22 22:27:56
https://stackoverflow.com/q/6880556
https://stackoverflow.com/a/6880570
<p>In your user directory (e.g. C:\Users\ on Vista/Windows 7 or C:\Documents and Settings\ before that), there should be a file called 'mercurial.ini' (or if there isn't, just create an empty file with that name). Append a section to the bottom of that file that looks like this:</p> <pre><code>[web] cacerts = C:\the\p...
<p>In your user directory (e.g. C:\Users\ on Vista/Windows 7 or C:\Documents and Settings\ before that), there should be a file called 'mercurial.ini' (or if there isn't, just create an empty file with that name). Append a section to the bottom of that file that looks like this:</p> <pre><code>[web] cacerts = C:\the\p...
802, 5954, 34046
certificate, hgrc, mercurial
<h1>Pulling from Mercurial - certificate error</h1> <p>I was trying to pull from a server, and I get the following error:</p> <pre><code>C:\Users\User\hg_repo&gt;hg pull abort: error: _ssl.c:490: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICAT E:certificate verify failed </code></pre> <p>I have downloaded the ...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,040
mercurial
# Pulling from Mercurial - certificate error I was trying to pull from a server, and I get the following error: ``` C:\Users\User\hg_repo>hg pull abort: error: _ssl.c:490: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICAT E:certificate verify failed ``` I have downloaded the certificate and installed it into Wi...
In your user directory (e.g. C:\Users\ on Vista/Windows 7 or C:\Documents and Settings\ before that), there should be a file called 'mercurial.ini' (or if there isn't, just create an empty file with that name). Append a section to the bottom of that file that looks like this: ``` [web] cacerts = C:\the\path\to\the\cer...
6067152
How do I make mercurial ignore any file with .xxx extension
21
2011-05-20 03:28:45
<p>I want Mercurial to ignore any file with a certain extension.</p> <p>For example, I wanted to ignore files with a .SUO extension. (There's no need to version-control Visual Studio user settings.)</p> <p>So I changed my .hgignore file to this:</p> <pre><code>syntax: glob *.suo </code></pre> <p>However, this has n...
17,002
23,341
2014-07-22 15:20:08
6,067,197
27
2011-05-20 03:36:42
22,211
2011-05-20 14:35:34
https://stackoverflow.com/q/6067152
https://stackoverflow.com/a/6067197
<p>If, when running <code>hg status</code> before altering your .hgignore file, the .suo file had a <code>?</code> in front of it, then it should be ignored now. If anything else (<code>M</code> or <code>A</code> for example) it is already tracked by the repository and will not magically stop being tracked. In such a c...
<p>If, when running <code>hg status</code> before altering your .hgignore file, the .suo file had a <code>?</code> in front of it, then it should be ignored now. If anything else (<code>M</code> or <code>A</code> for example) it is already tracked by the repository and will not magically stop being tracked. In such a c...
802, 1280, 31419
file-extension, hgignore, mercurial
<h1>How do I make mercurial ignore any file with .xxx extension</h1> <p>I want Mercurial to ignore any file with a certain extension.</p> <p>For example, I wanted to ignore files with a .SUO extension. (There's no need to version-control Visual Studio user settings.)</p> <p>So I changed my .hgignore file to this:</p>...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,041
mercurial
# How do I make mercurial ignore any file with .xxx extension I want Mercurial to ignore any file with a certain extension. For example, I wanted to ignore files with a .SUO extension. (There's no need to version-control Visual Studio user settings.) So I changed my .hgignore file to this: ``` syntax: glob *.suo ``...
If, when running `hg status` before altering your .hgignore file, the .suo file had a `?` in front of it, then it should be ignored now. If anything else (`M` or `A` for example) it is already tracked by the repository and will not magically stop being tracked. In such a case you'll need to do `hg remove` on the file t...
2459677
Get visual diff of two revisions of a file
21
2010-03-17 03:10:30
<p>I'd like to know the best/easiest way to get a visual diff of a file given two revisions in Mercurial. I.e., I'd like to visualize the difference between revision 3 and revision 12, etc.</p>
13,315
10,589
2017-06-29 12:22:35
2,459,751
27
2010-03-17 03:35:06
8,992
2017-06-29 12:22:35
https://stackoverflow.com/q/2459677
https://stackoverflow.com/a/2459751
<p>If by 'visual' you mean a text comparison you can do:</p> <pre><code>hg diff -r 3 -r 12 </code></pre> <p>If you want a GUI tools you can easily configure and use the <a href="https://www.mercurial-scm.org/wiki/ExtdiffExtension" rel="noreferrer">ExtDiff</a> extension, which comes with Mercurial, and use:</p> <pre>...
<p>If by 'visual' you mean a text comparison you can do:</p> <pre><code>hg diff -r 3 -r 12 </code></pre> <p>If you want a GUI tools you can easily configure and use the <a href="https://www.mercurial-scm.org/wiki/ExtdiffExtension" rel="noreferrer">ExtDiff</a> extension, which comes with Mercurial, and use:</p> <pre>...
606, 802
diff, mercurial
<h1>Get visual diff of two revisions of a file</h1> <p>I'd like to know the best/easiest way to get a visual diff of a file given two revisions in Mercurial. I.e., I'd like to visualize the difference between revision 3 and revision 12, etc.</p>
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,042
mercurial
# Get visual diff of two revisions of a file I'd like to know the best/easiest way to get a visual diff of a file given two revisions in Mercurial. I.e., I'd like to visualize the difference between revision 3 and revision 12, etc.
If by 'visual' you mean a text comparison you can do: ``` hg diff -r 3 -r 12 ``` If you want a GUI tools you can easily configure and use the [ExtDiff](https://www.mercurial-scm.org/wiki/ExtdiffExtension) extension, which comes with Mercurial, and use: ``` hg yourdiff -r 3 -r 12 ``` where `yourdiff` was configured ...
17847810
How do I know the current tag of Mercurial?
17
2013-07-25 02:03:46
<p>Now, I am getting vim source code by Mercurial (<code>hg</code>):</p> <pre><code>root@flyingfisher-virtual-machine:/work/ABC/VIM_HG# hg tags |more tip 5228:3f65dc9c8840 v7-4a-039 5227:a08fa2919f2b v7-4a-038 5225:8f983df0299f v7-4a-037 ...
9,075
1,645,761
2017-11-14 17:04:16
17,848,375
27
2013-07-25 03:11:15
960,558
2013-07-25 03:11:15
https://stackoverflow.com/q/17847810
https://stackoverflow.com/a/17848375
<p>Latest tag in ancestors, using log and templating</p> <p><code>hg log -r "." --template "{latesttag}\n"</code></p>
<p>Latest tag in ancestors, using log and templating</p> <p><code>hg log -r "." --template "{latesttag}\n"</code></p>
802, 34046
hgrc, mercurial
<h1>How do I know the current tag of Mercurial?</h1> <p>Now, I am getting vim source code by Mercurial (<code>hg</code>):</p> <pre><code>root@flyingfisher-virtual-machine:/work/ABC/VIM_HG# hg tags |more tip 5228:3f65dc9c8840 v7-4a-039 5227:a08fa2919f2b v7-4a-038 ...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,043
mercurial
# How do I know the current tag of Mercurial? Now, I am getting vim source code by Mercurial (`hg`): ``` root@flyingfisher-virtual-machine:/work/ABC/VIM_HG# hg tags |more tip 5228:3f65dc9c8840 v7-4a-039 5227:a08fa2919f2b v7-4a-038 5225:8f983df029...
Latest tag in ancestors, using log and templating `hg log -r "." --template "{latesttag}\n"`
3882295
Can hg log show only the ancestors of a given revision?
17
2010-10-07 13:50:16
<p>One thing I really miss moving from svn to mercurial is that mercurial's hg log command insists on showing all history rather than only the history of my current working revision. </p> <p>For example, I'm working on a repo with a lot of check-ins to another head within my branch, and the first 20 log entries have n...
7,698
418,282
2014-04-27 21:06:58
3,882,788
27
2010-10-07 14:39:10
19,465
2013-03-18 22:47:49
https://stackoverflow.com/q/3882295
https://stackoverflow.com/a/3882788
<p>If you've got Mercurial 1.6 or later, you can use <a href="http://www.selenic.com/hg/help/revsets" rel="noreferrer"><em>revsets</em></a> to do this:</p> <pre><code>hg log --rev "ancestors(.)" hg log --rev "reverse(ancestors(.))" # Output in the same order as vanilla hg log </code></pre>
<p>If you've got Mercurial 1.6 or later, you can use <a href="http://www.selenic.com/hg/help/revsets" rel="noreferrer"><em>revsets</em></a> to do this:</p> <pre><code>hg log --rev "ancestors(.)" hg log --rev "reverse(ancestors(.))" # Output in the same order as vanilla hg log </code></pre>
802
mercurial
<h1>Can hg log show only the ancestors of a given revision?</h1> <p>One thing I really miss moving from svn to mercurial is that mercurial's hg log command insists on showing all history rather than only the history of my current working revision. </p> <p>For example, I'm working on a repo with a lot of check-ins to a...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,044
mercurial
# Can hg log show only the ancestors of a given revision? One thing I really miss moving from svn to mercurial is that mercurial's hg log command insists on showing all history rather than only the history of my current working revision. For example, I'm working on a repo with a lot of check-ins to another head withi...
If you've got Mercurial 1.6 or later, you can use [*revsets*](http://www.selenic.com/hg/help/revsets) to do this: ``` hg log --rev "ancestors(.)" hg log --rev "reverse(ancestors(.))" # Output in the same order as vanilla hg log ```
9946271
TortoiseHG Sync - How to save URL
14
2012-03-30 15:44:58
<p>I've recently migrated to Mercurial for source control and am using TortoiseHG. Everything is working great, but whenever I go to "Synchronize" to do a push, the remote repository URL is blank and I need to type it in every time. How do I save it so that the remote repository source is saved?</p>
9,690
166,303
2012-03-30 16:10:25
9,946,646
27
2012-03-30 16:10:25
63,147
2012-03-30 16:10:25
https://stackoverflow.com/q/9946271
https://stackoverflow.com/a/9946646
<p>You did not mention which version of TortoiseHg, but there are two "standard" ways to save the URL:</p> <p>1) Manually add the following lines to your <code>&lt;project_dir&gt;\.hg\hgrc</code> file:</p> <pre><code>[paths] default = http://server/path/to/remote/repo </code></pre> <p>2) Click the "Save" icon in T...
<p>You did not mention which version of TortoiseHg, but there are two "standard" ways to save the URL:</p> <p>1) Manually add the following lines to your <code>&lt;project_dir&gt;\.hg\hgrc</code> file:</p> <pre><code>[paths] default = http://server/path/to/remote/repo </code></pre> <p>2) Click the "Save" icon in T...
802, 8122
mercurial, tortoisehg
<h1>TortoiseHG Sync - How to save URL</h1> <p>I've recently migrated to Mercurial for source control and am using TortoiseHG. Everything is working great, but whenever I go to "Synchronize" to do a push, the remote repository URL is blank and I need to type it in every time. How do I save it so that the remote reposi...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,045
mercurial
# TortoiseHG Sync - How to save URL I've recently migrated to Mercurial for source control and am using TortoiseHG. Everything is working great, but whenever I go to "Synchronize" to do a push, the remote repository URL is blank and I need to type it in every time. How do I save it so that the remote repository source...
You did not mention which version of TortoiseHg, but there are two "standard" ways to save the URL: 1) Manually add the following lines to your `<project_dir>\.hg\hgrc` file: ``` [paths] default = http://server/path/to/remote/repo ``` 2) Click the "Save" icon in TortoiseHg's Sync view: ![TortoiseHg Sync screenshot...
7623607
Push to remote Mercurial repository
12
2011-10-01 23:27:52
<p>I have a Mercurial repository on a remote <a href="http://en.wikipedia.org/wiki/Virtual_private_server" rel="nofollow noreferrer">VPS</a>. The VPS has SSH access enabled. What are my options for pushing code changes from my development machine to the remote VPS?</p>
17,455
301,032
2017-11-13 22:48:08
7,623,804
27
2011-10-02 00:15:07
960,558
2011-10-06 03:07:32
https://stackoverflow.com/q/7623607
https://stackoverflow.com/a/7623804
<p>If your VPS has Mercurial installed, simply:</p> <pre><code>hg push ssh://username@host/path/relative/to/home </code></pre> <p>or add to the repo's hgrc</p> <pre><code>[paths] default-push = ssh://username@host/path/relative/to/home </code></pre> <p>and just</p> <pre><code>hg push </code></pre>
<p>If your VPS has Mercurial installed, simply:</p> <pre><code>hg push ssh://username@host/path/relative/to/home </code></pre> <p>or add to the repo's hgrc</p> <pre><code>[paths] default-push = ssh://username@host/path/relative/to/home </code></pre> <p>and just</p> <pre><code>hg push </code></pre>
386, 802, 4236
mercurial, push, ssh
<h1>Push to remote Mercurial repository</h1> <p>I have a Mercurial repository on a remote <a href="http://en.wikipedia.org/wiki/Virtual_private_server" rel="nofollow noreferrer">VPS</a>. The VPS has SSH access enabled. What are my options for pushing code changes from my development machine to the remote VPS?</p>
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,046
mercurial
# Push to remote Mercurial repository I have a Mercurial repository on a remote [VPS](http://en.wikipedia.org/wiki/Virtual_private_server). The VPS has SSH access enabled. What are my options for pushing code changes from my development machine to the remote VPS?
If your VPS has Mercurial installed, simply: ``` hg push ssh://username@host/path/relative/to/home ``` or add to the repo's hgrc ``` [paths] default-push = ssh://username@host/path/relative/to/home ``` and just ``` hg push ```
1751944
How do I get the current mercurial revision without calling hg?
12
2009-11-17 21:30:43
<p>In Git the current revision hash is stored in </p> <pre><code>.git/refs/heads/master </code></pre> <p>Is there an equivalent in Mercurial that doesn't require me making a call to hg log -l1? I know I can get the current branch in .hg/branch.</p> <p>This is to "display" the current hg hash on screen when browsing ...
8,545
2,183
2010-06-19 17:01:43
1,752,148
27
2009-11-17 21:58:52
13,498
2009-11-17 21:58:52
https://stackoverflow.com/q/1751944
https://stackoverflow.com/a/1752148
<pre><code>$ hg parents --template="{node}\n" 52b8cee1e59c91b9147635b7f44a3a8896ee0b00 $ hexdump -n 20 -e '1/1 "%02x"' .hg/dirstate 52b8cee1e59c91b9147635b7f44a3a8896ee0b00 </code></pre> <p>But why can't you just call <code>hg parents --template="{node}\n"</code>?</p>
<pre><code>$ hg parents --template="{node}\n" 52b8cee1e59c91b9147635b7f44a3a8896ee0b00 $ hexdump -n 20 -e '1/1 "%02x"' .hg/dirstate 52b8cee1e59c91b9147635b7f44a3a8896ee0b00 </code></pre> <p>But why can't you just call <code>hg parents --template="{node}\n"</code>?</p>
802
mercurial
<h1>How do I get the current mercurial revision without calling hg?</h1> <p>In Git the current revision hash is stored in </p> <pre><code>.git/refs/heads/master </code></pre> <p>Is there an equivalent in Mercurial that doesn't require me making a call to hg log -l1? I know I can get the current branch in .hg/branch.<...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,047
mercurial
# How do I get the current mercurial revision without calling hg? In Git the current revision hash is stored in ``` .git/refs/heads/master ``` Is there an equivalent in Mercurial that doesn't require me making a call to hg log -l1? I know I can get the current branch in .hg/branch. This is to "display" the current ...
``` $ hg parents --template="{node}\n" 52b8cee1e59c91b9147635b7f44a3a8896ee0b00 $ hexdump -n 20 -e '1/1 "%02x"' .hg/dirstate 52b8cee1e59c91b9147635b7f44a3a8896ee0b00 ``` But why can't you just call `hg parents --template="{node}\n"`?
10001017
hg shelve equivalent of git stash drop
42
2012-04-03 20:38:04
<p>I have the hg shelve (not attic) extension installed, and I want to drop a patch. In git it would be <code>git stash drop</code>. How do I do this using the shelve extension?</p>
15,687
610,585
2018-12-21 12:24:15
10,001,059
26
2012-04-03 20:41:06
610,585
2016-01-20 19:44:44
https://stackoverflow.com/q/10001017
https://stackoverflow.com/a/10001059
<p>The Mercurial shelve extension stores patches under .hg/shelved. Each is a simple patch file, and the filename is the name of the patch. So to remove a patch called 'mypatch' I can simply remove the file 'mypatch' from .hg/shelved:</p> <p><code>rm .hg/shelved/mypatch</code></p>
<p>The Mercurial shelve extension stores patches under .hg/shelved. Each is a simple patch file, and the filename is the name of the patch. So to remove a patch called 'mypatch' I can simply remove the file 'mypatch' from .hg/shelved:</p> <p><code>rm .hg/shelved/mypatch</code></p>
802, 31422
mercurial, shelving
<h1>hg shelve equivalent of git stash drop</h1> <p>I have the hg shelve (not attic) extension installed, and I want to drop a patch. In git it would be <code>git stash drop</code>. How do I do this using the shelve extension?</p>
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,048
mercurial
# hg shelve equivalent of git stash drop I have the hg shelve (not attic) extension installed, and I want to drop a patch. In git it would be `git stash drop`. How do I do this using the shelve extension?
The Mercurial shelve extension stores patches under .hg/shelved. Each is a simple patch file, and the filename is the name of the patch. So to remove a patch called 'mypatch' I can simply remove the file 'mypatch' from .hg/shelved: `rm .hg/shelved/mypatch`
1904419
Running Mercurial on a Flash Drive?
29
2009-12-15 00:07:33
<p>So I do a lot of work on a school computer. We can't install anything but we have most of our tools on our flash drives but I was wondering if there's a way to get Command Prompt to use Mercurial off of my Flash Drive. Let's say in theory that Mercurial's files were on my flash drive, where would I go from there?</p...
8,589
231,730
2025-05-08 10:10:50
1,904,438
26
2009-12-15 00:12:44
115,049
2025-05-08 10:10:50
https://stackoverflow.com/q/1904419
https://stackoverflow.com/a/1904438
<p>Say your flash drive was drive G: and your Mercurial executables are in G:\mercurial</p> <p>Open a command prompt and enter:</p> <pre><code>set PATH=%PATH%;G:\mercurial </code></pre> <p>Proceed to use <code>hg</code> as normal</p> <p>This should work, in theory. If you're on a *nix computer, you would do something l...
<p>Say your flash drive was drive G: and your Mercurial executables are in G:\mercurial</p> <p>Open a command prompt and enter:</p> <pre><code>set PATH=%PATH%;G:\mercurial </code></pre> <p>Proceed to use <code>hg</code> as normal</p> <p>This should work, in theory. If you're on a *nix computer, you would do something l...
802, 1407, 35565
mercurial, portability, usb-flash-drive
<h1>Running Mercurial on a Flash Drive?</h1> <p>So I do a lot of work on a school computer. We can't install anything but we have most of our tools on our flash drives but I was wondering if there's a way to get Command Prompt to use Mercurial off of my Flash Drive. Let's say in theory that Mercurial's files were on my...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,049
mercurial
# Running Mercurial on a Flash Drive? So I do a lot of work on a school computer. We can't install anything but we have most of our tools on our flash drives but I was wondering if there's a way to get Command Prompt to use Mercurial off of my Flash Drive. Let's say in theory that Mercurial's files were on my flash dr...
Say your flash drive was drive G: and your Mercurial executables are in G:\mercurial Open a command prompt and enter: ``` set PATH=%PATH%;G:\mercurial ``` Proceed to use `hg` as normal This should work, in theory. If you're on a *nix computer, you would do something like this (given /media/FLASHDRIVE is the path to...
9591380
How to deploy to Heroku using Mercurial?
28
2012-03-06 20:31:54
<p>I've been using Mercurial for quite some time and I'd like to start using Heroku as a deployment platform. However, they seem to support Git only. Does anybody knows how to Heroku using Mercurial?</p>
4,315
42,024
2017-06-23 02:15:57
10,045,177
26
2012-04-06 14:52:17
343,834
2012-04-06 14:52:17
https://stackoverflow.com/q/9591380
https://stackoverflow.com/a/10045177
<p>Once you have installed the <a href="http://hg-git.github.com/" rel="nofollow noreferrer">Hg-Git mercurial plugin</a>, add an alias to the <code>.hg/hgrc</code> of your repository:</p> <pre><code>[alias] push-heroku = push git+ssh://git@heroku.com:&lt;app name&gt;.git </code></pre> <p>You are now able to push your...
<p>Once you have installed the <a href="http://hg-git.github.com/" rel="nofollow noreferrer">Hg-Git mercurial plugin</a>, add an alias to the <code>.hg/hgrc</code> of your repository:</p> <pre><code>[alias] push-heroku = push git+ssh://git@heroku.com:&lt;app name&gt;.git </code></pre> <p>You are now able to push your...
802, 8279
heroku, mercurial
<h1>How to deploy to Heroku using Mercurial?</h1> <p>I've been using Mercurial for quite some time and I'd like to start using Heroku as a deployment platform. However, they seem to support Git only. Does anybody knows how to Heroku using Mercurial?</p>
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,050
mercurial
# How to deploy to Heroku using Mercurial? I've been using Mercurial for quite some time and I'd like to start using Heroku as a deployment platform. However, they seem to support Git only. Does anybody knows how to Heroku using Mercurial?
Once you have installed the [Hg-Git mercurial plugin](http://hg-git.github.com/), add an alias to the `.hg/hgrc` of your repository: ``` [alias] push-heroku = push git+ssh://git@heroku.com:<app name>.git ``` You are now able to push your application to Heroku: ``` hg push-heroku ``` Be aware that [Heroku does not l...
12772004
Mercurial: no ~/.hgrc file
25
2012-10-07 19:18:26
<p>I am trying to go though <a href="https://confluence.atlassian.com/pages/viewpage.action?pageId=270827678" rel="noreferrer">this tutorial</a> that says:</p> <hr> <p><strong>Enable SSH compression for Mercurial</strong></p> <p>Edit the Mercurial global configuration file (~/.hgrc). Add the following line to the UI...
33,494
1,531,116
2022-03-18 17:04:25
12,772,098
26
2012-10-07 19:27:59
960,588
2022-03-18 17:04:25
https://stackoverflow.com/q/12772004
https://stackoverflow.com/a/12772098
<p>It is not there by default. You don't need it to exist — it just <em>can</em> exist to customize how you use Mercurial. You just need to create a <code>.hgrc</code> file in your home directory and it should work.</p> <p>Heres a great intro post: <a href="https://web.archive.org/web/20120824162725/http://hgtip.com/ti...
<p>It is not there by default. You don't need it to exist — it just <em>can</em> exist to customize how you use Mercurial. You just need to create a <code>.hgrc</code> file in your home directory and it should work.</p> <p>Heres a great intro post: <a href="https://web.archive.org/web/20120824162725/http://hgtip.com/ti...
802
mercurial
<h1>Mercurial: no ~/.hgrc file</h1> <p>I am trying to go though <a href="https://confluence.atlassian.com/pages/viewpage.action?pageId=270827678" rel="noreferrer">this tutorial</a> that says:</p> <hr> <p><strong>Enable SSH compression for Mercurial</strong></p> <p>Edit the Mercurial global configuration file (~/.hgr...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,052
mercurial
# Mercurial: no ~/.hgrc file I am trying to go though [this tutorial](https://confluence.atlassian.com/pages/viewpage.action?pageId=270827678) that says: --- **Enable SSH compression for Mercurial** Edit the Mercurial global configuration file (~/.hgrc). Add the following line to the UI section: `ssh = ssh -C` --...
It is not there by default. You don't need it to exist — it just *can* exist to customize how you use Mercurial. You just need to create a `.hgrc` file in your home directory and it should work. Heres a great intro post: [http://hgtip.com/tips/beginner/2009-09-30-configuring-mercurial](https://web.archive.org/web/2012...
2367453
Recommended Mercurial repository/folder structure for an SVN user
24
2010-03-02 22:44:57
<p>I am experimenting with Hg with a view to moving away from SVN but wanted some opinions on how I should structure my Hg repository. I come from a SVN background (which may of tainted my outlook on how this should work!) and my repository currently looks something like this:</p> <pre><code>Project1 trunk branch...
6,140
9,236
2011-03-10 20:44:19
2,369,272
26
2010-03-03 06:47:15
9,396
2011-03-10 20:44:19
https://stackoverflow.com/q/2367453
https://stackoverflow.com/a/2369272
<p>There are several structural differences between a Subversion (SVN) and Mercurial (HG) repository, or repo for short, implies how you'll "design" your hierarchy:</p> <ul> <li><strong>Mercurial works better with only one project per repository</strong>: Because you always have to clone the entire repository, having ...
<p>There are several structural differences between a Subversion (SVN) and Mercurial (HG) repository, or repo for short, implies how you'll "design" your hierarchy:</p> <ul> <li><strong>Mercurial works better with only one project per repository</strong>: Because you always have to clone the entire repository, having ...
63, 802
mercurial, svn
<h1>Recommended Mercurial repository/folder structure for an SVN user</h1> <p>I am experimenting with Hg with a view to moving away from SVN but wanted some opinions on how I should structure my Hg repository. I come from a SVN background (which may of tainted my outlook on how this should work!) and my repository cur...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,053
mercurial
# Recommended Mercurial repository/folder structure for an SVN user I am experimenting with Hg with a view to moving away from SVN but wanted some opinions on how I should structure my Hg repository. I come from a SVN background (which may of tainted my outlook on how this should work!) and my repository currently loo...
There are several structural differences between a Subversion (SVN) and Mercurial (HG) repository, or repo for short, implies how you'll "design" your hierarchy: - **Mercurial works better with only one project per repository**: Because you always have to clone the entire repository, having multiple project in a singl...
8012486
Is there any command line in Mercurial to show the repository tree
22
2011-11-04 16:23:13
<p>I want to view the tree of the repository. Is there any command line in mercurial can do this?</p>
8,902
507,172
2021-03-19 13:10:58
8,012,528
26
2011-11-04 16:26:35
730,346
2011-11-04 16:26:35
https://stackoverflow.com/q/8012486
https://stackoverflow.com/a/8012528
<p>Both workable.</p> <pre><code>hg glog hg view </code></pre>
<p>Both workable.</p> <pre><code>hg glog hg view </code></pre>
802, 1231
command-line, mercurial
<h1>Is there any command line in Mercurial to show the repository tree</h1> <p>I want to view the tree of the repository. Is there any command line in mercurial can do this?</p>
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,054
mercurial
# Is there any command line in Mercurial to show the repository tree I want to view the tree of the repository. Is there any command line in mercurial can do this?
Both workable. ``` hg glog hg view ```
44894062
Disable color and paging for mercurial
19
2017-07-03 21:26:32
<p>New versions of mercurial will apply colors to the output of most commands and will pipe commands with long output to a pager. How do I restore the old behavior to not color output and never use a pager?</p>
3,036
1,382,869
2017-12-07 18:55:35
44,894,069
26
2017-07-03 21:27:03
1,382,869
2017-12-07 18:55:35
https://stackoverflow.com/q/44894062
https://stackoverflow.com/a/44894069
<p>Add the following to your .hgrc:</p> <pre><code>[ui] color = never paginate = never </code></pre>
<p>Add the following to your .hgrc:</p> <pre><code>[ui] color = never paginate = never </code></pre>
802
mercurial
<h1>Disable color and paging for mercurial</h1> <p>New versions of mercurial will apply colors to the output of most commands and will pipe commands with long output to a pager. How do I restore the old behavior to not color output and never use a pager?</p>
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,055
mercurial
# Disable color and paging for mercurial New versions of mercurial will apply colors to the output of most commands and will pipe commands with long output to a pager. How do I restore the old behavior to not color output and never use a pager?
Add the following to your .hgrc: ``` [ui] color = never paginate = never ```
4162384
Mercurial pre commit hook - stop commit based on file contents?
19
2010-11-12 07:12:17
<p>How can I setup a pre-commit hook , that will search for a string in the committed files and If found stop the commit ?</p>
11,994
357,314
2020-08-10 12:58:54
4,167,245
26
2010-11-12 17:13:58
8,992
2010-11-12 17:13:58
https://stackoverflow.com/q/4162384
https://stackoverflow.com/a/4167245
<p><a href="http://hgbook.red-bean.com/read/handling-repository-events-with-hooks.html" rel="noreferrer">Chapter 10</a> of <a href="http://hgbook.red-bean.com/" rel="noreferrer">the mercurial book</a> covers this exactly:</p> <pre><code>$ cat .hg/hgrc [hooks] pretxncommit.whitespace = hg export tip | (! egrep -q '^\+....
<p><a href="http://hgbook.red-bean.com/read/handling-repository-events-with-hooks.html" rel="noreferrer">Chapter 10</a> of <a href="http://hgbook.red-bean.com/" rel="noreferrer">the mercurial book</a> covers this exactly:</p> <pre><code>$ cat .hg/hgrc [hooks] pretxncommit.whitespace = hg export tip | (! egrep -q '^\+....
802, 61928
mercurial, mercurial-hook
<h1>Mercurial pre commit hook - stop commit based on file contents?</h1> <p>How can I setup a pre-commit hook , that will search for a string in the committed files and If found stop the commit ?</p>
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,056
mercurial
# Mercurial pre commit hook - stop commit based on file contents? How can I setup a pre-commit hook , that will search for a string in the committed files and If found stop the commit ?
[Chapter 10](http://hgbook.red-bean.com/read/handling-repository-events-with-hooks.html) of [the mercurial book](http://hgbook.red-bean.com/) covers this exactly: ``` $ cat .hg/hgrc [hooks] pretxncommit.whitespace = hg export tip | (! egrep -q '^\+.*[ \t]$') $ echo 'a ' > a $ hg commit -A -m 'test with trailing whites...
9500399
Why are Mercurial backouts in one branch affecting other branches?
15
2012-02-29 13:54:38
<p>This is a difficult situation to explain, so bear with me. I have a Mercurial repository with 2 main branches, <em>default</em> and <em>dev</em>.</p> <p>Work is usually done in a named branch off of <em>dev</em> (a feature branch). There may be many feature branches at any one time. Once work is completed in that b...
1,484
790,695
2018-02-22 10:36:00
9,500,764
26
2012-02-29 14:20:24
110,204
2018-02-22 10:36:00
https://stackoverflow.com/q/9500399
https://stackoverflow.com/a/9500764
<p>I believe the problem is that merges work differently than you think. You write</p> <blockquote> <p>Since the new release branch contains all of the feature branch changesets (nothing has been backed out), why does the default branch not receive all of these changesets too?</p> </blockquote> <p>When you merge tw...
<p>I believe the problem is that merges work differently than you think. You write</p> <blockquote> <p>Since the new release branch contains all of the feature branch changesets (nothing has been backed out), why does the default branch not receive all of these changesets too?</p> </blockquote> <p>When you merge tw...
456, 802, 1879, 3346, 77755
branch, dvcs, mercurial, three-way-merge, version-control
<h1>Why are Mercurial backouts in one branch affecting other branches?</h1> <p>This is a difficult situation to explain, so bear with me. I have a Mercurial repository with 2 main branches, <em>default</em> and <em>dev</em>.</p> <p>Work is usually done in a named branch off of <em>dev</em> (a feature branch). There ma...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,057
mercurial
# Why are Mercurial backouts in one branch affecting other branches? This is a difficult situation to explain, so bear with me. I have a Mercurial repository with 2 main branches, *default* and *dev*. Work is usually done in a named branch off of *dev* (a feature branch). There may be many feature branches at any one...
I believe the problem is that merges work differently than you think. You write > Since the new release branch contains all of the feature branch changesets (nothing has been backed out), why does the default branch not receive all of these changesets too? When you merge two branches, it's wrong to think of it as app...
56170882
Convert repository to older version (without sparse revlog)
13
2019-05-16 14:26:54
<p>Our team is using Mercurial for version control, with the central repository located on a shared network drive (i.e. we are not using a server). Our company restricts what we can install on our computers, and everyone had Hg version 4.6. One of the team members used admin rights he has to install the latest Tortoise...
8,897
674,976
2023-01-19 05:55:01
56,296,474
26
2019-05-24 16:34:02
10,263,953
2019-05-24 16:34:02
https://stackoverflow.com/q/56170882
https://stackoverflow.com/a/56296474
<p>With 4.9, <strong>new</strong> repositories will be created using <code>sparse-revlog</code> by default. However <strong>existing repositories are untouched</strong>. They stay in the same format they have been created with.</p> <h3>Avoiding the issue at repository creation</h3> <p>To prevent the users who upgrade...
<p>With 4.9, <strong>new</strong> repositories will be created using <code>sparse-revlog</code> by default. However <strong>existing repositories are untouched</strong>. They stay in the same format they have been created with.</p> <h3>Avoiding the issue at repository creation</h3> <p>To prevent the users who upgrade...
802, 8122
mercurial, tortoisehg
<h1>Convert repository to older version (without sparse revlog)</h1> <p>Our team is using Mercurial for version control, with the central repository located on a shared network drive (i.e. we are not using a server). Our company restricts what we can install on our computers, and everyone had Hg version 4.6. One of the...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,058
mercurial
# Convert repository to older version (without sparse revlog) Our team is using Mercurial for version control, with the central repository located on a shared network drive (i.e. we are not using a server). Our company restricts what we can install on our computers, and everyone had Hg version 4.6. One of the team mem...
With 4.9, **new** repositories will be created using `sparse-revlog` by default. However **existing repositories are untouched**. They stay in the same format they have been created with. ### Avoiding the issue at repository creation To prevent the users who upgraded to create `sparse-revlog` repositories he needs to...
5424377
Make another branch default?
31
2011-03-24 19:19:29
<p>I have a Mercurial repo at Bitbucket and on my local machine, both are mirrors, up to date. I created a feature branch, reflected in both repos. I did all my work in the feature branch.</p> <p>The feature branch is now complete and I want to now make it the default for the main repo and my local copy. I don't reall...
11,970
137,783
2016-11-12 02:51:02
5,424,410
25
2011-03-24 19:23:40
71,522
2013-02-25 16:45:09
https://stackoverflow.com/q/5424377
https://stackoverflow.com/a/5424410
<p>Just merge <code>feature-branch</code> into <code>default</code> then close <code>feature-branch</code>:</p> <pre><code>$ hg checkout default $ hg merge feature-branch $ hg commit $ hg checkout feature-branch $ hg commit --close-branch </code></pre> <p>There is no more clean and sensible way (that I'm aware of) to...
<p>Just merge <code>feature-branch</code> into <code>default</code> then close <code>feature-branch</code>:</p> <pre><code>$ hg checkout default $ hg merge feature-branch $ hg commit $ hg checkout feature-branch $ hg commit --close-branch </code></pre> <p>There is no more clean and sensible way (that I'm aware of) to...
802, 1879
branch, mercurial
<h1>Make another branch default?</h1> <p>I have a Mercurial repo at Bitbucket and on my local machine, both are mirrors, up to date. I created a feature branch, reflected in both repos. I did all my work in the feature branch.</p> <p>The feature branch is now complete and I want to now make it the default for the main...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,059
mercurial
# Make another branch default? I have a Mercurial repo at Bitbucket and on my local machine, both are mirrors, up to date. I created a feature branch, reflected in both repos. I did all my work in the feature branch. The feature branch is now complete and I want to now make it the default for the main repo and my loc...
Just merge `feature-branch` into `default` then close `feature-branch`: ``` $ hg checkout default $ hg merge feature-branch $ hg commit $ hg checkout feature-branch $ hg commit --close-branch ``` There is no more clean and sensible way (that I'm aware of) to “make `feature-branch` the default”. One thing that wouldn...
1995854
Version control best practices
27
2010-01-03 18:47:05
<p>I just made the move to version control the other day, and after a bad experience with Subversion, I switched to Mercurial, and so far am happy with it.</p> <p>Although I understand and appreciate the idea of version control, I don't really have any practical experience with it.</p> <p>Right now, I am using it for...
2,227
130,442
2010-01-05 08:01:56
1,995,965
25
2010-01-03 19:21:56
3,713
2010-01-05 08:01:56
https://stackoverflow.com/q/1995854
https://stackoverflow.com/a/1995965
<p>Most of the questions you're asking about depends mostly on who you are working with. If you're a lone developer it shouldn't matter a lot, since you can do whatever you'd like. But if you're in a team where you have to share your code then you should discuss with your team members what the <em>code of conduct</em> ...
<p>Most of the questions you're asking about depends mostly on who you are working with. If you're a lone developer it shouldn't matter a lot, since you can do whatever you'd like. But if you're in a team where you have to share your code then you should discuss with your team members what the <em>code of conduct</em> ...
456, 802
mercurial, version-control
<h1>Version control best practices</h1> <p>I just made the move to version control the other day, and after a bad experience with Subversion, I switched to Mercurial, and so far am happy with it.</p> <p>Although I understand and appreciate the idea of version control, I don't really have any practical experience with ...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,060
mercurial
# Version control best practices I just made the move to version control the other day, and after a bad experience with Subversion, I switched to Mercurial, and so far am happy with it. Although I understand and appreciate the idea of version control, I don't really have any practical experience with it. Right now, ...
Most of the questions you're asking about depends mostly on who you are working with. If you're a lone developer it shouldn't matter a lot, since you can do whatever you'd like. But if you're in a team where you have to share your code then you should discuss with your team members what the *code of conduct* should be ...
1961016
How to treat a symbolic link as a directory in Mercurial?
26
2009-12-25 11:27:15
<p>As of 0.9.4, when adding a symbolic link Mercurial keeps track of the link itself, and not the file or directories it points to. However, there are cases when it is desirable to keep track of the files pointed to by the symbolic link. </p> <p>How can I force Mercurial to treat the symbolic link to a directory as a ...
10,965
134,397
2018-03-05 12:01:17
3,011,985
25
2010-06-10 06:03:01
273,815
2012-11-09 19:09:39
https://stackoverflow.com/q/1961016
https://stackoverflow.com/a/3011985
<p>Under linux you can use </p> <pre><code>mount --bind sourcepath targetpath </code></pre> <p>instead of symbolic links and mercurial will treat target as usual directory (tested on openSUSE 11.2 with Mercurial 1.3.1, and on RHEL6).</p> <p>The alternative syntax, amenable for inclusion in <code>/etc/fstab</code>, i...
<p>Under linux you can use </p> <pre><code>mount --bind sourcepath targetpath </code></pre> <p>instead of symbolic links and mercurial will treat target as usual directory (tested on openSUSE 11.2 with Mercurial 1.3.1, and on RHEL6).</p> <p>The alternative syntax, amenable for inclusion in <code>/etc/fstab</code>, i...
802, 1122
mercurial, symlink
<h1>How to treat a symbolic link as a directory in Mercurial?</h1> <p>As of 0.9.4, when adding a symbolic link Mercurial keeps track of the link itself, and not the file or directories it points to. However, there are cases when it is desirable to keep track of the files pointed to by the symbolic link. </p> <p>How ca...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,061
mercurial
# How to treat a symbolic link as a directory in Mercurial? As of 0.9.4, when adding a symbolic link Mercurial keeps track of the link itself, and not the file or directories it points to. However, there are cases when it is desirable to keep track of the files pointed to by the symbolic link. How can I force Mercuri...
Under linux you can use ``` mount --bind sourcepath targetpath ``` instead of symbolic links and mercurial will treat target as usual directory (tested on openSUSE 11.2 with Mercurial 1.3.1, and on RHEL6). The alternative syntax, amenable for inclusion in `/etc/fstab`, is ``` mount -o bind sourcepath targetpath ```...
9618763
Finding first appearance of text in Mercurial repository
24
2012-03-08 13:59:17
<p>I have a Mercurial repository with ~800 changesets and I need to find the first changeset where the word <strong>Example</strong> appeared. The word appears inside a .php file and not on a commit comment etc.</p> <p>What is the quickest/easiest way to do that?</p>
7,087
588,879
2020-06-15 16:52:51
9,618,963
25
2012-03-08 14:13:30
25,782
2012-03-08 14:18:52
https://stackoverflow.com/q/9618763
https://stackoverflow.com/a/9618963
<p>try <code>hg grep Example *.php</code></p> <pre><code>hg grep [OPTION]... PATTERN [FILE]... search for a pattern in specified files and revisions Search revisions of files for a regular expression. This command behaves differently than Unix grep. It only accepts Python/Perl regexps. It searches repos...
<p>try <code>hg grep Example *.php</code></p> <pre><code>hg grep [OPTION]... PATTERN [FILE]... search for a pattern in specified files and revisions Search revisions of files for a regular expression. This command behaves differently than Unix grep. It only accepts Python/Perl regexps. It searches repos...
802, 1271, 57869
bisect, grep, mercurial
<h1>Finding first appearance of text in Mercurial repository</h1> <p>I have a Mercurial repository with ~800 changesets and I need to find the first changeset where the word <strong>Example</strong> appeared. The word appears inside a .php file and not on a commit comment etc.</p> <p>What is the quickest/easiest way t...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,062
mercurial
# Finding first appearance of text in Mercurial repository I have a Mercurial repository with ~800 changesets and I need to find the first changeset where the word **Example** appeared. The word appears inside a .php file and not on a commit comment etc. What is the quickest/easiest way to do that?
try `hg grep Example *.php` ``` hg grep [OPTION]... PATTERN [FILE]... search for a pattern in specified files and revisions Search revisions of files for a regular expression. This command behaves differently than Unix grep. It only accepts Python/Perl regexps. It searches repository history, not th...
5066662
How to checkout a file from one branch to another in Mercurial?
22
2011-02-21 13:40:53
<p>How to checkout a single file from one branch to another in Mercurial? </p> <p>Basically I want to copy a single file from a branch <code>experimental</code> to another branch <code>production</code>.</p>
10,387
177,526
2018-10-06 10:51:13
5,066,795
25
2011-02-21 13:53:49
515,179
2011-02-21 14:06:14
https://stackoverflow.com/q/5066662
https://stackoverflow.com/a/5066795
<p>You can show any file at any revision with <code>hg cat -r experimental filename</code>. But this kind of behavior looks like a debugging patch, in which case I would consider <code>transplant</code>ing (cherry-picking in other DVCS).</p> <p><code>hg revert -r experimental filename</code> could do it, not tested.</...
<p>You can show any file at any revision with <code>hg cat -r experimental filename</code>. But this kind of behavior looks like a debugging patch, in which case I would consider <code>transplant</code>ing (cherry-picking in other DVCS).</p> <p><code>hg revert -r experimental filename</code> could do it, not tested.</...
802
mercurial
<h1>How to checkout a file from one branch to another in Mercurial?</h1> <p>How to checkout a single file from one branch to another in Mercurial? </p> <p>Basically I want to copy a single file from a branch <code>experimental</code> to another branch <code>production</code>.</p>
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,063
mercurial
# How to checkout a file from one branch to another in Mercurial? How to checkout a single file from one branch to another in Mercurial? Basically I want to copy a single file from a branch `experimental` to another branch `production`.
You can show any file at any revision with `hg cat -r experimental filename`. But this kind of behavior looks like a debugging patch, in which case I would consider `transplant`ing (cherry-picking in other DVCS). `hg revert -r experimental filename` could do it, not tested.
11084802
Remove experimental branch
19
2012-06-18 14:18:54
<p>How do I remove a feature branch in mercurial if I want to remove it completely? It should be stripped from the history and I don't want to merge the changes in another branch (just throw the code away).</p> <p>I know that I can clone my other branches to a new repository like described <a href="https://stackoverfl...
22,928
851,737
2018-02-22 10:36:41
11,084,948
25
2012-06-18 14:26:33
851,737
2018-02-22 10:36:41
https://stackoverflow.com/q/11084802
https://stackoverflow.com/a/11084948
<p>I found a working solution <a href="https://www.mercurial-scm.org/wiki/PruningDeadBranches#Using_strip" rel="nofollow noreferrer">here</a>.</p> <p>It works by using <code>hg strip</code> from the <code>mq</code> extension:</p> <pre><code>$ hg strip my_pruned_branch </code></pre> <p>As mentioned in the comments, t...
<p>I found a working solution <a href="https://www.mercurial-scm.org/wiki/PruningDeadBranches#Using_strip" rel="nofollow noreferrer">here</a>.</p> <p>It works by using <code>hg strip</code> from the <code>mq</code> extension:</p> <pre><code>$ hg strip my_pruned_branch </code></pre> <p>As mentioned in the comments, t...
802, 1879
branch, mercurial
<h1>Remove experimental branch</h1> <p>How do I remove a feature branch in mercurial if I want to remove it completely? It should be stripped from the history and I don't want to merge the changes in another branch (just throw the code away).</p> <p>I know that I can clone my other branches to a new repository like de...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,064
mercurial
# Remove experimental branch How do I remove a feature branch in mercurial if I want to remove it completely? It should be stripped from the history and I don't want to merge the changes in another branch (just throw the code away). I know that I can clone my other branches to a new repository like described [here](h...
I found a working solution [here](https://www.mercurial-scm.org/wiki/PruningDeadBranches#Using_strip). It works by using `hg strip` from the `mq` extension: ``` $ hg strip my_pruned_branch ``` As mentioned in the comments, this should only be used for unpublished changesets.
13475073
How do I convert a Mercurial queues patch to local changes only?
18
2012-11-20 14:13:14
<p><a href="https://stackoverflow.com/questions/7297889/how-to-convert-n-local-topmost-commits-to-an-mq-patch">This answer</a> shows how you can demote a commit to a patch, but how can I convert an mq patch to local changes only?</p>
2,253
667,821
2015-07-21 05:44:35
13,475,075
25
2012-11-20 14:13:14
667,821
2015-07-21 05:44:35
https://stackoverflow.com/q/13475073
https://stackoverflow.com/a/13475075
<p><strong>Short answer</strong></p> <p>Make sure the patch is applied, then:</p> <pre><code>hg qrefresh nothing hg qpop --keep-changes hg qdelete "Name of patch" </code></pre> <p><strong>Long answer</strong></p> <p>First, you need to make sure no changes are tracked by the patch. To do that, use</p> <pre><code>hg...
<p><strong>Short answer</strong></p> <p>Make sure the patch is applied, then:</p> <pre><code>hg qrefresh nothing hg qpop --keep-changes hg qdelete "Name of patch" </code></pre> <p><strong>Long answer</strong></p> <p>First, you need to make sure no changes are tracked by the patch. To do that, use</p> <pre><code>hg...
802, 32068
mercurial, mercurial-queue
<h1>How do I convert a Mercurial queues patch to local changes only?</h1> <p><a href="https://stackoverflow.com/questions/7297889/how-to-convert-n-local-topmost-commits-to-an-mq-patch">This answer</a> shows how you can demote a commit to a patch, but how can I convert an mq patch to local changes only?</p>
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,065
mercurial
# How do I convert a Mercurial queues patch to local changes only? [This answer](https://stackoverflow.com/questions/7297889/how-to-convert-n-local-topmost-commits-to-an-mq-patch) shows how you can demote a commit to a patch, but how can I convert an mq patch to local changes only?
**Short answer** Make sure the patch is applied, then: ``` hg qrefresh nothing hg qpop --keep-changes hg qdelete "Name of patch" ``` **Long answer** First, you need to make sure no changes are tracked by the patch. To do that, use ``` hg qrefresh nothing ``` `nothing` is just a random file name that is *not* in t...
6549575
Cloning a Mercurial repository without .hg
18
2011-07-01 14:52:22
<p>How can I clone a Mercurial repository without the <code>.hg</code> folder to save time (the project is big)? I only need the tip files.</p>
6,026
816,137
2011-12-27 12:40:57
6,549,718
25
2011-07-01 15:05:02
125,407
2011-07-01 15:05:02
https://stackoverflow.com/q/6549575
https://stackoverflow.com/a/6549718
<p>The <code>.hg</code> directory is what stores your complete repository information. That is, information about all your files and their revisions tracked by the repository. As for storage, it usually is pretty efficient since it is compressed using binary differerencing.</p> <p>When you clone a repository, the only...
<p>The <code>.hg</code> directory is what stores your complete repository information. That is, information about all your files and their revisions tracked by the repository. As for storage, it usually is pretty efficient since it is compressed using binary differerencing.</p> <p>When you clone a repository, the only...
456, 802
mercurial, version-control
<h1>Cloning a Mercurial repository without .hg</h1> <p>How can I clone a Mercurial repository without the <code>.hg</code> folder to save time (the project is big)? I only need the tip files.</p>
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,066
mercurial
# Cloning a Mercurial repository without .hg How can I clone a Mercurial repository without the `.hg` folder to save time (the project is big)? I only need the tip files.
The `.hg` directory is what stores your complete repository information. That is, information about all your files and their revisions tracked by the repository. As for storage, it usually is pretty efficient since it is compressed using binary differerencing. When you clone a repository, the only thing that is cloned...
4229920
In Mercurial, How to check the revision log of a specific folder?
18
2010-11-19 22:23:56
<p>So here is an example folder hierarchy:</p> <pre><code>c:\MyProject c:\MyProject\Folder1 c:\Myproject\Folder2 </code></pre> <p>In SVN, If I am only interested in looking at the history of changes in <code>c:\MyProject\Folder1</code> I could just navigate to that folder, right click and view log.</p> <p>With Mercu...
7,098
66,803
2022-02-01 08:19:33
4,230,440
25
2010-11-19 23:57:34
52,626
2010-11-19 23:57:34
https://stackoverflow.com/q/4229920
https://stackoverflow.com/a/4230440
<p>It pretty much works as you would expect, same as for <code>svn log</code>:</p> <pre><code>hg log c:\MyProject\Folder1 </code></pre>
<p>It pretty much works as you would expect, same as for <code>svn log</code>:</p> <pre><code>hg log c:\MyProject\Folder1 </code></pre>
656, 802, 8122
mercurial, tortoisehg, tortoisesvn
<h1>In Mercurial, How to check the revision log of a specific folder?</h1> <p>So here is an example folder hierarchy:</p> <pre><code>c:\MyProject c:\MyProject\Folder1 c:\Myproject\Folder2 </code></pre> <p>In SVN, If I am only interested in looking at the history of changes in <code>c:\MyProject\Folder1</code> I could...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,067
mercurial
# In Mercurial, How to check the revision log of a specific folder? So here is an example folder hierarchy: ``` c:\MyProject c:\MyProject\Folder1 c:\Myproject\Folder2 ``` In SVN, If I am only interested in looking at the history of changes in `c:\MyProject\Folder1` I could just navigate to that folder, right click a...
It pretty much works as you would expect, same as for `svn log`: ``` hg log c:\MyProject\Folder1 ```
9725856
In mercurial how can I find changesets that contain a string?
17
2012-03-15 18:26:54
<p>Let's say I have the following revisions:</p> <pre><code>rev 1: + Dim Foo as integer rev 2: + I like big butts, I cannot lie rev 3 - Dim Foo as integer </code></pre> <p><strong>Foo</strong> is in rev 1 &amp; 2, and removed from three. What command can I issue that will return all changesets that <strong>Foo</st...
6,278
782,880
2022-09-06 14:18:13
9,726,648
25
2012-03-15 19:19:25
633,281
2012-03-15 19:45:01
https://stackoverflow.com/q/9725856
https://stackoverflow.com/a/9726648
<p>You can use the <a href="http://www.selenic.com/mercurial/hg.1.html#grep" rel="noreferrer"><code>grep</code></a> command :</p> <pre><code>hg grep --all Foo </code></pre> <p>To address Lazy Badger concerns in comments.</p> <pre><code>$ hg init $ echo "Dim Foo as integer" &gt; test $ hg commit -m "1" $ echo "I lik...
<p>You can use the <a href="http://www.selenic.com/mercurial/hg.1.html#grep" rel="noreferrer"><code>grep</code></a> command :</p> <pre><code>hg grep --all Foo </code></pre> <p>To address Lazy Badger concerns in comments.</p> <pre><code>$ hg init $ echo "Dim Foo as integer" &gt; test $ hg commit -m "1" $ echo "I lik...
802, 8122
mercurial, tortoisehg
<h1>In mercurial how can I find changesets that contain a string?</h1> <p>Let's say I have the following revisions:</p> <pre><code>rev 1: + Dim Foo as integer rev 2: + I like big butts, I cannot lie rev 3 - Dim Foo as integer </code></pre> <p><strong>Foo</strong> is in rev 1 &amp; 2, and removed from three. What c...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,068
mercurial
# In mercurial how can I find changesets that contain a string? Let's say I have the following revisions: ``` rev 1: + Dim Foo as integer rev 2: + I like big butts, I cannot lie rev 3 - Dim Foo as integer ``` **Foo** is in rev 1 & 2, and removed from three. What command can I issue that will return all changesets ...
You can use the [`grep`](http://www.selenic.com/mercurial/hg.1.html#grep) command : ``` hg grep --all Foo ``` To address Lazy Badger concerns in comments. ``` $ hg init $ echo "Dim Foo as integer" > test $ hg commit -m "1" $ echo "I like big butts, I cannot lie" > test $ hg commit -m "2" $ echo "Dim Foo as integer...
7906379
vimrc import file
17
2011-10-26 17:19:51
<p>I have a repository of my home config files - <a href="http://hg.jackleo.info/home-configs" rel="noreferrer">http://hg.jackleo.info/home-configs</a></p> <p>I noticed that my vim configuration is getting bigger and bigger (90% of commits is only related to vim) so I want to trow it to separate repository.</p> <p>Th...
11,608
558,194
2016-02-15 08:15:17
7,906,568
25
2011-10-26 17:35:49
1,015,110
2011-10-26 17:35:49
https://stackoverflow.com/q/7906379
https://stackoverflow.com/a/7906568
<p>You could use the source command in your vimrc:</p> <pre><code>source file_path_to_other_config </code></pre> <p>Here is the vim help page on source: <a href="http://vimdoc.sourceforge.net/htmldoc/repeat.html#:source" rel="noreferrer">http://vimdoc.sourceforge.net/htmldoc/repeat.html#:source</a></p>
<p>You could use the source command in your vimrc:</p> <pre><code>source file_path_to_other_config </code></pre> <p>Here is the vim help page on source: <a href="http://vimdoc.sourceforge.net/htmldoc/repeat.html#:source" rel="noreferrer">http://vimdoc.sourceforge.net/htmldoc/repeat.html#:source</a></p>
58, 370, 802
linux, mercurial, vim
<h1>vimrc import file</h1> <p>I have a repository of my home config files - <a href="http://hg.jackleo.info/home-configs" rel="noreferrer">http://hg.jackleo.info/home-configs</a></p> <p>I noticed that my vim configuration is getting bigger and bigger (90% of commits is only related to vim) so I want to trow it to sepa...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,069
mercurial
# vimrc import file I have a repository of my home config files - <http://hg.jackleo.info/home-configs> I noticed that my vim configuration is getting bigger and bigger (90% of commits is only related to vim) so I want to trow it to separate repository. The problem is that since i'm using home-config repository at m...
You could use the source command in your vimrc: ``` source file_path_to_other_config ``` Here is the vim help page on source: <http://vimdoc.sourceforge.net/htmldoc/repeat.html#:source>
1678091
.hgignore whole directory tree excepting one specific file
17
2009-11-05 03:09:41
<p>Can anyone tell me the .hgignore pattern to track one specific file in a directory and to ignore everything else?</p> <p>I have a "media" directory which contains a "default.png", for obvious purposes, and the rest of the directory will hold user media. We want hg to ignore everything in the media directory except...
8,251
75,033
2012-06-03 20:06:42
1,678,245
25
2009-11-05 03:55:14
8,992
2009-11-06 20:05:39
https://stackoverflow.com/q/1678091
https://stackoverflow.com/a/1678245
<p>Try:</p> <pre><code>syntax: regex ^media/.* </code></pre> <p>or (leave it in the default glob and do)</p> <pre><code>media/** </code></pre> <p>and then manually <code>hg add media/default.png</code>.</p> <p>In mercurial (unlike in CVS) you can add files that match your ignore patterns and they work fine. So ig...
<p>Try:</p> <pre><code>syntax: regex ^media/.* </code></pre> <p>or (leave it in the default glob and do)</p> <pre><code>media/** </code></pre> <p>and then manually <code>hg add media/default.png</code>.</p> <p>In mercurial (unlike in CVS) you can add files that match your ignore patterns and they work fine. So ig...
802, 31419
hgignore, mercurial
<h1>.hgignore whole directory tree excepting one specific file</h1> <p>Can anyone tell me the .hgignore pattern to track one specific file in a directory and to ignore everything else?</p> <p>I have a "media" directory which contains a "default.png", for obvious purposes, and the rest of the directory will hold user m...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,070
mercurial
# .hgignore whole directory tree excepting one specific file Can anyone tell me the .hgignore pattern to track one specific file in a directory and to ignore everything else? I have a "media" directory which contains a "default.png", for obvious purposes, and the rest of the directory will hold user media. We want hg...
Try: ``` syntax: regex ^media/.* ``` or (leave it in the default glob and do) ``` media/** ``` and then manually `hg add media/default.png`. In mercurial (unlike in CVS) you can add files that match your ignore patterns and they work fine. So ignore broadly and `hg add` what you want tracked.
10914688
Using other editor with TortoiseHg
16
2012-06-06 12:58:25
<p>I'm trying to use other editor with TortoiseHG, instead of (Windows) Notepad.</p> <p>I have tried the solutions mentioned here:</p> <p><a href="https://stackoverflow.com/questions/9207880/mercurial-and-notepad-integaration">Mercurial and Notepad++ Integration</a></p> <p>and here:</p> <p><a href="https://bitbucke...
6,162
279,712
2013-08-29 16:33:31
10,930,027
25
2012-06-07 10:29:48
1,423,890
2012-06-15 20:48:52
https://stackoverflow.com/q/10914688
https://stackoverflow.com/a/10930027
<p>You'll kick yourself...</p> <p>Change:</p> <pre><code>[tortoisehg] editor = C:\Program Files (x86)\Notepad++\Notepad++.exe ["$FILE" -n$LINENUM] -multiInst -nosession </code></pre> <p>To:</p> <pre><code>[tortoisehg] editor = "C:\Program Files (x86)\Notepad++\Notepad++.exe" ["$FILE" -n$LINENUM] -multiInst -nosess...
<p>You'll kick yourself...</p> <p>Change:</p> <pre><code>[tortoisehg] editor = C:\Program Files (x86)\Notepad++\Notepad++.exe ["$FILE" -n$LINENUM] -multiInst -nosession </code></pre> <p>To:</p> <pre><code>[tortoisehg] editor = "C:\Program Files (x86)\Notepad++\Notepad++.exe" ["$FILE" -n$LINENUM] -multiInst -nosess...
5025, 8122, 8193, 78970
editor, notepad++, sublimetext2, tortoisehg
<h1>Using other editor with TortoiseHg</h1> <p>I'm trying to use other editor with TortoiseHG, instead of (Windows) Notepad.</p> <p>I have tried the solutions mentioned here:</p> <p><a href="https://stackoverflow.com/questions/9207880/mercurial-and-notepad-integaration">Mercurial and Notepad++ Integration</a></p> <p...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,071
mercurial
# Using other editor with TortoiseHg I'm trying to use other editor with TortoiseHG, instead of (Windows) Notepad. I have tried the solutions mentioned here: [Mercurial and Notepad++ Integration](https://stackoverflow.com/questions/9207880/mercurial-and-notepad-integaration) and here: <https://bitbucket.org/tortoi...
You'll kick yourself... Change: ``` [tortoisehg] editor = C:\Program Files (x86)\Notepad++\Notepad++.exe ["$FILE" -n$LINENUM] -multiInst -nosession ``` To: ``` [tortoisehg] editor = "C:\Program Files (x86)\Notepad++\Notepad++.exe" ["$FILE" -n$LINENUM] -multiInst -nosession ``` Note the additional quotes around th...
56572665
OpenCV4 error: ‘CV_CAP_PROP_FRAME_WIDTH’ was not declared in this scope
15
2019-06-13 02:39:42
<p>I recently migrated from OpenCV3.3 to the latest version OpenCV4 on my Ubuntu 18.04 LTS. I have some persistent issues with the installation. My installation did not give any errors when I followed <a href="https://www.learnopencv.com/install-opencv-4-on-ubuntu-18-04/" rel="noreferrer">this</a> installation tutorial...
20,124
10,019,073
2022-09-02 18:57:42
56,572,756
25
2019-06-13 02:53:12
5,087,436
2019-06-13 02:53:12
https://stackoverflow.com/q/56572665
https://stackoverflow.com/a/56572756
<p>Those constants have been changed in name and location in OpenCV for some time now.</p> <p>For the capture properties, they no longer begin with <code>CV_</code>, so remove that prefix from all of them. You can find a list of all available capture properties <a href="https://docs.opencv.org/master/d4/d15/group__vid...
<p>Those constants have been changed in name and location in OpenCV for some time now.</p> <p>For the capture properties, they no longer begin with <code>CV_</code>, so remove that prefix from all of them. You can find a list of all available capture properties <a href="https://docs.opencv.org/master/d4/d15/group__vid...
1720, 95507
highgui, opencv
<h1>OpenCV4 error: ‘CV_CAP_PROP_FRAME_WIDTH’ was not declared in this scope</h1> <p>I recently migrated from OpenCV3.3 to the latest version OpenCV4 on my Ubuntu 18.04 LTS. I have some persistent issues with the installation. My installation did not give any errors when I followed <a href="https://www.learnopencv.com/i...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,072
mercurial
# OpenCV4 error: ‘CV_CAP_PROP_FRAME_WIDTH’ was not declared in this scope I recently migrated from OpenCV3.3 to the latest version OpenCV4 on my Ubuntu 18.04 LTS. I have some persistent issues with the installation. My installation did not give any errors when I followed [this](https://www.learnopencv.com/install-open...
Those constants have been changed in name and location in OpenCV for some time now. For the capture properties, they no longer begin with `CV_`, so remove that prefix from all of them. You can find a list of all available capture properties [here](https://docs.opencv.org/master/d4/d15/group__videoio__flags__base.html#...
16783226
Diff a single file between branches in mercurial
14
2013-05-28 03:00:35
<p>I'm working on a website using two branches: develop (for actively working on code) and default (where I merge features when they're ready to go live). I've just merged changes and I'm getting this message when switching between the two branches:</p> <pre><code>1 files updated, 0 files merged, 0 files removed, 0 fi...
10,647
205,481
2019-10-16 16:12:51
24,950,839
25
2014-07-25 08:02:20
1,448,139
2019-10-16 16:12:51
https://stackoverflow.com/q/16783226
https://stackoverflow.com/a/24950839
<ol> <li><p>Diff between two branches:</p> <p><code>hg diff -r BRANCH1:BRANCH2</code></p></li> <li><p>Diff a single file between two branches:</p> <p><code>hg diff -r BRANCH1:BRANCH2 the_sinlge_file_to_diff</code></p></li> </ol> <p>Reference</p> <ul> <li><a href="https://stackoverflow.com/questions/10299988/how-do-...
<ol> <li><p>Diff between two branches:</p> <p><code>hg diff -r BRANCH1:BRANCH2</code></p></li> <li><p>Diff a single file between two branches:</p> <p><code>hg diff -r BRANCH1:BRANCH2 the_sinlge_file_to_diff</code></p></li> </ol> <p>Reference</p> <ul> <li><a href="https://stackoverflow.com/questions/10299988/how-do-...
802
mercurial
<h1>Diff a single file between branches in mercurial</h1> <p>I'm working on a website using two branches: develop (for actively working on code) and default (where I merge features when they're ready to go live). I've just merged changes and I'm getting this message when switching between the two branches:</p> <pre><c...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,073
mercurial
# Diff a single file between branches in mercurial I'm working on a website using two branches: develop (for actively working on code) and default (where I merge features when they're ready to go live). I've just merged changes and I'm getting this message when switching between the two branches: ``` 1 files updated,...
1. Diff between two branches: `hg diff -r BRANCH1:BRANCH2` 2. Diff a single file between two branches: `hg diff -r BRANCH1:BRANCH2 the_sinlge_file_to_diff` Reference - [How do I diff one branch with my default branch](https://stackoverflow.com/questions/10299988/how-do-i-diff-one-branch-with-my-default-branch...
9003588
How resolve this Mercurial conflict?
12
2012-01-25 13:35:13
<p>I'm frustrated with Mercurial and Python since it makes easy things difficult. I have a trivial conflict and since Mercurial does not give any suggestion what to do I don't know even how to resolve this trivial file conflict:</p> <p><img src="https://i.sstatic.net/wQY9j.png" alt="KDiff3"></p> <p>The conflict is tr...
14,581
108,207
2018-02-22 10:34:07
9,003,821
25
2012-01-25 13:53:37
110,204
2018-02-22 10:34:07
https://stackoverflow.com/q/9003588
https://stackoverflow.com/a/9003821
<p>You need to look at the <a href="http://kdiff3.sourceforge.net/doc/index.html" rel="nofollow noreferrer">KDiff3 documentation</a>, in particular the section on <a href="http://kdiff3.sourceforge.net/doc/merging.html" rel="nofollow noreferrer">merging and the output window</a>. To resolve the conflict, you need to de...
<p>You need to look at the <a href="http://kdiff3.sourceforge.net/doc/index.html" rel="nofollow noreferrer">KDiff3 documentation</a>, in particular the section on <a href="http://kdiff3.sourceforge.net/doc/merging.html" rel="nofollow noreferrer">merging and the output window</a>. To resolve the conflict, you need to de...
717, 802, 39542, 62599
kdiff3, mercurial, merge, merge-conflict-resolution
<h1>How resolve this Mercurial conflict?</h1> <p>I'm frustrated with Mercurial and Python since it makes easy things difficult. I have a trivial conflict and since Mercurial does not give any suggestion what to do I don't know even how to resolve this trivial file conflict:</p> <p><img src="https://i.sstatic.net/wQY9j...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,074
mercurial
# How resolve this Mercurial conflict? I'm frustrated with Mercurial and Python since it makes easy things difficult. I have a trivial conflict and since Mercurial does not give any suggestion what to do I don't know even how to resolve this trivial file conflict: ![KDiff3](https://i.sstatic.net/wQY9j.png) The confl...
You need to look at the [KDiff3 documentation](http://kdiff3.sourceforge.net/doc/index.html), in particular the section on [merging and the output window](http://kdiff3.sourceforge.net/doc/merging.html). To resolve the conflict, you need to decide if `live` or `january` is the right choice for the line. That decision i...
8170360
Installing Mercurial on Debian Squeeze: hg gives an "couldn't find mercurial libraries" error
12
2011-11-17 16:06:48
<p>After seemingly-successful installation on Debian Squeeze(via <code>apt-get install mercurial</code>), hg refuses to start, giving this error:</p> <pre><code>root@pe-test:/tmp/example.com# hg abort: couldn't find mercurial libraries in [/usr/bin /usr/lib/python2.6 /usr/lib/python2.6/plat-linux2 /usr/lib/python2.6/l...
14,867
867,122
2017-08-07 09:24:50
8,174,307
25
2011-11-17 21:06:27
633,281
2014-03-12 03:06:57
https://stackoverflow.com/q/8170360
https://stackoverflow.com/a/8174307
<p>I found <a href="http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=646546" rel="nofollow noreferrer">this bug</a> in the Debian bug tracker: which describes exactly the same issue. The following steps resolved the problem :</p> <blockquote> <p>debsums -c python-support showed no differences, <strong>but reinstall...
<p>I found <a href="http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=646546" rel="nofollow noreferrer">this bug</a> in the Debian bug tracker: which describes exactly the same issue. The following steps resolved the problem :</p> <blockquote> <p>debsums -c python-support showed no differences, <strong>but reinstall...
802, 1012
debian, mercurial
<h1>Installing Mercurial on Debian Squeeze: hg gives an "couldn't find mercurial libraries" error</h1> <p>After seemingly-successful installation on Debian Squeeze(via <code>apt-get install mercurial</code>), hg refuses to start, giving this error:</p> <pre><code>root@pe-test:/tmp/example.com# hg abort: couldn't find ...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,075
mercurial
# Installing Mercurial on Debian Squeeze: hg gives an "couldn't find mercurial libraries" error After seemingly-successful installation on Debian Squeeze(via `apt-get install mercurial`), hg refuses to start, giving this error: ``` root@pe-test:/tmp/example.com# hg abort: couldn't find mercurial libraries in [/usr/bi...
I found [this bug](http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=646546) in the Debian bug tracker: which describes exactly the same issue. The following steps resolved the problem : > debsums -c python-support showed no differences, **but reinstalling > python-support before reinstalling mercurial and mercurial-co...
5501804
Easiest way to split a change set in mercurial
35
2011-03-31 14:53:20
<p>I'm comfortable using git, but have been exploring Mercurial lately out of curiosity based on a friends opinion that it is better in some ways.</p> <p>One of the first things I noticed however is that Mercurial does not appear to have an index as git does. I tend to make more changes then I should sometimes and af...
25,917
226,020
2018-02-22 12:08:34
5,501,837
24
2011-03-31 14:55:15
47,773
2018-02-22 12:08:34
https://stackoverflow.com/q/5501804
https://stackoverflow.com/a/5501837
<p>You're correct that there's no git-style index. You can use <a href="https://www.mercurial-scm.org/wiki/RecordExtension" rel="noreferrer"><code>hg record</code></a> (distributed with Mercurial) or <a href="https://www.mercurial-scm.org/wiki/CrecordExtension" rel="noreferrer"><code>hg crecord</code></a>. Both let y...
<p>You're correct that there's no git-style index. You can use <a href="https://www.mercurial-scm.org/wiki/RecordExtension" rel="noreferrer"><code>hg record</code></a> (distributed with Mercurial) or <a href="https://www.mercurial-scm.org/wiki/CrecordExtension" rel="noreferrer"><code>hg crecord</code></a>. Both let y...
802
mercurial
<h1>Easiest way to split a change set in mercurial</h1> <p>I'm comfortable using git, but have been exploring Mercurial lately out of curiosity based on a friends opinion that it is better in some ways.</p> <p>One of the first things I noticed however is that Mercurial does not appear to have an index as git does. I ...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,076
mercurial
# Easiest way to split a change set in mercurial I'm comfortable using git, but have been exploring Mercurial lately out of curiosity based on a friends opinion that it is better in some ways. One of the first things I noticed however is that Mercurial does not appear to have an index as git does. I tend to make more...
You're correct that there's no git-style index. You can use [`hg record`](https://www.mercurial-scm.org/wiki/RecordExtension) (distributed with Mercurial) or [`hg crecord`](https://www.mercurial-scm.org/wiki/CrecordExtension). Both let you choose on a per-file or per-hunk basis when committing. `crecord` is a more soph...
2992063
Undoing branch creation in Mercurial
34
2010-06-07 18:23:29
<p>How can I undo the creation of a branch in Mercurial? For example, if I issue the command</p> <pre><code>hg branch newbranch </code></pre> <p>How can I delete this branch if I decide I entered the wrong name? I'm guessing this must be pretty simple to do, but I have yet to figure it out. Thanks!</p>
8,964
123,695
2014-05-19 20:47:37
2,992,115
24
2010-06-07 18:33:12
75,761
2010-06-07 18:33:12
https://stackoverflow.com/q/2992063
https://stackoverflow.com/a/2992115
<p>if you haven't committed anything to it, it wasn't really created. so just issue another <code>hg branch newname</code>.</p>
<p>if you haven't committed anything to it, it wasn't really created. so just issue another <code>hg branch newname</code>.</p>
802, 1879
branch, mercurial
<h1>Undoing branch creation in Mercurial</h1> <p>How can I undo the creation of a branch in Mercurial? For example, if I issue the command</p> <pre><code>hg branch newbranch </code></pre> <p>How can I delete this branch if I decide I entered the wrong name? I'm guessing this must be pretty simple to do, but I have ye...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,077
mercurial
# Undoing branch creation in Mercurial How can I undo the creation of a branch in Mercurial? For example, if I issue the command ``` hg branch newbranch ``` How can I delete this branch if I decide I entered the wrong name? I'm guessing this must be pretty simple to do, but I have yet to figure it out. Thanks!
if you haven't committed anything to it, it wasn't really created. so just issue another `hg branch newname`.
4857591
Mercurial via TortoiseHg - Merge a named branch then close it
32
2011-02-01 00:05:09
<p>I have a named branch, NewFeature, that I made off of the default branch. I've made a couple commits to that branch, and now I'd like to merge it to rejoin the default branch.</p> <p>Now (each letter is a commit):</p> <pre><code> default: A---B NewFeature: \--C---D </code></pre> <p>What I'd like:</p> <pre...
30,878
529,799
2018-04-18 07:07:54
4,857,766
24
2011-02-01 00:41:02
11,296
2013-06-20 17:07:56
https://stackoverflow.com/q/4857591
https://stackoverflow.com/a/4857766
<p>To merge, you need a clean working copy - no uncommitted changes. The merge will be placed in the working copy for review and then you commit the working copy to "complete" the merge.</p> <p>If you have uncommitted changes you are not prepared to commit, you can see about shelving those changes temporarily (if you ...
<p>To merge, you need a clean working copy - no uncommitted changes. The merge will be placed in the working copy for review and then you commit the working copy to "complete" the merge.</p> <p>If you have uncommitted changes you are not prepared to commit, you can see about shelving those changes temporarily (if you ...
802, 8122
mercurial, tortoisehg
<h1>Mercurial via TortoiseHg - Merge a named branch then close it</h1> <p>I have a named branch, NewFeature, that I made off of the default branch. I've made a couple commits to that branch, and now I'd like to merge it to rejoin the default branch.</p> <p>Now (each letter is a commit):</p> <pre><code> default: A--...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,078
mercurial
# Mercurial via TortoiseHg - Merge a named branch then close it I have a named branch, NewFeature, that I made off of the default branch. I've made a couple commits to that branch, and now I'd like to merge it to rejoin the default branch. Now (each letter is a commit): ``` default: A---B NewFeature: \--C---...
To merge, you need a clean working copy - no uncommitted changes. The merge will be placed in the working copy for review and then you commit the working copy to "complete" the merge. If you have uncommitted changes you are not prepared to commit, you can see about shelving those changes temporarily (if you have that ...
16399307
TortoiseHg: ‘hg’ is not recognized as an internal or external command, operable program or batch file
17
2013-05-06 12:59:17
<p>I'm unable to find the command line tools in Mercurial-TortoiseHg version 2.7.2. I checked for hg.exe file and it is present at <strong>C:\Program Files\TortoiseHg</strong> path but whenever I try running the command it fails and throws the error : </p> <p>‘hg’ is not recognized as an internal or external command, ...
18,478
1,596,103
2018-02-27 14:37:44
16,399,548
24
2013-05-06 13:12:37
6,309
2018-02-27 14:37:29
https://stackoverflow.com/q/16399307
https://stackoverflow.com/a/16399548
<p>Notes:</p> <ul> <li>As mentioned in "<a href="https://stackoverflow.com/a/5687685/6309">Mercurial not working after TortoiseHg update</a>", TortoiseHg v2.X.X no longer uses the <code>hg</code> command, <a href="http://tortoisehg.bitbucket.io/manual/2.8/intro.html?highlight=thg" rel="noreferrer">but rather <code>thg...
<p>Notes:</p> <ul> <li>As mentioned in "<a href="https://stackoverflow.com/a/5687685/6309">Mercurial not working after TortoiseHg update</a>", TortoiseHg v2.X.X no longer uses the <code>hg</code> command, <a href="http://tortoisehg.bitbucket.io/manual/2.8/intro.html?highlight=thg" rel="noreferrer">but rather <code>thg...
802, 8122
mercurial, tortoisehg
<h1>TortoiseHg: ‘hg’ is not recognized as an internal or external command, operable program or batch file</h1> <p>I'm unable to find the command line tools in Mercurial-TortoiseHg version 2.7.2. I checked for hg.exe file and it is present at <strong>C:\Program Files\TortoiseHg</strong> path but whenever I try running t...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,080
mercurial
# TortoiseHg: ‘hg’ is not recognized as an internal or external command, operable program or batch file I'm unable to find the command line tools in Mercurial-TortoiseHg version 2.7.2. I checked for hg.exe file and it is present at **C:\Program Files\TortoiseHg** path but whenever I try running the command it fails an...
Notes: - As mentioned in "[Mercurial not working after TortoiseHg update](https://stackoverflow.com/a/5687685/6309)", TortoiseHg v2.X.X no longer uses the `hg` command, [but rather `thg`](http://tortoisehg.bitbucket.io/manual/2.8/intro.html?highlight=thg). That means your `PATH` might not be updated properly to re...
5944411
Can I assign an "alias" to a repository URL in mercurial/kiln?
17
2011-05-10 02:03:06
<p>I keep all my personal projects on my Kiln account and I also have a bitbucket account where I push repositories when I need to share them with people. Is there some way for me to setup an alias for a repo URL so I can do something like </p> <pre><code>hg push kiln </code></pre> <p>or</p> <pre><code>hg push bitb...
1,921
88,396
2015-09-10 20:46:36
5,944,470
24
2011-05-10 02:15:25
61,539
2015-09-10 20:46:36
https://stackoverflow.com/q/5944411
https://stackoverflow.com/a/5944470
<p>Yes, you can do this in your repo's hgrc file using the <a href="http://www.selenic.com/mercurial/hgrc.5.html#paths" rel="nofollow noreferrer">paths section</a>.</p> <pre><code>[paths] default = https://path/to/repo kiln = https://path/to/kiln bitbucket = https://path/to/bitbucket </code></pre> <p>If you create ne...
<p>Yes, you can do this in your repo's hgrc file using the <a href="http://www.selenic.com/mercurial/hgrc.5.html#paths" rel="nofollow noreferrer">paths section</a>.</p> <pre><code>[paths] default = https://path/to/repo kiln = https://path/to/kiln bitbucket = https://path/to/bitbucket </code></pre> <p>If you create ne...
802, 8122
mercurial, tortoisehg
<h1>Can I assign an "alias" to a repository URL in mercurial/kiln?</h1> <p>I keep all my personal projects on my Kiln account and I also have a bitbucket account where I push repositories when I need to share them with people. Is there some way for me to setup an alias for a repo URL so I can do something like </p> <...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,081
mercurial
# Can I assign an "alias" to a repository URL in mercurial/kiln? I keep all my personal projects on my Kiln account and I also have a bitbucket account where I push repositories when I need to share them with people. Is there some way for me to setup an alias for a repo URL so I can do something like ``` hg push kiln...
Yes, you can do this in your repo's hgrc file using the [paths section](http://www.selenic.com/mercurial/hgrc.5.html#paths). ``` [paths] default = https://path/to/repo kiln = https://path/to/kiln bitbucket = https://path/to/bitbucket ``` If you create new repos often, you can also add this to your ~/.hgrc file.
29413851
How to revert last commits and keep changes in mercurial?
14
2015-04-02 13:10:47
<p>I have three commits 1, 2 and 3. How can I rollback 2 and 3 and still keep the changed files of them??</p> <pre><code>1---2---3 =&gt; 1 and changed files of 2 and 3 </code></pre>
12,505
1,562,388
2018-05-09 09:13:41
29,415,873
24
2015-04-02 14:46:08
8,992
2015-04-02 14:46:08
https://stackoverflow.com/q/29413851
https://stackoverflow.com/a/29415873
<p>You use the <code>strip</code> command:</p> <blockquote> <p>strip changesets and all their descendants from the repository</p> </blockquote> <p>with the <code>--keep</code> option:</p> <blockquote> <p>-k --keep do not modify working copy during strip</p> </blockquote> <p>And since <code>strip</code...
<p>You use the <code>strip</code> command:</p> <blockquote> <p>strip changesets and all their descendants from the repository</p> </blockquote> <p>with the <code>--keep</code> option:</p> <blockquote> <p>-k --keep do not modify working copy during strip</p> </blockquote> <p>And since <code>strip</code...
802
mercurial
<h1>How to revert last commits and keep changes in mercurial?</h1> <p>I have three commits 1, 2 and 3. How can I rollback 2 and 3 and still keep the changed files of them??</p> <pre><code>1---2---3 =&gt; 1 and changed files of 2 and 3 </code></pre>
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,082
mercurial
# How to revert last commits and keep changes in mercurial? I have three commits 1, 2 and 3. How can I rollback 2 and 3 and still keep the changed files of them?? ``` 1---2---3 => 1 and changed files of 2 and 3 ```
You use the `strip` command: > strip changesets and all their descendants from the repository with the `--keep` option: > -k --keep do not modify working copy during strip And since `strip` is destructive of history it's not enabled by default. You enable it by adding these lines to your `~/.hgrc` file: ``` [exten...
1478297
How to set a Mercurial VCS build trigger for TeamCity that ignores label operations
13
2009-09-25 16:30:52
<p>I am trying to setup a build trigger for TeamCity using Mercurial as the VCS. Right now the trigger looks like:</p> <pre><code>+:/** </code></pre> <p>This trigger get fired when changesets are committed. However, I have TeamCity setup to tag each build in the VCS. The tagging process is firing the above build trig...
2,487
58,525
2009-09-28 15:15:16
1,487,622
24
2009-09-28 15:15:16
58,525
2009-09-28 15:15:16
https://stackoverflow.com/q/1478297
https://stackoverflow.com/a/1487622
<p>Adding the trigger pattern:</p> <pre><code>-:/.hgtags </code></pre> <p>filters out the .hgtags file from the build trigger. This is the file that gets modified when the source is tagged by TeamCity. When this file is excluded tagging operations will not fire the build trigger.</p>
<p>Adding the trigger pattern:</p> <pre><code>-:/.hgtags </code></pre> <p>filters out the .hgtags file from the build trigger. This is the file that gets modified when the source is tagged by TeamCity. When this file is excluded tagging operations will not fire the build trigger.</p>
456, 604, 802, 1066, 1783
build-process, continuous-integration, mercurial, teamcity, version-control
<h1>How to set a Mercurial VCS build trigger for TeamCity that ignores label operations</h1> <p>I am trying to setup a build trigger for TeamCity using Mercurial as the VCS. Right now the trigger looks like:</p> <pre><code>+:/** </code></pre> <p>This trigger get fired when changesets are committed. However, I have Te...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,083
mercurial
# How to set a Mercurial VCS build trigger for TeamCity that ignores label operations I am trying to setup a build trigger for TeamCity using Mercurial as the VCS. Right now the trigger looks like: ``` +:/** ``` This trigger get fired when changesets are committed. However, I have TeamCity setup to tag each build in...
Adding the trigger pattern: ``` -:/.hgtags ``` filters out the .hgtags file from the build trigger. This is the file that gets modified when the source is tagged by TeamCity. When this file is excluded tagging operations will not fire the build trigger.
1397357
"hg commit" - nothing happens!
13
2009-09-09 03:10:07
<p>I just started my first Mercurial project.</p> <p>I did a 'cd' into my source directory.</p> <p>Then I did this:</p> <pre><code>hg init myproject </code></pre> <p>But next I did</p> <pre><code>hg commit -m "first commit" </code></pre> <p>And all it reports is:</p> <pre><code>nothing changed </code></pre> <p>...
11,594
170,562
2019-12-11 16:03:48
1,397,363
24
2009-09-09 03:14:06
94,732
2009-09-09 05:29:03
https://stackoverflow.com/q/1397357
https://stackoverflow.com/a/1397363
<p>I think the output of the <code>hg status</code> command is probably telling you that you have a lot of files in your working directory that are not being tracked by Mercurial. You should be able to fix this by running the command</p> <pre><code>hg addremove </code></pre> <p>Then you can make your first commit:</...
<p>I think the output of the <code>hg status</code> command is probably telling you that you have a lot of files in your working directory that are not being tracked by Mercurial. You should be able to fix this by running the command</p> <pre><code>hg addremove </code></pre> <p>Then you can make your first commit:</...
802
mercurial
<h1>"hg commit" - nothing happens!</h1> <p>I just started my first Mercurial project.</p> <p>I did a 'cd' into my source directory.</p> <p>Then I did this:</p> <pre><code>hg init myproject </code></pre> <p>But next I did</p> <pre><code>hg commit -m "first commit" </code></pre> <p>And all it reports is:</p> <pre>...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,084
mercurial
# "hg commit" - nothing happens! I just started my first Mercurial project. I did a 'cd' into my source directory. Then I did this: ``` hg init myproject ``` But next I did ``` hg commit -m "first commit" ``` And all it reports is: ``` nothing changed ``` But when I do ``` hg status ``` It lists all of the s...
I think the output of the `hg status` command is probably telling you that you have a lot of files in your working directory that are not being tracked by Mercurial. You should be able to fix this by running the command ``` hg addremove ``` Then you can make your first commit: ``` hg commit -m "first commit" ``` Al...
12783198
Local Mercurial Ignore File
11
2012-10-08 13:55:34
<p>Is it possible to have a local Mercurial ignore file? Apparently the .hgignore is a file versioned as any other file. Can I have such a file next to the versioned one?</p>
5,011
26,521
2019-03-07 09:47:19
12,783,831
24
2012-10-08 14:30:57
1,464,763
2012-10-08 14:30:57
https://stackoverflow.com/q/12783198
https://stackoverflow.com/a/12783831
<p>Yes you can configure a local, per-user ignore file. The location and name of this file is defined in the user-specific <code>.hgrc</code> configuration file (usually located in the home directory of the user) under the <code>[ui]</code> section, e.g.:</p> <pre><code>[ui] ignore = ~/.myhgignore </code></pre> <p>Th...
<p>Yes you can configure a local, per-user ignore file. The location and name of this file is defined in the user-specific <code>.hgrc</code> configuration file (usually located in the home directory of the user) under the <code>[ui]</code> section, e.g.:</p> <pre><code>[ui] ignore = ~/.myhgignore </code></pre> <p>Th...
802
mercurial
<h1>Local Mercurial Ignore File</h1> <p>Is it possible to have a local Mercurial ignore file? Apparently the .hgignore is a file versioned as any other file. Can I have such a file next to the versioned one?</p>
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,085
mercurial
# Local Mercurial Ignore File Is it possible to have a local Mercurial ignore file? Apparently the .hgignore is a file versioned as any other file. Can I have such a file next to the versioned one?
Yes you can configure a local, per-user ignore file. The location and name of this file is defined in the user-specific `.hgrc` configuration file (usually located in the home directory of the user) under the `[ui]` section, e.g.: ``` [ui] ignore = ~/.myhgignore ``` This file should be in the same format as the repos...
32597886
UIScrollView on tvOS
8
2015-09-16 00:38:43
<p>The question is very simple, how to enable scroll and zoom inside a UIScrollView in tvOS? </p> <p>I tried the same initializer code from iOS and returned the scrollview for the <strong>focusedView</strong> var, but nothing happens when i touch the remote.</p> <p>Also, i tried to add another custom <strong>UIPanGes...
5,167
445,772
2018-02-19 14:33:06
32,598,761
24
2015-09-16 02:29:19
5,616
2015-09-16 02:29:19
https://stackoverflow.com/q/32597886
https://stackoverflow.com/a/32598761
<p>You can configure the scroll view's built-in pan gesture to recognize touches on the Siri Remote. It doesn't do that automatically, because normally scroll views on tvOS aren't scrolled directly by touches: they're scrolled automatically as focus moves between views within the scroll view.</p> <p>If you really want...
<p>You can configure the scroll view's built-in pan gesture to recognize touches on the Siri Remote. It doesn't do that automatically, because normally scroll views on tvOS aren't scrolled directly by touches: they're scrolled automatically as focus moves between views within the scroll view.</p> <p>If you really want...
24384, 41976, 74487, 77205, 114541
tvos, uipangesturerecognizer, uipinchgesturerecognizer, uiscrollview, uiscrollviewdelegate
<h1>UIScrollView on tvOS</h1> <p>The question is very simple, how to enable scroll and zoom inside a UIScrollView in tvOS? </p> <p>I tried the same initializer code from iOS and returned the scrollview for the <strong>focusedView</strong> var, but nothing happens when i touch the remote.</p> <p>Also, i tried to add a...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,086
mercurial
# UIScrollView on tvOS The question is very simple, how to enable scroll and zoom inside a UIScrollView in tvOS? I tried the same initializer code from iOS and returned the scrollview for the **focusedView** var, but nothing happens when i touch the remote. Also, i tried to add another custom **UIPanGestureRecognize...
You can configure the scroll view's built-in pan gesture to recognize touches on the Siri Remote. It doesn't do that automatically, because normally scroll views on tvOS aren't scrolled directly by touches: they're scrolled automatically as focus moves between views within the scroll view. If you really want the scrol...
1029480
Is there a way to remove the history for a single file in Mercurial?
51
2009-06-22 21:24:51
<p>I think I already know the answer to this but thought I would ask anyway:</p> <p>We have a file that got added to a Mercurial repository with sensitive information in it. Is there any way to remove that file along with its change history without removing the whole repo?</p>
13,431
58,525
2016-06-30 13:56:36
1,030,463
23
2009-06-23 03:07:47
115,023
2009-06-23 03:07:47
https://stackoverflow.com/q/1029480
https://stackoverflow.com/a/1030463
<p>No, you can't. Read the <em><a href="http://hgbook.red-bean.com/read/finding-and-fixing-mistakes.html#sec:undo:aaaiiieee" rel="noreferrer">changes that should have never been</a></em> section of the mercurial red book about it; and particularly the <em><a href="http://hgbook.red-bean.com/read/finding-and-fixing-mist...
<p>No, you can't. Read the <em><a href="http://hgbook.red-bean.com/read/finding-and-fixing-mistakes.html#sec:undo:aaaiiieee" rel="noreferrer">changes that should have never been</a></em> section of the mercurial red book about it; and particularly the <em><a href="http://hgbook.red-bean.com/read/finding-and-fixing-mist...
456, 802, 3346
dvcs, mercurial, version-control
<h1>Is there a way to remove the history for a single file in Mercurial?</h1> <p>I think I already know the answer to this but thought I would ask anyway:</p> <p>We have a file that got added to a Mercurial repository with sensitive information in it. Is there any way to remove that file along with its change history ...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,087
mercurial
# Is there a way to remove the history for a single file in Mercurial? I think I already know the answer to this but thought I would ask anyway: We have a file that got added to a Mercurial repository with sensitive information in it. Is there any way to remove that file along with its change history without removing...
No, you can't. Read the *[changes that should have never been](http://hgbook.red-bean.com/read/finding-and-fixing-mistakes.html#sec:undo:aaaiiieee)* section of the mercurial red book about it; and particularly the *[what about sensitive changes that escape](http://hgbook.red-bean.com/read/finding-and-fixing-mistakes.ht...
1086222
In mercurial, how do I apply a reverse-patch to a particular file?
20
2009-07-06 09:33:54
<p>Related to <a href="https://stackoverflow.com/questions/1078881/mercurial-merging-one-file-between-branches-in-one-repo">Mercurial: Merging one file between branches in one repo</a> , I'm trying to perform a backout operation on a single file, even though that file was one of many participants in the revision being ...
9,677
22,369
2009-09-14 17:23:35
1,090,362
23
2009-07-07 04:31:53
8,992
2009-09-14 17:23:35
https://stackoverflow.com/q/1086222
https://stackoverflow.com/a/1090362
<p>You can do it using just the <code>-I</code> (include names matching the given patterns) argument for backout with a single line:</p> <pre><code>hg backout --merge -I thefiletorevert -m 'message' OFFENDINGREVISIONID </code></pre> <p><strong>Example Script:</strong></p> <pre><code>hg init testrepo cd testrepo echo...
<p>You can do it using just the <code>-I</code> (include names matching the given patterns) argument for backout with a single line:</p> <pre><code>hg backout --merge -I thefiletorevert -m 'message' OFFENDINGREVISIONID </code></pre> <p><strong>Example Script:</strong></p> <pre><code>hg init testrepo cd testrepo echo...
802, 12196
mercurial, rollback
<h1>In mercurial, how do I apply a reverse-patch to a particular file?</h1> <p>Related to <a href="https://stackoverflow.com/questions/1078881/mercurial-merging-one-file-between-branches-in-one-repo">Mercurial: Merging one file between branches in one repo</a> , I'm trying to perform a backout operation on a single fil...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,088
mercurial
# In mercurial, how do I apply a reverse-patch to a particular file? Related to [Mercurial: Merging one file between branches in one repo](https://stackoverflow.com/questions/1078881/mercurial-merging-one-file-between-branches-in-one-repo) , I'm trying to perform a backout operation on a single file, even though that ...
You can do it using just the `-I` (include names matching the given patterns) argument for backout with a single line: ``` hg backout --merge -I thefiletorevert -m 'message' OFFENDINGREVISIONID ``` **Example Script:** ``` hg init testrepo cd testrepo echo -e "line1\n\nline3" > file1 echo -e "line1\n\nline3" > file2 ...
8399501
How to delete a branch in bitbucket with mercurial hg?
18
2011-12-06 11:55:16
<p>I opened a second branch (branch2) locally in hg and pushed it to bitbucket. After that i merged the two branches locally and pushed it again...I have branch2 still living on bitbucket. How do i delete branch2 on bitbucket? </p>
16,371
959,936
2018-09-19 14:00:35
8,400,222
23
2011-12-06 12:55:08
310,500
2011-12-06 12:55:08
https://stackoverflow.com/q/8399501
https://stackoverflow.com/a/8400222
<p>Have you tried closing it? From <code>hg help branch</code>:</p> <pre><code>Use "hg commit --close-branch" to mark this branch as closed. </code></pre>
<p>Have you tried closing it? From <code>hg help branch</code>:</p> <pre><code>Use "hg commit --close-branch" to mark this branch as closed. </code></pre>
802, 8337
bitbucket, mercurial
<h1>How to delete a branch in bitbucket with mercurial hg?</h1> <p>I opened a second branch (branch2) locally in hg and pushed it to bitbucket. After that i merged the two branches locally and pushed it again...I have branch2 still living on bitbucket. How do i delete branch2 on bitbucket? </p>
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,089
mercurial
# How to delete a branch in bitbucket with mercurial hg? I opened a second branch (branch2) locally in hg and pushed it to bitbucket. After that i merged the two branches locally and pushed it again...I have branch2 still living on bitbucket. How do i delete branch2 on bitbucket?
Have you tried closing it? From `hg help branch`: ``` Use "hg commit --close-branch" to mark this branch as closed. ```
5293059
List mercurial checkins for one user
17
2011-03-13 22:56:25
<p>How can I list the checkins for a specific mercurial user using TortoiseHg, or failing that, using hg on the command line?</p>
6,280
41,410
2015-02-23 22:50:31
5,293,087
23
2011-03-13 22:59:58
272,520
2015-02-23 22:50:31
https://stackoverflow.com/q/5293059
https://stackoverflow.com/a/5293087
<p>The hg log command has a "user" option (-u or --user). To find my commits, I could do...</p> <pre><code>hg log --user "Mark Hildreth" </code></pre>
<p>The hg log command has a "user" option (-u or --user). To find my commits, I could do...</p> <pre><code>hg log --user "Mark Hildreth" </code></pre>
802
mercurial
<h1>List mercurial checkins for one user</h1> <p>How can I list the checkins for a specific mercurial user using TortoiseHg, or failing that, using hg on the command line?</p>
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,090
mercurial
# List mercurial checkins for one user How can I list the checkins for a specific mercurial user using TortoiseHg, or failing that, using hg on the command line?
The hg log command has a "user" option (-u or --user). To find my commits, I could do... ``` hg log --user "Mark Hildreth" ```
4436250
Mercurial: update to a revision, but not modify local files
16
2010-12-14 05:45:11
<p>Suppose the repository has 20 revisions. The current revision on the record is revision <em>10</em>, while the actual local files are based on the latest revision <em>20</em>. I do not want to branch from revision <em>10</em>. I want to continue the revision <em>20</em>.</p> <p>Currently what I'm doing is to copy a...
5,511
153,133
2019-09-03 04:01:33
4,446,547
23
2010-12-15 04:00:17
235,698
2019-09-03 04:01:33
https://stackoverflow.com/q/4436250
https://stackoverflow.com/a/4446547
<p>You might find this article useful. The original link no longer exists, so it now references the Internet Archive's copy:</p> <p><a href="https://web.archive.org/web/20170805042314/http://hgtip.com/tips/advanced/2010-04-23-debug-command-tricks" rel="noreferrer">https://web.archive.org/web/20170805042314/http://hgt...
<p>You might find this article useful. The original link no longer exists, so it now references the Internet Archive's copy:</p> <p><a href="https://web.archive.org/web/20170805042314/http://hgtip.com/tips/advanced/2010-04-23-debug-command-tricks" rel="noreferrer">https://web.archive.org/web/20170805042314/http://hgt...
802, 8122
mercurial, tortoisehg
<h1>Mercurial: update to a revision, but not modify local files</h1> <p>Suppose the repository has 20 revisions. The current revision on the record is revision <em>10</em>, while the actual local files are based on the latest revision <em>20</em>. I do not want to branch from revision <em>10</em>. I want to continue th...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,091
mercurial
# Mercurial: update to a revision, but not modify local files Suppose the repository has 20 revisions. The current revision on the record is revision *10*, while the actual local files are based on the latest revision *20*. I do not want to branch from revision *10*. I want to continue the revision *20*. Currently wh...
You might find this article useful. The original link no longer exists, so it now references the Internet Archive's copy: <https://web.archive.org/web/20170805042314/http://hgtip.com/tips/advanced/2010-04-23-debug-command-tricks> In particular, to "reparent" your current working directory, issue: ``` hg debugsetpare...