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
4417653
Using Mercurial, how can I measure individual contributions?
16
2010-12-11 16:27:50
<p>My team is using Mercurial, and I would like to know the relative contributions by each team member. I know that we cannot measure productivity by lines of code, but I would like to see if each person at least contributed <em>something</em>, even if it was overwritten by others later. So, I don't just want to see wh...
3,955
176,007
2018-02-22 10:41:46
4,417,758
23
2010-12-11 16:49:31
267
2018-02-22 10:41:46
https://stackoverflow.com/q/4417653
https://stackoverflow.com/a/4417758
<p>There's an extension exactly for this, named <code>churn</code>, it is bundled with Mercurial, but not automatically enabled. You can find more information here: <a href="https://www.mercurial-scm.org/wiki/ChurnExtension" rel="nofollow noreferrer">ChurnExtension</a>.</p> <p>In your mercurial.ini file, to the <code>...
<p>There's an extension exactly for this, named <code>churn</code>, it is bundled with Mercurial, but not automatically enabled. You can find more information here: <a href="https://www.mercurial-scm.org/wiki/ChurnExtension" rel="nofollow noreferrer">ChurnExtension</a>.</p> <p>In your mercurial.ini file, to the <code>...
802, 1567, 5513
measurement, mercurial, metrics
<h1>Using Mercurial, how can I measure individual contributions?</h1> <p>My team is using Mercurial, and I would like to know the relative contributions by each team member. I know that we cannot measure productivity by lines of code, but I would like to see if each person at least contributed <em>something</em>, even ...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,092
mercurial
# Using Mercurial, how can I measure individual contributions? My team is using Mercurial, and I would like to know the relative contributions by each team member. I know that we cannot measure productivity by lines of code, but I would like to see if each person at least contributed *something*, even if it was overwr...
There's an extension exactly for this, named `churn`, it is bundled with Mercurial, but not automatically enabled. You can find more information here: [ChurnExtension](https://www.mercurial-scm.org/wiki/ChurnExtension). In your mercurial.ini file, to the `[extensions]` section, add the following: ``` [extensions] chu...
10716873
Can I combine the history of two files in Mercurial?
15
2012-05-23 09:14:43
<p>I need to combine the functionality of two classes into one, but I am wondering can I combine their change history as well?</p> <p>Both classes contains lots of previous changes, so I want to keep their change history in one place for reference. I can make a comment in the combined class, but in an IDE, it's not ve...
2,021
499,922
2012-05-23 11:57:42
10,719,296
23
2012-05-23 11:49:06
310,500
2012-05-23 11:57:42
https://stackoverflow.com/q/10716873
https://stackoverflow.com/a/10719296
<p>To do this, you need to record the file merging as a merge changeset.</p> <p>Say changeset 0 is your current head with files A and B which you want to merge into file C. To do this, rename your file A to C and commit as changeset 1, then update back to changeset 0, rename file B to C and commit this as changeset 2....
<p>To do this, you need to record the file merging as a merge changeset.</p> <p>Say changeset 0 is your current head with files A and B which you want to merge into file C. To do this, rename your file A to C and commit as changeset 1, then update back to changeset 0, rename file B to C and commit this as changeset 2....
802
mercurial
<h1>Can I combine the history of two files in Mercurial?</h1> <p>I need to combine the functionality of two classes into one, but I am wondering can I combine their change history as well?</p> <p>Both classes contains lots of previous changes, so I want to keep their change history in one place for reference. I can ma...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,093
mercurial
# Can I combine the history of two files in Mercurial? I need to combine the functionality of two classes into one, but I am wondering can I combine their change history as well? Both classes contains lots of previous changes, so I want to keep their change history in one place for reference. I can make a comment in ...
To do this, you need to record the file merging as a merge changeset. Say changeset 0 is your current head with files A and B which you want to merge into file C. To do this, rename your file A to C and commit as changeset 1, then update back to changeset 0, rename file B to C and commit this as changeset 2. Next, you...
15269060
Force merge branches
12
2013-03-07 10:44:16
<p>Is there any way to force merge branch A in branch B where all possible conflicts will be resolved in favor of branch B?</p> <p>In any words how to push last branch B revision in branch A without vanity around conflicts?</p>
5,181
1,040,070
2014-11-04 10:00:37
15,269,355
23
2013-03-07 10:58:33
501,710
2014-11-04 10:00:37
https://stackoverflow.com/q/15269060
https://stackoverflow.com/a/15269355
<p>You can decide to take all of one branch over another by using <code>hg merge --tool internal:other</code> or <code>hg merge --tool internal:local</code></p> <p>I'm not sure which way you want to merge but if you want to merge A into B taking all changes from B then you would do the following:</p> <pre><code>&gt; ...
<p>You can decide to take all of one branch over another by using <code>hg merge --tool internal:other</code> or <code>hg merge --tool internal:local</code></p> <p>I'm not sure which way you want to merge but if you want to merge A into B taking all changes from B then you would do the following:</p> <pre><code>&gt; ...
802
mercurial
<h1>Force merge branches</h1> <p>Is there any way to force merge branch A in branch B where all possible conflicts will be resolved in favor of branch B?</p> <p>In any words how to push last branch B revision in branch A without vanity around conflicts?</p>
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,094
mercurial
# Force merge branches Is there any way to force merge branch A in branch B where all possible conflicts will be resolved in favor of branch B? In any words how to push last branch B revision in branch A without vanity around conflicts?
You can decide to take all of one branch over another by using `hg merge --tool internal:other` or `hg merge --tool internal:local` I'm not sure which way you want to merge but if you want to merge A into B taking all changes from B then you would do the following: ``` > hg update B > hg merge A --tool internal:local...
4288403
Can Mercurial do a reverse-patch?
12
2010-11-26 20:38:23
<p>Scenario: I've "inherited" a program, kept under Mercurial, that only works on my system with specific tweaks to certain files that are checked in. I <em>do not</em> want to check these tweaks in.</p> <p>My most recent solution to this is to create a mercurial patch file (hg diff > patchfile) containing these twea...
10,745
476,487
2018-07-30 19:14:08
4,288,543
23
2010-11-26 21:08:08
8,992
2018-07-30 19:14:08
https://stackoverflow.com/q/4288403
https://stackoverflow.com/a/4288543
<p>Mercurial's <code>patch</code> command (really <code>import</code>) doesn't support reverse, but <code>hg diff</code> does. Use <code>--reverse</code> on that and you'll have a reversed patch that Mercurial can apply.</p> <p>However, what you're describing is a very common vendor-branch style workflow, which mercu...
<p>Mercurial's <code>patch</code> command (really <code>import</code>) doesn't support reverse, but <code>hg diff</code> does. Use <code>--reverse</code> on that and you'll have a reversed patch that Mercurial can apply.</p> <p>However, what you're describing is a very common vendor-branch style workflow, which mercu...
606, 802, 2132
diff, mercurial, patch
<h1>Can Mercurial do a reverse-patch?</h1> <p>Scenario: I've "inherited" a program, kept under Mercurial, that only works on my system with specific tweaks to certain files that are checked in. I <em>do not</em> want to check these tweaks in.</p> <p>My most recent solution to this is to create a mercurial patch file ...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,095
mercurial
# Can Mercurial do a reverse-patch? Scenario: I've "inherited" a program, kept under Mercurial, that only works on my system with specific tweaks to certain files that are checked in. I *do not* want to check these tweaks in. My most recent solution to this is to create a mercurial patch file (hg diff > patchfile) co...
Mercurial's `patch` command (really `import`) doesn't support reverse, but `hg diff` does. Use `--reverse` on that and you'll have a reversed patch that Mercurial can apply. However, what you're describing is a very common vendor-branch style workflow, which mercurial can better support using features other than diff ...
2658419
Mercurial win instal: no ini files
11
2010-04-17 12:59:38
<p>I installed mercurial 1.5.1 on win xp but the files listed in hg help config, were not created. <br/> Namely: <br/> %USERPROFILE%.hgrc (is that a valid windows file name?)<br/> %USERPROFILE%\Mercurial.ini<br/> \Mercurial\Mercurial.ini<br/> C:\Mercurial\Mercurial.ini (no such directory altogether)<br/> %HOME%.hgrc (w...
9,596
239,489
2010-04-18 19:12:35
2,659,434
23
2010-04-17 18:05:02
8,992
2010-04-17 18:05:02
https://stackoverflow.com/q/2658419
https://stackoverflow.com/a/2659434
<p>They're not supposed to be automatically created. They're places you can put configuration information depending on what scope you want it to have:</p> <p><code>C:\Mercurial\Mercurial.ini</code> - If you choose to create this whatever you put in it affects all users on the systme</p> <p><code>%USERPROFILE%\Mercur...
<p>They're not supposed to be automatically created. They're places you can put configuration information depending on what scope you want it to have:</p> <p><code>C:\Mercurial\Mercurial.ini</code> - If you choose to create this whatever you put in it affects all users on the systme</p> <p><code>%USERPROFILE%\Mercur...
802
mercurial
<h1>Mercurial win instal: no ini files</h1> <p>I installed mercurial 1.5.1 on win xp but the files listed in hg help config, were not created. <br/> Namely: <br/> %USERPROFILE%.hgrc (is that a valid windows file name?)<br/> %USERPROFILE%\Mercurial.ini<br/> \Mercurial\Mercurial.ini<br/> C:\Mercurial\Mercurial.ini (no su...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,096
mercurial
# Mercurial win instal: no ini files I installed mercurial 1.5.1 on win xp but the files listed in hg help config, were not created. Namely: %USERPROFILE%.hgrc (is that a valid windows file name?) %USERPROFILE%\Mercurial.ini \Mercurial\Mercurial.ini C:\Mercurial\Mercurial.ini (no such directory altogether)...
They're not supposed to be automatically created. They're places you can put configuration information depending on what scope you want it to have: `C:\Mercurial\Mercurial.ini` - If you choose to create this whatever you put in it affects all users on the systme `%USERPROFILE%\Mercurial.ini` - If you choose to create...
9735017
How to locate and recover a deleted file
21
2012-03-16 09:50:56
<p>At some stage in the past I had a "foo.txt" which was under Mercurial source control. However it has now been deleted.</p> <p>How can I recover the file when I don't know the last Mercurial revision in which the file was deleted?</p>
6,593
1,075,330
2020-04-27 14:27:34
9,736,698
22
2012-03-16 11:50:17
633,281
2012-03-16 17:16:42
https://stackoverflow.com/q/9735017
https://stackoverflow.com/a/9736698
<p>If you know the exact path for the file, you can do something like :</p> <pre><code>hg log -l 1 path/to/foo.txt </code></pre> <p>This will show you the last changeset where <code>foo.txt</code> was modified, so you will be able to restore the file from this revision.</p> <p>Once you have the right revision, you c...
<p>If you know the exact path for the file, you can do something like :</p> <pre><code>hg log -l 1 path/to/foo.txt </code></pre> <p>This will show you the last changeset where <code>foo.txt</code> was modified, so you will be able to restore the file from this revision.</p> <p>Once you have the right revision, you c...
802, 5377, 12351, 37510
delete-file, mercurial, recover, restore
<h1>How to locate and recover a deleted file</h1> <p>At some stage in the past I had a "foo.txt" which was under Mercurial source control. However it has now been deleted.</p> <p>How can I recover the file when I don't know the last Mercurial revision in which the file was deleted?</p>
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,097
mercurial
# How to locate and recover a deleted file At some stage in the past I had a "foo.txt" which was under Mercurial source control. However it has now been deleted. How can I recover the file when I don't know the last Mercurial revision in which the file was deleted?
If you know the exact path for the file, you can do something like : ``` hg log -l 1 path/to/foo.txt ``` This will show you the last changeset where `foo.txt` was modified, so you will be able to restore the file from this revision. Once you have the right revision, you can simply do : ``` hg revert -r <my revision...
5406385
TortoiseHg - How to create patch without committing first
21
2011-03-23 14:00:19
<p>When I want to create a patch from uncommitted changes, do I really have to first commit? Does TortoiseHg not allow creating a patch without performing a commit?</p>
11,347
72,437
2023-05-25 21:01:59
5,407,353
22
2011-03-23 15:09:39
19,756
2011-03-23 21:08:03
https://stackoverflow.com/q/5406385
https://stackoverflow.com/a/5407353
<p>TortoiseHg 2.0.2: in workbench you can right-click on the <code>Working Directory</code> line and select <code>Export</code> / <code>Copy patch</code> from the contextual menu - the resulting diff will be placed in clipboard.</p> <p>Of course, you won't have the changeset header and the commit message at the beginn...
<p>TortoiseHg 2.0.2: in workbench you can right-click on the <code>Working Directory</code> line and select <code>Export</code> / <code>Copy patch</code> from the contextual menu - the resulting diff will be placed in clipboard.</p> <p>Of course, you won't have the changeset header and the commit message at the beginn...
8122
tortoisehg
<h1>TortoiseHg - How to create patch without committing first</h1> <p>When I want to create a patch from uncommitted changes, do I really have to first commit? Does TortoiseHg not allow creating a patch without performing a 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,098
mercurial
# TortoiseHg - How to create patch without committing first When I want to create a patch from uncommitted changes, do I really have to first commit? Does TortoiseHg not allow creating a patch without performing a commit?
TortoiseHg 2.0.2: in workbench you can right-click on the `Working Directory` line and select `Export` / `Copy patch` from the contextual menu - the resulting diff will be placed in clipboard. Of course, you won't have the changeset header and the commit message at the beginning of the patch like you will get from the...
4802754
Where is the mercurial.hg source repository
20
2011-01-26 09:03:32
<p>I looked at the mercurial website, and I couldn't find a single link to the location of the mercurial source repository itself. Do you know where it might me?</p>
5,896
174,011
2018-05-16 15:36:58
4,802,941
22
2011-01-26 09:24:12
11,963
2018-05-16 15:36:58
https://stackoverflow.com/q/4802754
https://stackoverflow.com/a/4802941
<p>The official repository seems to sit at <a href="https://www.mercurial-scm.org/repo/hg/" rel="noreferrer">https://www.mercurial-scm.org/repo/hg/</a> or <a href="https://www.mercurial-scm.org/repo/hg-stable" rel="noreferrer">https://www.mercurial-scm.org/repo/hg-stable</a> with different branches. More information is...
<p>The official repository seems to sit at <a href="https://www.mercurial-scm.org/repo/hg/" rel="noreferrer">https://www.mercurial-scm.org/repo/hg/</a> or <a href="https://www.mercurial-scm.org/repo/hg-stable" rel="noreferrer">https://www.mercurial-scm.org/repo/hg-stable</a> with different branches. More information is...
802
mercurial
<h1>Where is the mercurial.hg source repository</h1> <p>I looked at the mercurial website, and I couldn't find a single link to the location of the mercurial source repository itself. Do you know where it might me?</p>
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,099
mercurial
# Where is the mercurial.hg source repository I looked at the mercurial website, and I couldn't find a single link to the location of the mercurial source repository itself. Do you know where it might me?
The official repository seems to sit at <https://www.mercurial-scm.org/repo/hg/> or <https://www.mercurial-scm.org/repo/hg-stable> with different branches. More information is available at the [Developer Repositories](https://www.mercurial-scm.org/wiki/DeveloperRepos) wiki page. Both links are browsable online and can...
7297889
How to convert N local topmost commits to an MQ patch?
17
2011-09-04 07:20:23
<p>I would like to arrange my last commits as an MQ patch. All the commits are local (never pushed to the server), but not all the local commits are to be converted.</p> <p>Say, I did 10 commits (never pushed) and now I wish to convert the last 5 to a patch.</p> <p>How do I do it?</p>
2,135
80,002
2011-09-04 10:15:21
7,298,512
22
2011-09-04 10:15:21
75,761
2011-09-04 10:15:21
https://stackoverflow.com/q/7297889
https://stackoverflow.com/a/7298512
<p>Short version:</p> <pre><code>$ hg qimport -r "-5:" </code></pre> <p>Long version:</p> <pre><code>$ hg qimport -r "last(all(), 5)" </code></pre>
<p>Short version:</p> <pre><code>$ hg qimport -r "-5:" </code></pre> <p>Long version:</p> <pre><code>$ hg qimport -r "last(all(), 5)" </code></pre>
802, 32068
mercurial, mercurial-queue
<h1>How to convert N local topmost commits to an MQ patch?</h1> <p>I would like to arrange my last commits as an MQ patch. All the commits are local (never pushed to the server), but not all the local commits are to be converted.</p> <p>Say, I did 10 commits (never pushed) and now I wish to convert the last 5 to a pat...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,100
mercurial
# How to convert N local topmost commits to an MQ patch? I would like to arrange my last commits as an MQ patch. All the commits are local (never pushed to the server), but not all the local commits are to be converted. Say, I did 10 commits (never pushed) and now I wish to convert the last 5 to a patch. How do I do...
Short version: ``` $ hg qimport -r "-5:" ``` Long version: ``` $ hg qimport -r "last(all(), 5)" ```
7671654
Mercurial usage to merge multiple heads
14
2011-10-06 08:06:59
<p>I'm mercurial newbie and want to learn how to use my <a href="http://montao.googlecode.com">repository</a>. Can you tell me how to merge my friend's work with mine? Thanks</p> <pre><code>$ hg update tip abort: crosses branches (merge branches or use --clean to discard changes) $ hg heads changeset: 265:ac5d3c3a0...
43,908
108,207
2011-10-07 09:03:15
7,677,375
22
2011-10-06 16:19:51
975,761
2011-10-06 16:27:02
https://stackoverflow.com/q/7671654
https://stackoverflow.com/a/7677375
<p>The basic problem here is that your working directory is not clean. Mercurial prevents people from accidentally jumping between branches with uncommitted changes as this is generally a bad idea.</p> <p>Let's start with that first command:</p> <pre><code>$ hg update tip abort: crosses branches (merge branches or us...
<p>The basic problem here is that your working directory is not clean. Mercurial prevents people from accidentally jumping between branches with uncommitted changes as this is generally a bad idea.</p> <p>Let's start with that first command:</p> <pre><code>$ hg update tip abort: crosses branches (merge branches or us...
802
mercurial
<h1>Mercurial usage to merge multiple heads</h1> <p>I'm mercurial newbie and want to learn how to use my <a href="http://montao.googlecode.com">repository</a>. Can you tell me how to merge my friend's work with mine? Thanks</p> <pre><code>$ hg update tip abort: crosses branches (merge branches or use --clean to discar...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,102
mercurial
# Mercurial usage to merge multiple heads I'm mercurial newbie and want to learn how to use my [repository](http://montao.googlecode.com). Can you tell me how to merge my friend's work with mine? Thanks ``` $ hg update tip abort: crosses branches (merge branches or use --clean to discard changes) $ hg heads changese...
The basic problem here is that your working directory is not clean. Mercurial prevents people from accidentally jumping between branches with uncommitted changes as this is generally a bad idea. Let's start with that first command: ``` $ hg update tip abort: crosses branches (merge branches or use --clean to discard ...
1541778
Mercurial - how do I populate repository descriptions for hgwebdir.cgi?
14
2009-10-09 04:25:39
<p>Currently if I specify a description in <code>hgwebdir.config</code> it shows up the same for each repository. I want to have a unique name for each repository. Where and how do I set this?</p> <p>My <code>hgwebdir.config</code> looks like this at present:</p> <pre><code>[web] style = Gitweb contact = BrianLy desc...
3,484
636
2015-02-13 18:11:24
1,541,811
22
2009-10-09 04:33:21
8,992
2015-02-13 18:11:24
https://stackoverflow.com/q/1541778
https://stackoverflow.com/a/1541811
<p>Inside each repository itself is (or can be) a <code>.hg/hgrc</code> file. Put the <code>[web]</code> section in there with a <code>description</code> entry. See the <a href="http://www.selenic.com/mercurial/hgrc.5.html" rel="nofollow noreferrer"><code>hgrc</code> webpage</a> for all the places that config entries...
<p>Inside each repository itself is (or can be) a <code>.hg/hgrc</code> file. Put the <code>[web]</code> section in there with a <code>description</code> entry. See the <a href="http://www.selenic.com/mercurial/hgrc.5.html" rel="nofollow noreferrer"><code>hgrc</code> webpage</a> for all the places that config entries...
456, 802, 15655
hgweb, mercurial, version-control
<h1>Mercurial - how do I populate repository descriptions for hgwebdir.cgi?</h1> <p>Currently if I specify a description in <code>hgwebdir.config</code> it shows up the same for each repository. I want to have a unique name for each repository. Where and how do I set this?</p> <p>My <code>hgwebdir.config</code> looks ...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,103
mercurial
# Mercurial - how do I populate repository descriptions for hgwebdir.cgi? Currently if I specify a description in `hgwebdir.config` it shows up the same for each repository. I want to have a unique name for each repository. Where and how do I set this? My `hgwebdir.config` looks like this at present: ``` [web] style...
Inside each repository itself is (or can be) a `.hg/hgrc` file. Put the `[web]` section in there with a `description` entry. See the [`hgrc` webpage](http://www.selenic.com/mercurial/hgrc.5.html) for all the places that config entries can go.
10949876
Mercurial: how to recover from an interrupted "qpop -a"?
13
2012-06-08 13:32:49
<p>I've imported a couple of revisions into the queue and tried to pop them all. Unfortunately, according to some other Mercurial client accessing the same repository, <code>hg qpop -a</code> didn't complete successfully:</p> <pre><code>&gt; hg qpop -a popping 115.diff popping 114.diff popping 113.diff popping 112.dif...
3,868
241,453
2012-06-08 13:49:58
10,950,137
22
2012-06-08 13:49:58
63,147
2012-06-08 13:49:58
https://stackoverflow.com/q/10949876
https://stackoverflow.com/a/10950137
<p>It sounds like your dirstate was corrupted by the failed operation. A similar issue was reported to the <code>hg</code> mailing list a long time ago (<a href="http://www.selenic.com/pipermail/mercurial/2008-October/022069.html" rel="noreferrer">link</a>). You should review this <a href="http://andreaswuest.blogspo...
<p>It sounds like your dirstate was corrupted by the failed operation. A similar issue was reported to the <code>hg</code> mailing list a long time ago (<a href="http://www.selenic.com/pipermail/mercurial/2008-October/022069.html" rel="noreferrer">link</a>). You should review this <a href="http://andreaswuest.blogspo...
802, 32068
mercurial, mercurial-queue
<h1>Mercurial: how to recover from an interrupted "qpop -a"?</h1> <p>I've imported a couple of revisions into the queue and tried to pop them all. Unfortunately, according to some other Mercurial client accessing the same repository, <code>hg qpop -a</code> didn't complete successfully:</p> <pre><code>&gt; hg qpop -a ...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,104
mercurial
# Mercurial: how to recover from an interrupted "qpop -a"? I've imported a couple of revisions into the queue and tried to pop them all. Unfortunately, according to some other Mercurial client accessing the same repository, `hg qpop -a` didn't complete successfully: ``` > hg qpop -a popping 115.diff popping 114.diff ...
It sounds like your dirstate was corrupted by the failed operation. A similar issue was reported to the `hg` mailing list a long time ago ([link](http://www.selenic.com/pipermail/mercurial/2008-October/022069.html)). You should review this [blog post by Andreas Wuest](http://andreaswuest.blogspot.com/2009/11/what-to-do...
8735032
Mercurial: keep default branch "active"
13
2012-01-04 22:29:01
<p>I am using mercurial with named branches, and notice that when I create a new branch of default, default is marked as an inactive branch. Eg:</p> <pre><code>C:\data\solutions\test-repo&gt;hg branches default 0:aeec280e6310 C:\data\solutions\test-repo&gt;hg branch feature-branch marked workin...
6,729
597,505
2013-02-21 10:01:15
8,740,570
22
2012-01-05 09:59:32
110,204
2012-01-05 09:59:32
https://stackoverflow.com/q/8735032
https://stackoverflow.com/a/8740570
<p>The notion of "active" and "inactive" branches is something we're moving away from in the Mercurial project. The problem is simply that branches can flip back and forth between the two states more or less randomly and at inconvenient times — as you've just seen.</p> <p>Instead, we're now focussing on "open" vs "clo...
<p>The notion of "active" and "inactive" branches is something we're moving away from in the Mercurial project. The problem is simply that branches can flip back and forth between the two states more or less randomly and at inconvenient times — as you've just seen.</p> <p>Instead, we're now focussing on "open" vs "clo...
802, 1879
branch, mercurial
<h1>Mercurial: keep default branch "active"</h1> <p>I am using mercurial with named branches, and notice that when I create a new branch of default, default is marked as an inactive branch. Eg:</p> <pre><code>C:\data\solutions\test-repo&gt;hg branches default 0:aeec280e6310 C:\data\solutions\te...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,105
mercurial
# Mercurial: keep default branch "active" I am using mercurial with named branches, and notice that when I create a new branch of default, default is marked as an inactive branch. Eg: ``` C:\data\solutions\test-repo>hg branches default 0:aeec280e6310 C:\data\solutions\test-repo>hg branch featu...
The notion of "active" and "inactive" branches is something we're moving away from in the Mercurial project. The problem is simply that branches can flip back and forth between the two states more or less randomly and at inconvenient times — as you've just seen. Instead, we're now focussing on "open" vs "closed". This...
1453048
Defining which branch my next commit is added to
12
2009-09-21 05:58:32
<p>Let's say I create two banches <strong><em>at the same time</em></strong>:</p> <pre><code>hg branch branch-A hg branch branch-B </code></pre> <p>How do I send my next commit to <strong>branch-A</strong> instead of <strong>branch-B</strong>?</p>
7,473
171,530
2014-05-04 16:46:56
1,454,162
22
2009-09-21 11:56:31
13,498
2009-09-21 11:56:31
https://stackoverflow.com/q/1453048
https://stackoverflow.com/a/1454162
<p><code>hg branch X</code> does <strong>nothing</strong> except tell Mercurial "the next commit I make should be on branch X." It doesn't actually "create" the branch. A branch doesn't exist until there's at least one commit on it:</p> <pre><code>sjl at ecgtheow in ~/Desktop/test on default at tip $ hg branch a mar...
<p><code>hg branch X</code> does <strong>nothing</strong> except tell Mercurial "the next commit I make should be on branch X." It doesn't actually "create" the branch. A branch doesn't exist until there's at least one commit on it:</p> <pre><code>sjl at ecgtheow in ~/Desktop/test on default at tip $ hg branch a mar...
802, 1879
branch, mercurial
<h1>Defining which branch my next commit is added to</h1> <p>Let's say I create two banches <strong><em>at the same time</em></strong>:</p> <pre><code>hg branch branch-A hg branch branch-B </code></pre> <p>How do I send my next commit to <strong>branch-A</strong> instead of <strong>branch-B</strong>?</p>
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,106
mercurial
# Defining which branch my next commit is added to Let's say I create two banches ***at the same time***: ``` hg branch branch-A hg branch branch-B ``` How do I send my next commit to **branch-A** instead of **branch-B**?
`hg branch X` does **nothing** except tell Mercurial "the next commit I make should be on branch X." It doesn't actually "create" the branch. A branch doesn't exist until there's at least one commit on it: ``` sjl at ecgtheow in ~/Desktop/test on default at tip $ hg branch a marked working directory as branch a sjl a...
5249535
How to get rid of older mercurial heads?
9
2011-03-09 17:15:00
<p>Hi I hope you can from my i/o tell how to proceed to merge everything to the latest update without losing my changes:</p> <pre><code>$ hg merge avbryter: grenen 'default' har 4 huvuden - sammanfoga med en specifik rev (kör 'hg heads .' för att se huvuden) ubuntu@ubuntu:/media/Lexar/montao$ hg heads ändring: 192...
14,283
108,207
2017-06-16 12:30:41
5,251,857
22
2011-03-09 20:38:49
8,992
2017-06-16 12:30:41
https://stackoverflow.com/q/5249535
https://stackoverflow.com/a/5251857
<p>Mercurial is about building a permanent history of your work, so none of its normal usage modes include "getting rid" of old heads.</p> <p>The most Mercurial-like way to do this is to merge that head in selecting nothing from it.</p> <pre><code>hg update tip hg --config ui.merge=internal:local merge 191 # keep my ...
<p>Mercurial is about building a permanent history of your work, so none of its normal usage modes include "getting rid" of old heads.</p> <p>The most Mercurial-like way to do this is to merge that head in selecting nothing from it.</p> <pre><code>hg update tip hg --config ui.merge=internal:local merge 191 # keep my ...
802
mercurial
<h1>How to get rid of older mercurial heads?</h1> <p>Hi I hope you can from my i/o tell how to proceed to merge everything to the latest update without losing my changes:</p> <pre><code>$ hg merge avbryter: grenen 'default' har 4 huvuden - sammanfoga med en specifik rev (kör 'hg heads .' för att se huvuden) ubuntu@ubu...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,107
mercurial
# How to get rid of older mercurial heads? Hi I hope you can from my i/o tell how to proceed to merge everything to the latest update without losing my changes: ``` $ hg merge avbryter: grenen 'default' har 4 huvuden - sammanfoga med en specifik rev (kör 'hg heads .' för att se huvuden) ubuntu@ubuntu:/media/Lexar/mon...
Mercurial is about building a permanent history of your work, so none of its normal usage modes include "getting rid" of old heads. The most Mercurial-like way to do this is to merge that head in selecting nothing from it. ``` hg update tip hg --config ui.merge=internal:local merge 191 # keep my files ``` Found [her...
946745
Mercurial push, abort: authorization failed
49
2009-06-03 19:40:23
<p>I'm having problems with pushing to mercurial repository:</p> <pre><code>$ hg push pushing to https://user:***@hg.domain.com/X_repo searching for changes abort: authorization failed </code></pre> <p>The same URL (with the same credentials) is accessible through the web browser. Also, I tried it without embedding u...
36,862
78,305
2020-11-13 03:29:55
958,048
21
2009-06-05 20:46:17
78,305
2010-07-12 13:23:10
https://stackoverflow.com/q/946745
https://stackoverflow.com/a/958048
<p>Problem turned out to be repo dir permissions. <code>chown www-data</code> solved it...</p>
<p>Problem turned out to be repo dir permissions. <code>chown www-data</code> solved it...</p>
80, 642, 802, 5876, 7330
apache, apache2, https, mercurial, repository
<h1>Mercurial push, abort: authorization failed</h1> <p>I'm having problems with pushing to mercurial repository:</p> <pre><code>$ hg push pushing to https://user:***@hg.domain.com/X_repo searching for changes abort: authorization failed </code></pre> <p>The same URL (with the same credentials) is accessible through ...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,108
mercurial
# Mercurial push, abort: authorization failed I'm having problems with pushing to mercurial repository: ``` $ hg push pushing to https://user:***@hg.domain.com/X_repo searching for changes abort: authorization failed ``` The same URL (with the same credentials) is accessible through the web browser. Also, I tried it...
Problem turned out to be repo dir permissions. `chown www-data` solved it...
3241018
commit-pull-merge-push or pull-merge-commit-push?
25
2010-07-13 20:04:50
<p>We started using Mercurial a several weeks ago. Most developers follow this workflow:</p> <ul> <li>work on a feature</li> <li>commit -m "Worked on feature ABC"</li> <li>pull -u</li> <li>If branch <ul> <li>merge</li> <li>commit -m "Merge"</li> <li>push</li> </ul></li> </ul> <p>Today, one of our developer suggested...
14,675
121,445
2018-02-22 10:48:16
3,241,178
21
2010-07-13 20:21:48
8,992
2018-02-22 10:48:16
https://stackoverflow.com/q/3241018
https://stackoverflow.com/a/3241178
<p>I like your original procedure more, but reasonable people can certainly disagree. I consider merging an actual piece of software development work and like having it be a first class citizen in our process.</p> <p>In your second/suggested procedure the risk is that the pull does some stuff you really don't want an...
<p>I like your original procedure more, but reasonable people can certainly disagree. I consider merging an actual piece of software development work and like having it be a first class citizen in our process.</p> <p>In your second/suggested procedure the risk is that the pull does some stuff you really don't want an...
802, 3346
dvcs, mercurial
<h1>commit-pull-merge-push or pull-merge-commit-push?</h1> <p>We started using Mercurial a several weeks ago. Most developers follow this workflow:</p> <ul> <li>work on a feature</li> <li>commit -m "Worked on feature ABC"</li> <li>pull -u</li> <li>If branch <ul> <li>merge</li> <li>commit -m "Merge"</li> <li>push</li>...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,110
mercurial
# commit-pull-merge-push or pull-merge-commit-push? We started using Mercurial a several weeks ago. Most developers follow this workflow: - work on a feature - commit -m "Worked on feature ABC" - pull -u - If branch - merge - commit -m "Merge" - push Today, one of our developer suggested that we do: - work on...
I like your original procedure more, but reasonable people can certainly disagree. I consider merging an actual piece of software development work and like having it be a first class citizen in our process. In your second/suggested procedure the risk is that the pull does some stuff you really don't want and then you ...
8300470
Global hgignore usage
24
2011-11-28 18:26:40
<p>In my mercurial.ini file, I call a global hgignore file like this:</p> <pre><code>[ui] ignore = ~/hgignore.ini </code></pre> <p>This refers to a hgignore.ini file which is in the same directory as the mercurial.ini file.</p> <ol> <li>Does the local hgignore override the global hgignore? </li> <li>If so, is it re...
9,976
539,542
2011-11-28 21:40:59
8,302,736
21
2011-11-28 21:40:59
633,281
2011-11-28 21:40:59
https://stackoverflow.com/q/8300470
https://stackoverflow.com/a/8302736
<p>The global <code>.hgignore</code> is "added" to the local one. This means that everything in the global one will be considered for each repository, but the content of the local one will also be considered.</p> <p>For the second question, I think the best answer is : it depends on what you want ;)</p> <ol> <li>If y...
<p>The global <code>.hgignore</code> is "added" to the local one. This means that everything in the global one will be considered for each repository, but the content of the local one will also be considered.</p> <p>For the second question, I think the best answer is : it depends on what you want ;)</p> <ol> <li>If y...
802, 31419
hgignore, mercurial
<h1>Global hgignore usage</h1> <p>In my mercurial.ini file, I call a global hgignore file like this:</p> <pre><code>[ui] ignore = ~/hgignore.ini </code></pre> <p>This refers to a hgignore.ini file which is in the same directory as the mercurial.ini file.</p> <ol> <li>Does the local hgignore override the global hgign...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,111
mercurial
# Global hgignore usage In my mercurial.ini file, I call a global hgignore file like this: ``` [ui] ignore = ~/hgignore.ini ``` This refers to a hgignore.ini file which is in the same directory as the mercurial.ini file. 1. Does the local hgignore override the global hgignore? 2. If so, is it recommended to have a ...
The global `.hgignore` is "added" to the local one. This means that everything in the global one will be considered for each repository, but the content of the local one will also be considered. For the second question, I think the best answer is : it depends on what you want ;) 1. If you want a really fine grained c...
884247
How can I host a Mercurial repository for several users myself?
20
2009-05-19 18:06:22
<p>There are a number of hosting services for git, Mercurial, etc. I need to host my own, because some of the data we want to keep there is of a sensitive nature, and we cannot move it off-site.</p> <p>I need to host a Mercurial repository on a server so that a number of people can access it to both pull changes and p...
7,908
108,290
2009-05-19 18:19:45
884,291
21
2009-05-19 18:19:45
106,580
2009-05-19 18:19:45
https://stackoverflow.com/q/884247
https://stackoverflow.com/a/884291
<p>Have a look at the <a href="http://www.selenic.com/mercurial/wiki/index.cgi/PublishingRepositories" rel="noreferrer">PublishingRepositories</a> page on the mercurial site. It will tell you how to set up the <code>hgwebdir.cgi</code> script for serving multiple repos over https.</p> <p>Once you've configured it, I w...
<p>Have a look at the <a href="http://www.selenic.com/mercurial/wiki/index.cgi/PublishingRepositories" rel="noreferrer">PublishingRepositories</a> page on the mercurial site. It will tell you how to set up the <code>hgwebdir.cgi</code> script for serving multiple repos over https.</p> <p>Once you've configured it, I w...
131, 536, 802, 3346
collaboration, dvcs, hosting, mercurial
<h1>How can I host a Mercurial repository for several users myself?</h1> <p>There are a number of hosting services for git, Mercurial, etc. I need to host my own, because some of the data we want to keep there is of a sensitive nature, and we cannot move it off-site.</p> <p>I need to host a Mercurial repository on a s...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,112
mercurial
# How can I host a Mercurial repository for several users myself? There are a number of hosting services for git, Mercurial, etc. I need to host my own, because some of the data we want to keep there is of a sensitive nature, and we cannot move it off-site. I need to host a Mercurial repository on a server so that a ...
Have a look at the [PublishingRepositories](http://www.selenic.com/mercurial/wiki/index.cgi/PublishingRepositories) page on the mercurial site. It will tell you how to set up the `hgwebdir.cgi` script for serving multiple repos over https. Once you've configured it, I would recommend adding this to your hgrc: ``` [we...
21979690
What's the story behind the revision history of Go?
18
2014-02-24 05:37:29
<p>I noticed that the first 4 revisions <code>f6182e5abf5e</code>, <code>b66d0bf8da3e</code>, <code>ac3363d7e788</code>, <code>172d32922e72</code> of the Go source are all from long before Golang was even proposed, <a href="https://github.com/golang/go/commit/7d7c6a97f815e9279d08cfaea7d5efb5e90695a8" rel="nofollow nore...
2,805
2,517,719
2017-11-07 20:59:28
21,981,037
21
2014-02-24 07:06:59
6,309
2017-10-26 17:31:32
https://stackoverflow.com/q/21979690
https://stackoverflow.com/a/21981037
<p>That <a href="http://groups.google.com/forum/#!topic/golang-nuts/rCWlhvo9bLM" rel="nofollow noreferrer">thread</a> mentions:</p> <blockquote> <p>Homage, Easter egg, inside joke, take your pick :). Notice the authors of the commits in question too</p> </blockquote> <p>Said thread references <a href="https://gi...
<p>That <a href="http://groups.google.com/forum/#!topic/golang-nuts/rCWlhvo9bLM" rel="nofollow noreferrer">thread</a> mentions:</p> <blockquote> <p>Homage, Easter egg, inside joke, take your pick :). Notice the authors of the commits in question too</p> </blockquote> <p>Said thread references <a href="https://gi...
802, 15627
go, mercurial
<h1>What's the story behind the revision history of Go?</h1> <p>I noticed that the first 4 revisions <code>f6182e5abf5e</code>, <code>b66d0bf8da3e</code>, <code>ac3363d7e788</code>, <code>172d32922e72</code> of the Go source are all from long before Golang was even proposed, <a href="https://github.com/golang/go/commit...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,113
mercurial
# What's the story behind the revision history of Go? I noticed that the first 4 revisions `f6182e5abf5e`, `b66d0bf8da3e`, `ac3363d7e788`, `172d32922e72` of the Go source are all from long before Golang was even proposed, [the oldest being from 1972](https://github.com/golang/go/commit/7d7c6a97f815e9279d08cfaea7d5efb5...
That [thread](http://groups.google.com/forum/#!topic/golang-nuts/rCWlhvo9bLM) mentions: > Homage, Easter egg, inside joke, take your pick :). Notice the authors of the commits in question too Said thread references [this commit](https://github.com/golang/go/commit/7d7c6a97f815e9279d08cfaea7d5efb5e90695a8) as the star...
6005751
How to display current working copy version of an hg repository on a PHP page
16
2011-05-15 00:43:01
<p>I use Mercurial for most of my projects and when I deploy a web site, I simply just do an <code>hg clone</code> on the production server and <code>hg pull -u</code> from there. What I'd like to do is add a small snippet to my site's footer which displays the current revision number (both decimal and hex) as well as ...
10,300
350,278
2012-03-14 19:08:50
6,006,075
21
2011-05-15 02:13:59
8,992
2012-03-14 19:08:50
https://stackoverflow.com/q/6005751
https://stackoverflow.com/a/6006075
<p>You could use a post-update hook to put the information in a file. In the site's <code>.hg/hgrc</code> you'd put something like this:</p> <pre><code>[hooks] post-update = hg id --rev &gt; VERSION ; hg id --id &gt;&gt; VERSION </code></pre> <p>then you can access that file from inside your php. You'll still need ...
<p>You could use a post-update hook to put the information in a file. In the site's <code>.hg/hgrc</code> you'd put something like this:</p> <pre><code>[hooks] post-update = hg id --rev &gt; VERSION ; hg id --id &gt;&gt; VERSION </code></pre> <p>then you can access that file from inside your php. You'll still need ...
5, 802
mercurial, php
<h1>How to display current working copy version of an hg repository on a PHP page</h1> <p>I use Mercurial for most of my projects and when I deploy a web site, I simply just do an <code>hg clone</code> on the production server and <code>hg pull -u</code> from there. What I'd like to do is add a small snippet to my site...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,115
mercurial
# How to display current working copy version of an hg repository on a PHP page I use Mercurial for most of my projects and when I deploy a web site, I simply just do an `hg clone` on the production server and `hg pull -u` from there. What I'd like to do is add a small snippet to my site's footer which displays the cu...
You could use a post-update hook to put the information in a file. In the site's `.hg/hgrc` you'd put something like this: ``` [hooks] post-update = hg id --rev > VERSION ; hg id --id >> VERSION ``` then you can access that file from inside your php. You'll still need to make sure that the user running the `hg pull -...
3992306
Submitting Hg changes back to SVN
16
2010-10-21 21:55:13
<p>I've began work in an SVN repository. I've cloned a subfolder of it into a local Hg repo with <code>hg clone</code>.</p> <p>Afterwards, I wanted to share this with a colleague who does not have access to the SVN repository. I've created a private BitBucket repository, and we occasionally pushed the changes, and hen...
2,579
39,974
2015-08-11 18:17:48
4,004,539
21
2010-10-23 14:47:17
454,556
2010-10-24 20:49:43
https://stackoverflow.com/q/3992306
https://stackoverflow.com/a/4004539
<p>When you use Mercurial on a subversion repository, you have to still think like SVN does, so a lot of features part of the basic mercurial workflow just won't work. Merging the way mercurial does it is impossible on a svn depot. If you have merged your work with the pulled svn branch, you'll get the infamous about m...
<p>When you use Mercurial on a subversion repository, you have to still think like SVN does, so a lot of features part of the basic mercurial workflow just won't work. Merging the way mercurial does it is impossible on a svn depot. If you have merged your work with the pulled svn branch, you'll get the infamous about m...
63, 802, 3346, 34573
dvcs, hgsubversion, mercurial, svn
<h1>Submitting Hg changes back to SVN</h1> <p>I've began work in an SVN repository. I've cloned a subfolder of it into a local Hg repo with <code>hg clone</code>.</p> <p>Afterwards, I wanted to share this with a colleague who does not have access to the SVN repository. I've created a private BitBucket repository, and ...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,116
mercurial
# Submitting Hg changes back to SVN I've began work in an SVN repository. I've cloned a subfolder of it into a local Hg repo with `hg clone`. Afterwards, I wanted to share this with a colleague who does not have access to the SVN repository. I've created a private BitBucket repository, and we occasionally pushed the ...
When you use Mercurial on a subversion repository, you have to still think like SVN does, so a lot of features part of the basic mercurial workflow just won't work. Merging the way mercurial does it is impossible on a svn depot. If you have merged your work with the pulled svn branch, you'll get the infamous about mess...
4015901
Can I include sub-config files in my mercurial .hgrc?
15
2010-10-25 15:05:13
<p>I want to keep my main <code>.hgrc</code> in revision control, because I have a fair amount of customization it in, but I want to have different author names depending on which machine I'm using (work, home, &amp;c.).</p> <p>The way I'd do this in a bash script is to source a host-local bash script that is ignored ...
1,119
23,309
2010-10-25 21:00:13
4,016,310
21
2010-10-25 15:48:01
8,992
2010-10-25 21:00:13
https://stackoverflow.com/q/4015901
https://stackoverflow.com/a/4016310
<p>You can do this using the not-often-used but been-there-awhile include syntax.</p> <p>Put your machine specific stuff in your <code>~/.hgrc</code> and then include a constant-across-all-systems boilerplate config file. Example:</p> <pre><code>[ui] username=You &lt;you@somewhere&gt; %include .hgrc-boilerplate </c...
<p>You can do this using the not-often-used but been-there-awhile include syntax.</p> <p>Put your machine specific stuff in your <code>~/.hgrc</code> and then include a constant-across-all-systems boilerplate config file. Example:</p> <pre><code>[ui] username=You &lt;you@somewhere&gt; %include .hgrc-boilerplate </c...
16, 802, 34046, 54848
dotfiles, hgrc, mercurial, python
<h1>Can I include sub-config files in my mercurial .hgrc?</h1> <p>I want to keep my main <code>.hgrc</code> in revision control, because I have a fair amount of customization it in, but I want to have different author names depending on which machine I'm using (work, home, &amp;c.).</p> <p>The way I'd do this in a bas...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,117
mercurial
# Can I include sub-config files in my mercurial .hgrc? I want to keep my main `.hgrc` in revision control, because I have a fair amount of customization it in, but I want to have different author names depending on which machine I'm using (work, home, &c.). The way I'd do this in a bash script is to source a host-lo...
You can do this using the not-often-used but been-there-awhile include syntax. Put your machine specific stuff in your `~/.hgrc` and then include a constant-across-all-systems boilerplate config file. Example: ``` [ui] username=You <you@somewhere> %include .hgrc-boilerplate ``` Track the .hgrc-boilerplate file in r...
10284208
Getting mercurial "hg commit" to work with Notepad++
14
2012-04-23 16:12:40
<p>I just replaced notepad with notepad++ using <a href="http://www.binaryfortress.com/NotepadReplacer/">NotepadReplacer</a> and now my <code>hg commit</code> isn't working correctly.</p> <p>Before replacing Notepad, <code>hg commit</code> would launch a new text file for me to enter my commit message into. With Notep...
1,887
138,938
2012-04-23 18:45:53
10,286,372
21
2012-04-23 18:45:53
129,782
2012-04-23 18:45:53
https://stackoverflow.com/q/10284208
https://stackoverflow.com/a/10286372
<p>Try placing in your <code>%USERPROFILE%\.hgrc</code> (or <code>%USERPROFILE%\mercurial.ini</code>) something along the lines of:</p> <pre><code>[ui] editor = path/to/notepad++ -multiInst -nosession </code></pre> <p>Perhaps adding a <code>-notabbar</code> after <code>-nosession</code> could prove useful, too.</p>
<p>Try placing in your <code>%USERPROFILE%\.hgrc</code> (or <code>%USERPROFILE%\mercurial.ini</code>) something along the lines of:</p> <pre><code>[ui] editor = path/to/notepad++ -multiInst -nosession </code></pre> <p>Perhaps adding a <code>-notabbar</code> after <code>-nosession</code> could prove useful, too.</p>
802, 3346, 8193
dvcs, mercurial, notepad++
<h1>Getting mercurial "hg commit" to work with Notepad++</h1> <p>I just replaced notepad with notepad++ using <a href="http://www.binaryfortress.com/NotepadReplacer/">NotepadReplacer</a> and now my <code>hg commit</code> isn't working correctly.</p> <p>Before replacing Notepad, <code>hg commit</code> would launch a ne...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,118
mercurial
# Getting mercurial "hg commit" to work with Notepad++ I just replaced notepad with notepad++ using [NotepadReplacer](http://www.binaryfortress.com/NotepadReplacer/) and now my `hg commit` isn't working correctly. Before replacing Notepad, `hg commit` would launch a new text file for me to enter my commit message int...
Try placing in your `%USERPROFILE%\.hgrc` (or `%USERPROFILE%\mercurial.ini`) something along the lines of: ``` [ui] editor = path/to/notepad++ -multiInst -nosession ``` Perhaps adding a `-notabbar` after `-nosession` could prove useful, too.
5807547
Why do I sometimes need to merge after a pull rather than simply updating?
14
2011-04-27 16:40:38
<p>When I first started using hg, update seemed to have an almost magical ability to take newly-pulled changes and integrate them into my local repo. Lately, however, I notice that even if my local changes are non-conflicting with the newly-pulled changes from somewhere else, I always have to merge, resulting in an ext...
4,648
9,279
2019-02-01 07:44:56
5,808,250
21
2011-04-27 17:42:11
8,992
2011-04-27 17:42:11
https://stackoverflow.com/q/5807547
https://stackoverflow.com/a/5808250
<p>The need to merge vs. update isn't about whether or not the changes conflict, it's about whether you have a split in your commit history. If you have a history like this:</p> <pre><code>[A]--[B]--[C]--UNCOMMITTEDCHANGESHERE </code></pre> <p>and you pull down --[D] your uncomitted changes will be combined with D w...
<p>The need to merge vs. update isn't about whether or not the changes conflict, it's about whether you have a split in your commit history. If you have a history like this:</p> <pre><code>[A]--[B]--[C]--UNCOMMITTEDCHANGESHERE </code></pre> <p>and you pull down --[D] your uncomitted changes will be combined with D w...
717, 802
mercurial, merge
<h1>Why do I sometimes need to merge after a pull rather than simply updating?</h1> <p>When I first started using hg, update seemed to have an almost magical ability to take newly-pulled changes and integrate them into my local repo. Lately, however, I notice that even if my local changes are non-conflicting with the n...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,119
mercurial
# Why do I sometimes need to merge after a pull rather than simply updating? When I first started using hg, update seemed to have an almost magical ability to take newly-pulled changes and integrate them into my local repo. Lately, however, I notice that even if my local changes are non-conflicting with the newly-pull...
The need to merge vs. update isn't about whether or not the changes conflict, it's about whether you have a split in your commit history. If you have a history like this: ``` [A]--[B]--[C]--UNCOMMITTEDCHANGESHERE ``` and you pull down --[D] your uncomitted changes will be combined with D when you update. If, however...
11903190
Mercurial : Tag a particular changeset
13
2012-08-10 13:56:07
<p>I want to write an application which identifies the current changesets and tags them. I do know we can get the changeset by using <code>hg identify</code>.</p> <p>Once I get the changeset, is there a way I can tag it?</p> <p>Thanks</p>
5,254
821,282
2012-08-27 19:15:24
11,903,245
21
2012-08-10 13:59:26
null
2012-08-10 13:59:26
https://stackoverflow.com/q/11903190
https://stackoverflow.com/a/11903245
<p>From the <a href="http://www.selenic.com/mercurial/hg.1.html#tag" rel="noreferrer">documentation</a>:</p> <pre><code>hg tag [-f] [-l] [-m TEXT] [-d DATE] [-u USER] [-r REV] NAME... </code></pre> <p>So this should work:</p> <pre><code>$ hg tag -r revision tagname </code></pre>
<p>From the <a href="http://www.selenic.com/mercurial/hg.1.html#tag" rel="noreferrer">documentation</a>:</p> <pre><code>hg tag [-f] [-l] [-m TEXT] [-d DATE] [-u USER] [-r REV] NAME... </code></pre> <p>So this should work:</p> <pre><code>$ hg tag -r revision tagname </code></pre>
115, 802, 20848
changeset, mercurial, tags
<h1>Mercurial : Tag a particular changeset</h1> <p>I want to write an application which identifies the current changesets and tags them. I do know we can get the changeset by using <code>hg identify</code>.</p> <p>Once I get the changeset, is there a way I can tag it?</p> <p>Thanks</p>
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,120
mercurial
# Mercurial : Tag a particular changeset I want to write an application which identifies the current changesets and tags them. I do know we can get the changeset by using `hg identify`. Once I get the changeset, is there a way I can tag it? Thanks
From the [documentation](http://www.selenic.com/mercurial/hg.1.html#tag): ``` hg tag [-f] [-l] [-m TEXT] [-d DATE] [-u USER] [-r REV] NAME... ``` So this should work: ``` $ hg tag -r revision tagname ```
7921030
Combining multiple paths with different fills while still able to stretch uniformly
10
2011-10-27 19:08:33
<p>I'm trying to create a re-sizable drawing from a group of paths I've generated from Adobe Illustrator, but can't figure out how to make it re-sizable and maintain the fills. The original path data is:</p> <pre><code>&lt;Path Fill="#ff221e1f" Data="F1 M 65.778,45.310 L 85.092,45.310 L 85.092,47.630 L 68.504,47.630 L...
11,871
1,017,144
2017-11-24 04:25:24
7,922,383
21
2011-10-27 21:03:18
984,658
2011-10-28 00:04:02
https://stackoverflow.com/q/7921030
https://stackoverflow.com/a/7922383
<p>Group your 4 <code>Paths</code> into a <code>Grid</code> then put that <code>Grid</code> into a <code>Viewbox</code> that should scale the way you want.</p> <pre><code>&lt;Viewbox Stretch="Fill" HorizontalAlignment="Left" Height="125.96" VerticalAlignment="Top" Width="127"&gt; &lt;Grid&gt; &lt;P...
<p>Group your 4 <code>Paths</code> into a <code>Grid</code> then put that <code>Grid</code> into a <code>Viewbox</code> that should scale the way you want.</p> <pre><code>&lt;Viewbox Stretch="Fill" HorizontalAlignment="Left" Height="125.96" VerticalAlignment="Top" Width="127"&gt; &lt;Grid&gt; &lt;P...
378, 32238
pathgeometry, wpf
<h1>Combining multiple paths with different fills while still able to stretch uniformly</h1> <p>I'm trying to create a re-sizable drawing from a group of paths I've generated from Adobe Illustrator, but can't figure out how to make it re-sizable and maintain the fills. The original path data is:</p> <pre><code>&lt;Pat...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,121
mercurial
# Combining multiple paths with different fills while still able to stretch uniformly I'm trying to create a re-sizable drawing from a group of paths I've generated from Adobe Illustrator, but can't figure out how to make it re-sizable and maintain the fills. The original path data is: ``` <Path Fill="#ff221e1f" Data...
Group your 4 `Paths` into a `Grid` then put that `Grid` into a `Viewbox` that should scale the way you want. ``` <Viewbox Stretch="Fill" HorizontalAlignment="Left" Height="125.96" VerticalAlignment="Top" Width="127"> <Grid> <Path Fill="#ff221e1f" Data="F1 M 65.778,45.310 L 85.092,45.310 L 85.092,47...
10545800
clone an hg directory from a particular date
9
2012-05-11 05:15:39
<p>Is there a way to get a copy of a hg repository as it was at a particular date?</p> <p>For example, in subversion I would use:</p> <pre><code>svn checkout -r {2012-04-04} ... </code></pre> <p>And it would check out a revision as it appeared on the fourth of April.</p> <p>In git its a little more complicated, but...
3,191
1,195,996
2013-08-15 09:07:09
10,548,105
21
2012-05-11 08:38:45
351,301
2013-08-15 09:07:09
https://stackoverflow.com/q/10545800
https://stackoverflow.com/a/10548105
<p>(<strong>EDIT:</strong> My love of revsets has caused me to overlook the obvious answer: <code>hg update --date 2012-04-04</code> should get you the tipmost revision as of that date.)</p> <p>If you have the whole repository cloned already (date specifications don't seem to work with <code>clone</code>), you can do<...
<p>(<strong>EDIT:</strong> My love of revsets has caused me to overlook the obvious answer: <code>hg update --date 2012-04-04</code> should get you the tipmost revision as of that date.)</p> <p>If you have the whole repository cloned already (date specifications don't seem to work with <code>clone</code>), you can do<...
802
mercurial
<h1>clone an hg directory from a particular date</h1> <p>Is there a way to get a copy of a hg repository as it was at a particular date?</p> <p>For example, in subversion I would use:</p> <pre><code>svn checkout -r {2012-04-04} ... </code></pre> <p>And it would check out a revision as it appeared on the fourth of Ap...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,122
mercurial
# clone an hg directory from a particular date Is there a way to get a copy of a hg repository as it was at a particular date? For example, in subversion I would use: ``` svn checkout -r {2012-04-04} ... ``` And it would check out a revision as it appeared on the fourth of April. In git its a little more complicat...
(**EDIT:** My love of revsets has caused me to overlook the obvious answer: `hg update --date 2012-04-04` should get you the tipmost revision as of that date.) If you have the whole repository cloned already (date specifications don't seem to work with `clone`), you can do ``` hg update --rev "date('< 2012-04-04')" `...
13549555
Mercurial - how to see the history for a specific line of code
8
2012-11-25 08:46:45
<p>I have a CSS file with thousands of lines of code. I want to see when a specific line/chunk of code was changed, without going back and reviewing each revision that changed this file (that will take a looooong time!)</p> <p>Is there a way, using either TortoiseHg, Eclipse with a Mercurial plugin, or command-line, t...
6,405
354,030
2021-03-24 04:35:11
13,549,925
21
2012-11-25 09:52:55
960,558
2017-11-14 19:52:06
https://stackoverflow.com/q/13549555
https://stackoverflow.com/a/13549925
<p>The correct answer is <code>hg grep</code> (<a href="http://www.selenic.com/mercurial/hg.1.html#grep" rel="noreferrer">Mercurial grep page</a>).</p> <p>More deep: </p> <pre><code>hg grep --all "PATTERN" FILENAME </code></pre> <p>Sample output:</p> <pre><code>&gt;hg grep --all "textdomain" functions.php functions...
<p>The correct answer is <code>hg grep</code> (<a href="http://www.selenic.com/mercurial/hg.1.html#grep" rel="noreferrer">Mercurial grep page</a>).</p> <p>More deep: </p> <pre><code>hg grep --all "PATTERN" FILENAME </code></pre> <p>Sample output:</p> <pre><code>&gt;hg grep --all "textdomain" functions.php functions...
53, 802
eclipse, mercurial
<h1>Mercurial - how to see the history for a specific line of code</h1> <p>I have a CSS file with thousands of lines of code. I want to see when a specific line/chunk of code was changed, without going back and reviewing each revision that changed this file (that will take a looooong time!)</p> <p>Is there a way, usin...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,123
mercurial
# Mercurial - how to see the history for a specific line of code I have a CSS file with thousands of lines of code. I want to see when a specific line/chunk of code was changed, without going back and reviewing each revision that changed this file (that will take a looooong time!) Is there a way, using either Tortois...
The correct answer is `hg grep` ([Mercurial grep page](http://www.selenic.com/mercurial/hg.1.html#grep)). More deep: ``` hg grep --all "PATTERN" FILENAME ``` Sample output: ``` >hg grep --all "textdomain" functions.php functions.php:2:-:load_theme_textdomain('fiver', get_template_directory() . '/translation'); func...
3897695
Google App Engine App.yaml config for skip-files to ignore Mercurial files
8
2010-10-09 20:11:20
<p>I have added a line at the top of skip_files to make app engine deployment skip all files starting with .hg such as the .hgignore file and the .hg directory. Will this ignore the whole .hg directory and all its files and subdirectories?</p> <pre><code>skip_files: - ^(.*/)?\.hg*$ - ^(.*/)?app\.yaml - ^(.*/)?app\.yml...
6,203
416,109
2015-03-31 21:45:29
3,898,760
21
2010-10-10 02:29:41
280,474
2010-10-10 21:16:48
https://stackoverflow.com/q/3897695
https://stackoverflow.com/a/3898760
<p>By <em><a href="http://code.google.com/appengine/docs/python/config/appconfig.html#Skipping_Files" rel="noreferrer">default</a></em> unix style hidden files and folders are skipped. In other words, any file starting with a dot (.) is already skipped. That is what the last line in your list would do if it did not ha...
<p>By <em><a href="http://code.google.com/appengine/docs/python/config/appconfig.html#Skipping_Files" rel="noreferrer">default</a></em> unix style hidden files and folders are skipped. In other words, any file starting with a dot (.) is already skipped. That is what the last line in your list would do if it did not ha...
802, 984, 1852
google-app-engine, mercurial, yaml
<h1>Google App Engine App.yaml config for skip-files to ignore Mercurial files</h1> <p>I have added a line at the top of skip_files to make app engine deployment skip all files starting with .hg such as the .hgignore file and the .hg directory. Will this ignore the whole .hg directory and all its files and subdirectori...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,124
mercurial
# Google App Engine App.yaml config for skip-files to ignore Mercurial files I have added a line at the top of skip_files to make app engine deployment skip all files starting with .hg such as the .hgignore file and the .hg directory. Will this ignore the whole .hg directory and all its files and subdirectories? ``` ...
By *[default](http://code.google.com/appengine/docs/python/config/appconfig.html#Skipping_Files)* unix style hidden files and folders are skipped. In other words, any file starting with a dot (.) is already skipped. That is what the last line in your list would do if it did not have the missing `*` at the end (I assume...
2083393
Mercurial Subrepos - How do you create them and how do they work?
36
2010-01-18 01:19:29
<p><strong>Situation</strong></p> <p>I have two .NET solutions (<code>Foo</code> and <code>Bar</code>) and a common library that contains ProjectA, ProjectB, and ProjectC. <code>Foo</code> and <code>Bar</code> reference one or more library projects, but the library projects are not located within the <code>Foo</code> ...
9,609
129,164
2018-02-22 10:20:39
2,084,046
20
2010-01-18 05:22:46
8,992
2010-01-18 06:02:56
https://stackoverflow.com/q/2083393
https://stackoverflow.com/a/2084046
<p>You could probably try this stuff out and learn it more quickly than writing up your question took, but I'll bite.</p> <blockquote> <p>Can any or all of these steps be executed with TortoiseHG, as of version 0.9.2? If yes, how?</p> </blockquote> <p>TortiseHG doesn't yet put GUI wrappers around sub-repo creat...
<p>You could probably try this stuff out and learn it more quickly than writing up your question took, but I'll bite.</p> <blockquote> <p>Can any or all of these steps be executed with TortoiseHG, as of version 0.9.2? If yes, how?</p> </blockquote> <p>TortiseHG doesn't yet put GUI wrappers around sub-repo creat...
456, 802, 8122, 49387
mercurial, subrepos, tortoisehg, version-control
<h1>Mercurial Subrepos - How do you create them and how do they work?</h1> <p><strong>Situation</strong></p> <p>I have two .NET solutions (<code>Foo</code> and <code>Bar</code>) and a common library that contains ProjectA, ProjectB, and ProjectC. <code>Foo</code> and <code>Bar</code> reference one or more library proj...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,125
mercurial
# Mercurial Subrepos - How do you create them and how do they work? **Situation** I have two .NET solutions (`Foo` and `Bar`) and a common library that contains ProjectA, ProjectB, and ProjectC. `Foo` and `Bar` reference one or more library projects, but the library projects are not located within the `Foo` and `Bar`...
You could probably try this stuff out and learn it more quickly than writing up your question took, but I'll bite. > Can any or all of these steps be > executed with TortoiseHG, as of > version 0.9.2? If yes, how? TortiseHG doesn't yet put GUI wrappers around sub-repo creation, but TortiseHG has always done a great j...
8067084
Find the latest merge point of two branches
23
2011-11-09 15:16:06
<p>Having two branches, how can I find the latest revision(s) where the two branches were merged? Is there a standard Mercurial command to do that?</p> <p>This is the same as question <em><a href="https://stackoverflow.com/questions/4015412/how-to-find-the-common-ancestor-of-two-branches-in-svn">How to find the common...
6,054
85,615
2018-01-05 10:22:31
8,067,899
20
2011-11-09 16:11:11
960,558
2012-01-11 09:11:44
https://stackoverflow.com/q/8067084
https://stackoverflow.com/a/8067899
<pre><code>hg log -r "children(ancestor(default, Cleanup)) and merge()" --template "{rev}\n" </code></pre> <p><strong>is</strong> latest merge for default and Cleanup branches (polished version of Tim Henigan's answer).</p>
<pre><code>hg log -r "children(ancestor(default, Cleanup)) and merge()" --template "{rev}\n" </code></pre> <p><strong>is</strong> latest merge for default and Cleanup branches (polished version of Tim Henigan's answer).</p>
802, 53847
branching-and-merging, mercurial
<h1>Find the latest merge point of two branches</h1> <p>Having two branches, how can I find the latest revision(s) where the two branches were merged? Is there a standard Mercurial command to do that?</p> <p>This is the same as question <em><a href="https://stackoverflow.com/questions/4015412/how-to-find-the-common-an...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,127
mercurial
# Find the latest merge point of two branches Having two branches, how can I find the latest revision(s) where the two branches were merged? Is there a standard Mercurial command to do that? This is the same as question *[How to find the common ancestor of two branches in SVN?](https://stackoverflow.com/questions/401...
``` hg log -r "children(ancestor(default, Cleanup)) and merge()" --template "{rev}\n" ``` **is** latest merge for default and Cleanup branches (polished version of Tim Henigan's answer).
4994765
Is there a command to set the default path in mercurial?
20
2011-02-14 16:48:26
<p><code>hg clone</code> sets up the default path, so that you can pull and push without specifying the url every time.</p> <pre><code>hg clone ssh://hg@bitbucket.org/account/repository </code></pre> <p>But if you have an existing local repository and decide to share it on bitbucket, you won't get the default path se...
10,834
310,121
2020-08-23 01:44:23
4,995,516
20
2011-02-14 17:54:26
8,992
2020-08-23 01:44:23
https://stackoverflow.com/q/4994765
https://stackoverflow.com/a/4995516
<p>There isn't a command for this and there won't be one. One of the times this was suggested the primary author of Mercurial, Matt, <a href="http://twitter.com/#!/mpmselenic/status/8392230762" rel="nofollow noreferrer">tweeted:</a></p> <blockquote> <p>What is it with coders who are intimidated by text-based config fi...
<p>There isn't a command for this and there won't be one. One of the times this was suggested the primary author of Mercurial, Matt, <a href="http://twitter.com/#!/mpmselenic/status/8392230762" rel="nofollow noreferrer">tweeted:</a></p> <blockquote> <p>What is it with coders who are intimidated by text-based config fi...
802, 3070, 6268
default, mercurial, path
<h1>Is there a command to set the default path in mercurial?</h1> <p><code>hg clone</code> sets up the default path, so that you can pull and push without specifying the url every time.</p> <pre><code>hg clone ssh://hg@bitbucket.org/account/repository </code></pre> <p>But if you have an existing local repository and ...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,128
mercurial
# Is there a command to set the default path in mercurial? `hg clone` sets up the default path, so that you can pull and push without specifying the url every time. ``` hg clone ssh://hg@bitbucket.org/account/repository ``` But if you have an existing local repository and decide to share it on bitbucket, you won't g...
There isn't a command for this and there won't be one. One of the times this was suggested the primary author of Mercurial, Matt, [tweeted:](http://twitter.com/#!/mpmselenic/status/8392230762) > What is it with coders who are intimidated by text-based config files? Like doctors that can't stand blood. You can make th...
685151
Completely manual Mercurial merge
19
2009-03-26 10:08:46
<p>Is there any way to take complete manual control over the merge process in Mercurial?</p> <p>I want to be able to choose direction of file-merge, even for files without conflicts. Is that possible?</p>
9,276
35,425
2018-02-05 15:01:37
708,362
20
2009-04-02 05:02:35
8,992
2009-04-02 05:02:35
https://stackoverflow.com/q/685151
https://stackoverflow.com/a/708362
<p>Turn "pre-merge" off in your merge configuration. Then everything counts as a conflict and you can pick "left" or "right" for each and every file change.</p> <pre><code>[merge-tools] mymergetool.premerge = False </code></pre> <p>from <a href="http://www.selenic.com/mercurial/wiki/index.cgi/MergeToolConfiguration"...
<p>Turn "pre-merge" off in your merge configuration. Then everything counts as a conflict and you can pick "left" or "right" for each and every file change.</p> <pre><code>[merge-tools] mymergetool.premerge = False </code></pre> <p>from <a href="http://www.selenic.com/mercurial/wiki/index.cgi/MergeToolConfiguration"...
456, 717, 802
mercurial, merge, version-control
<h1>Completely manual Mercurial merge</h1> <p>Is there any way to take complete manual control over the merge process in Mercurial?</p> <p>I want to be able to choose direction of file-merge, even for files without conflicts. Is that possible?</p>
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,129
mercurial
# Completely manual Mercurial merge Is there any way to take complete manual control over the merge process in Mercurial? I want to be able to choose direction of file-merge, even for files without conflicts. Is that possible?
Turn "pre-merge" off in your merge configuration. Then everything counts as a conflict and you can pick "left" or "right" for each and every file change. ``` [merge-tools] mymergetool.premerge = False ``` from [MergeToolConfiguration on the Mercurial wiki](http://www.selenic.com/mercurial/wiki/index.cgi/MergeToolConf...
9639821
How to solve error message "abort: repository default-push not found! " in Mercurial?
17
2012-03-09 19:27:30
<p>I am new to Mercurial and tried to push a test file to a repository online. I have encountered an error message as <code>abort: repository default-push not found! </code> when I tried to use <code>hg push</code> command. I have searched online and most of the answers mentioned to configure the .hg/hgrc file. I have ...
21,807
922,768
2021-05-06 03:02:58
9,641,271
20
2012-03-09 21:30:40
633,281
2017-06-16 12:34:23
https://stackoverflow.com/q/9639821
https://stackoverflow.com/a/9641271
<p>It seems the <code>.hg/hgrc</code> file doesn't belong to the correct user.</p> <p>The error message says that the file belong to a user names <code>Cassie</code> which is in the <code>Cassie</code> group. You can either use this particular user to do the push or change the ownership of the file with the <code>chow...
<p>It seems the <code>.hg/hgrc</code> file doesn't belong to the correct user.</p> <p>The error message says that the file belong to a user names <code>Cassie</code> which is in the <code>Cassie</code> group. You can either use this particular user to do the push or change the ownership of the file with the <code>chow...
802, 4236, 7330, 34046
hgrc, mercurial, push, repository
<h1>How to solve error message "abort: repository default-push not found! " in Mercurial?</h1> <p>I am new to Mercurial and tried to push a test file to a repository online. I have encountered an error message as <code>abort: repository default-push not found! </code> when I tried to use <code>hg push</code> command. I...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,130
mercurial
# How to solve error message "abort: repository default-push not found! " in Mercurial? I am new to Mercurial and tried to push a test file to a repository online. I have encountered an error message as `abort: repository default-push not found!` when I tried to use `hg push` command. I have searched online and most o...
It seems the `.hg/hgrc` file doesn't belong to the correct user. The error message says that the file belong to a user names `Cassie` which is in the `Cassie` group. You can either use this particular user to do the push or change the ownership of the file with the `chown` command. To know which user "you are", you ca...
7568693
How can one change the name of a tag?
17
2011-09-27 11:56:30
<p>I have made a tag in mercurial:</p> <pre><code>hg tag release_123 </code></pre> <p>Later on I found out that the name was wrong, it should be <code>release_124</code>. Is it possible to simply rename the tag or do I have to create a new one?</p>
8,298
172,265
2021-01-04 08:29:49
7,568,992
20
2011-09-27 12:19:47
204,723
2021-01-04 08:29:49
https://stackoverflow.com/q/7568693
https://stackoverflow.com/a/7568992
<p>I would do it by removing the tag and then adding a new tag with the new name</p> <p>The <a href="https://www.mercurial-scm.org/wiki/Tag" rel="nofollow noreferrer">Mercurial tag wiki</a> explains how to remove a tag:</p> <blockquote> <h1>How do I remove a tag?</h1> <p>Either by</p> <ul> <li><code>hg tag --remove tag...
<p>I would do it by removing the tag and then adding a new tag with the new name</p> <p>The <a href="https://www.mercurial-scm.org/wiki/Tag" rel="nofollow noreferrer">Mercurial tag wiki</a> explains how to remove a tag:</p> <blockquote> <h1>How do I remove a tag?</h1> <p>Either by</p> <ul> <li><code>hg tag --remove tag...
802
mercurial
<h1>How can one change the name of a tag?</h1> <p>I have made a tag in mercurial:</p> <pre><code>hg tag release_123 </code></pre> <p>Later on I found out that the name was wrong, it should be <code>release_124</code>. Is it possible to simply rename the tag or do I have to create a new 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,131
mercurial
# How can one change the name of a tag? I have made a tag in mercurial: ``` hg tag release_123 ``` Later on I found out that the name was wrong, it should be `release_124`. Is it possible to simply rename the tag or do I have to create a new one?
I would do it by removing the tag and then adding a new tag with the new name The [Mercurial tag wiki](https://www.mercurial-scm.org/wiki/Tag) explains how to remove a tag: > # How do I remove a tag? > > Either by > > - `hg tag --remove tagname` > > (this being the nearest equivalent to `cvs tag -d`) > > - adding `ta...
960701
How can I always know about all tags in Mercurial?
16
2009-06-06 22:27:13
<p>I don't use Mercurial, but i'd like to start, so i'm reading about it. The only SCM system i've used extensively is CVS. Most of what i've read about Mercurial makes sense, and sounds good. But i'm alternately shocked and perplexed by that way it does tags.</p> <p>A tag is just a nickname for a changeset (and by 'c...
3,956
116,639
2012-01-31 22:15:15
962,066
20
2009-06-07 15:11:01
110,204
2009-06-07 15:11:01
https://stackoverflow.com/q/960701
https://stackoverflow.com/a/962066
<p>Versioning the <code>.hgtags</code> file allows you to</p> <ul> <li>edit tags and see who edited them (and why if they left a proper commit message)</li> <li>transfer tags between repositories using the normal mechanisms</li> </ul> <p>However, there are some confusion going on here.</p> <ul> <li><p>You write that...
<p>Versioning the <code>.hgtags</code> file allows you to</p> <ul> <li>edit tags and see who edited them (and why if they left a proper commit message)</li> <li>transfer tags between repositories using the normal mechanisms</li> </ul> <p>However, there are some confusion going on here.</p> <ul> <li><p>You write that...
115, 802, 3346
dvcs, mercurial, tags
<h1>How can I always know about all tags in Mercurial?</h1> <p>I don't use Mercurial, but i'd like to start, so i'm reading about it. The only SCM system i've used extensively is CVS. Most of what i've read about Mercurial makes sense, and sounds good. But i'm alternately shocked and perplexed by that way it does tags....
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,132
mercurial
# How can I always know about all tags in Mercurial? I don't use Mercurial, but i'd like to start, so i'm reading about it. The only SCM system i've used extensively is CVS. Most of what i've read about Mercurial makes sense, and sounds good. But i'm alternately shocked and perplexed by that way it does tags. A tag i...
Versioning the `.hgtags` file allows you to - edit tags and see who edited them (and why if they left a proper commit message) - transfer tags between repositories using the normal mechanisms However, there are some confusion going on here. - You write that > [...] And if i then update to that tagged changeset at...
8220558
Mercurial: How do I find the most recent revision that includes a specific file, if possible?
13
2011-11-22 00:40:49
<p>I have a file that's been modified recently. Rather than looking into each revision, is there an easier way to find out, in Mercurial, in which revision the file was last modified? Thanks.</p> <p>Note that I am using command line in Linux.</p>
3,252
338,961
2012-01-19 09:52:30
8,220,756
20
2011-11-22 01:07:59
233,201
2011-11-22 01:07:59
https://stackoverflow.com/q/8220558
https://stackoverflow.com/a/8220756
<p>This will give you the last time a change was made to a particular file (increase 1 to N to see last N changes):</p> <p><code>hg log -l 1 ./path/to/file</code></p>
<p>This will give you the last time a change was made to a particular file (increase 1 to N to see last N changes):</p> <p><code>hg log -l 1 ./path/to/file</code></p>
58, 802
linux, mercurial
<h1>Mercurial: How do I find the most recent revision that includes a specific file, if possible?</h1> <p>I have a file that's been modified recently. Rather than looking into each revision, is there an easier way to find out, in Mercurial, in which revision the file was last modified? Thanks.</p> <p>Note that I am us...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,133
mercurial
# Mercurial: How do I find the most recent revision that includes a specific file, if possible? I have a file that's been modified recently. Rather than looking into each revision, is there an easier way to find out, in Mercurial, in which revision the file was last modified? Thanks. Note that I am using command line...
This will give you the last time a change was made to a particular file (increase 1 to N to see last N changes): `hg log -l 1 ./path/to/file`
7362564
Windows & Mercurial change cases of class names
13
2011-09-09 13:44:01
<p>I have inherited a Java project which includes a number of classes that are not named according to the UpperCamelCase naming convention. </p> <p>This is particularly the case with abbreviations (e.g. HTMLButton rather than HtmlButton). Whilst I know there are some differences of opinion on the use of CamelCase with...
1,852
898,763
2011-09-09 14:33:16
7,363,133
20
2011-09-09 14:23:47
14,731
2011-09-09 14:33:16
https://stackoverflow.com/q/7362564
https://stackoverflow.com/a/7363133
<p>If you do:</p> <pre><code>hg rename foo bar hg rename bar Foo </code></pre> <p>You don't need to actually commit and push until the end. In other words, your repository won't be aware of this Windows-specific workaround.</p> <p>Another option is to rename the file in Windows, then invoke:</p> <pre><code>hg renam...
<p>If you do:</p> <pre><code>hg rename foo bar hg rename bar Foo </code></pre> <p>You don't need to actually commit and push until the end. In other words, your repository won't be aware of this Windows-specific workaround.</p> <p>Another option is to rename the file in Windows, then invoke:</p> <pre><code>hg renam...
17, 64, 802, 7028, 9708
case-sensitive, java, mercurial, naming-conventions, windows
<h1>Windows & Mercurial change cases of class names</h1> <p>I have inherited a Java project which includes a number of classes that are not named according to the UpperCamelCase naming convention. </p> <p>This is particularly the case with abbreviations (e.g. HTMLButton rather than HtmlButton). Whilst I know there are...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,134
mercurial
# Windows & Mercurial change cases of class names I have inherited a Java project which includes a number of classes that are not named according to the UpperCamelCase naming convention. This is particularly the case with abbreviations (e.g. HTMLButton rather than HtmlButton). Whilst I know there are some differences...
If you do: ``` hg rename foo bar hg rename bar Foo ``` You don't need to actually commit and push until the end. In other words, your repository won't be aware of this Windows-specific workaround. Another option is to rename the file in Windows, then invoke: ``` hg rename foo Foo --after ``` to notify Mercurial of...
4264227
hg forget recursive
13
2010-11-24 07:02:14
<p>is there a quick way to do a recursive</p> <pre><code>hg forget </code></pre> <p>on a folder? I accidentally versioned things i don't want</p>
3,974
230,473
2010-11-24 07:09:04
4,264,262
20
2010-11-24 07:09:04
251,311
2010-11-24 07:09:04
https://stackoverflow.com/q/4264227
https://stackoverflow.com/a/4264262
<p>What about</p> <pre><code>hg forget directory/* </code></pre> <p>?</p>
<p>What about</p> <pre><code>hg forget directory/* </code></pre> <p>?</p>
802
mercurial
<h1>hg forget recursive</h1> <p>is there a quick way to do a recursive</p> <pre><code>hg forget </code></pre> <p>on a folder? I accidentally versioned things i don't want</p>
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,135
mercurial
# hg forget recursive is there a quick way to do a recursive ``` hg forget ``` on a folder? I accidentally versioned things i don't want
What about ``` hg forget directory/* ``` ?
1867237
Load multiple .hgrc files - ie, some with machine-specific settings?
12
2009-12-08 14:15:30
<p>I'd like to keep two ~/.hgrc files: ~/.hgrc and ~/.hgrc.local – one with "standard" settings (eg, <code>username</code>), the other with machine-specific settings (eg, setting a graphical merge tool).</p> <p>How can I do this with hg?</p> <p>For example, this is how I do it with Vim:</p> <pre><code># ~/.vimrc syn...
2,042
71,522
2009-12-16 10:40:23
1,868,920
20
2009-12-08 18:27:52
8,992
2009-12-12 21:52:03
https://stackoverflow.com/q/1867237
https://stackoverflow.com/a/1868920
<p>There's a not-often used <code>%include</code> directive in mercurial 1.3 and later:</p> <p>From <code>man hgrc</code>:</p> <pre><code> A line of the form %include file will include file into the current configuration file. The inclusion is recursive, which means that included files can includ...
<p>There's a not-often used <code>%include</code> directive in mercurial 1.3 and later:</p> <p>From <code>man hgrc</code>:</p> <pre><code> A line of the form %include file will include file into the current configuration file. The inclusion is recursive, which means that included files can includ...
802, 34046
hgrc, mercurial
<h1>Load multiple .hgrc files - ie, some with machine-specific settings?</h1> <p>I'd like to keep two ~/.hgrc files: ~/.hgrc and ~/.hgrc.local – one with "standard" settings (eg, <code>username</code>), the other with machine-specific settings (eg, setting a graphical merge tool).</p> <p>How can I do this with hg?</p>...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,136
mercurial
# Load multiple .hgrc files - ie, some with machine-specific settings? I'd like to keep two ~/.hgrc files: ~/.hgrc and ~/.hgrc.local – one with "standard" settings (eg, `username`), the other with machine-specific settings (eg, setting a graphical merge tool). How can I do this with hg? For example, this is how I do...
There's a not-often used `%include` directive in mercurial 1.3 and later: From `man hgrc`: ``` A line of the form %include file will include file into the current configuration file. The inclusion is recursive, which means that included files can include other files. Filenames are relative to th...
39746
TortoiseHg in Vista 64-bit not showing the context menu
12
2008-09-02 15:06:17
<p>I installed TortoiseHg (Mercurial) in my Vista 64-bit and the context menu is not showing up when I right click a file or folder. Is there any workaround for this problem?</p>
6,128
4,264
2014-05-20 20:33:10
224,136
20
2008-10-22 01:15:20
30,198
2009-07-04 16:41:37
https://stackoverflow.com/q/39746
https://stackoverflow.com/a/224136
<p>Update: TortoiseHg 0.8 (released 2009-07-01) now includes both 32 and 64 bit shell extensions in the installer, and also works with Windows 7. The workaround described below is no longer necessary.</p> <hr> <p>A workaround to getting the context menus in Windows Explorer is buried in the TortoiseHg development mai...
<p>Update: TortoiseHg 0.8 (released 2009-07-01) now includes both 32 and 64 bit shell extensions in the installer, and also works with Windows 7. The workaround described below is no longer necessary.</p> <hr> <p>A workaround to getting the context menus in Windows Explorer is buried in the TortoiseHg development mai...
802, 2846, 8122
mercurial, tortoisehg, vista64
<h1>TortoiseHg in Vista 64-bit not showing the context menu</h1> <p>I installed TortoiseHg (Mercurial) in my Vista 64-bit and the context menu is not showing up when I right click a file or folder. Is there any workaround for this problem?</p>
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,137
mercurial
# TortoiseHg in Vista 64-bit not showing the context menu I installed TortoiseHg (Mercurial) in my Vista 64-bit and the context menu is not showing up when I right click a file or folder. Is there any workaround for this problem?
Update: TortoiseHg 0.8 (released 2009-07-01) now includes both 32 and 64 bit shell extensions in the installer, and also works with Windows 7. The workaround described below is no longer necessary. --- A workaround to getting the context menus in Windows Explorer is buried in the TortoiseHg development mailing list a...
4205185
When using Mercurial HG, how to just get the latest code?
23
2010-11-17 14:09:04
<p>I am new to Mercurial HG. My friends created a repo and I am going to use it. I installed TortoiseHG and trying to get the latest code. I found that when using Clone operation, it will pull all code to my local, including the histories (Am I right?). This is not needed for me. I just wanna get the latest code. Is t...
15,113
155,547
2020-09-23 13:41:52
4,205,246
19
2010-11-17 14:16:52
71,522
2010-11-19 15:03:47
https://stackoverflow.com/q/4205185
https://stackoverflow.com/a/4205246
<p>In short, no.</p> <p>In a bit longer: Mercurial doesn't yet support “shallow” clones where you only get part of the history. So each time you clone you pull in the entire repository with all changesets.</p> <p>Additionally, unlike Subversion, there is no way to make a “narrow” clone where you only checkout a porti...
<p>In short, no.</p> <p>In a bit longer: Mercurial doesn't yet support “shallow” clones where you only get part of the history. So each time you clone you pull in the entire repository with all changesets.</p> <p>Additionally, unlike Subversion, there is no way to make a “narrow” clone where you only checkout a porti...
802
mercurial
<h1>When using Mercurial HG, how to just get the latest code?</h1> <p>I am new to Mercurial HG. My friends created a repo and I am going to use it. I installed TortoiseHG and trying to get the latest code. I found that when using Clone operation, it will pull all code to my local, including the histories (Am I right?)...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,139
mercurial
# When using Mercurial HG, how to just get the latest code? I am new to Mercurial HG. My friends created a repo and I am going to use it. I installed TortoiseHG and trying to get the latest code. I found that when using Clone operation, it will pull all code to my local, including the histories (Am I right?). This is ...
In short, no. In a bit longer: Mercurial doesn't yet support “shallow” clones where you only get part of the history. So each time you clone you pull in the entire repository with all changesets. Additionally, unlike Subversion, there is no way to make a “narrow” clone where you only checkout a portion of a repositor...
8360471
How to enable Mercurial extensions (such as mq)?
20
2011-12-02 17:52:11
<p>I have installed Mercurial from the Ubuntu package repository. However I don't know how to enable extensions (<code>q*</code> commands). How should I do that? The help shows that </p> <pre><code>enabled extensions: style (no help text available) </code></pre> <p>I want to enable mq and hgk.</p>
12,563
859,227
2016-01-19 20:39:06
8,360,505
19
2011-12-02 17:55:20
139,010
2011-12-02 18:00:46
https://stackoverflow.com/q/8360471
https://stackoverflow.com/a/8360505
<p>Enable extensions in <code>hgrc</code>.</p> <blockquote> <h3>extensions</h3> <p>Mercurial has an extension mechanism for adding new features. To enable an extension, create an entry for it in this section.</p> <p>If you know that the extension is already in Python's search path, you can give the nam...
<p>Enable extensions in <code>hgrc</code>.</p> <blockquote> <h3>extensions</h3> <p>Mercurial has an extension mechanism for adding new features. To enable an extension, create an entry for it in this section.</p> <p>If you know that the extension is already in Python's search path, you can give the nam...
802, 32068, 62895
mercurial, mercurial-extension, mercurial-queue
<h1>How to enable Mercurial extensions (such as mq)?</h1> <p>I have installed Mercurial from the Ubuntu package repository. However I don't know how to enable extensions (<code>q*</code> commands). How should I do that? The help shows that </p> <pre><code>enabled extensions: style (no help text available) </code></pr...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,140
mercurial
# How to enable Mercurial extensions (such as mq)? I have installed Mercurial from the Ubuntu package repository. However I don't know how to enable extensions (`q*` commands). How should I do that? The help shows that ``` enabled extensions: style (no help text available) ``` I want to enable mq and hgk.
Enable extensions in `hgrc`. > ### extensions > > Mercurial has an extension mechanism for adding new features. To > enable an extension, create an entry for it in this section. > > If you know that the extension is already in Python's search path, you > can give the name of the module, followed by `=`, with nothing a...
9589955
Easy, painless way to test new mercurial hooks (that are works in progress)
17
2012-03-06 18:47:52
<p>I'm in the process of writing a mercurial changegroup hook. I don't have everything figured out yet, but the process of trial and error is made more painful by the fact that I have to keep committing and pushing just to test my work in progress. </p> <p>Is there any way to 'fake' a trigger to execute my changegroup...
1,952
114,203
2012-04-02 18:18:45
9,593,414
19
2012-03-06 23:11:58
110,204
2012-03-08 07:29:18
https://stackoverflow.com/q/9589955
https://stackoverflow.com/a/9593414
<p>I'm afraid there's no built-in debugging capabilities for this. What I do when writing a hook is to setup two local repositories:</p> <pre><code>$ hg init repo $ hg clone repo clone </code></pre> <p>and then configure the <code>changegroup</code> hook in <code>repo</code>. Now go into <code>clone</code> and do</p>...
<p>I'm afraid there's no built-in debugging capabilities for this. What I do when writing a hook is to setup two local repositories:</p> <pre><code>$ hg init repo $ hg clone repo clone </code></pre> <p>and then configure the <code>changegroup</code> hook in <code>repo</code>. Now go into <code>clone</code> and do</p>...
16, 802, 61928
mercurial, mercurial-hook, python
<h1>Easy, painless way to test new mercurial hooks (that are works in progress)</h1> <p>I'm in the process of writing a mercurial changegroup hook. I don't have everything figured out yet, but the process of trial and error is made more painful by the fact that I have to keep committing and pushing just to test my work...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,141
mercurial
# Easy, painless way to test new mercurial hooks (that are works in progress) I'm in the process of writing a mercurial changegroup hook. I don't have everything figured out yet, but the process of trial and error is made more painful by the fact that I have to keep committing and pushing just to test my work in progr...
I'm afraid there's no built-in debugging capabilities for this. What I do when writing a hook is to setup two local repositories: ``` $ hg init repo $ hg clone repo clone ``` and then configure the `changegroup` hook in `repo`. Now go into `clone` and do ``` $ echo a > a $ hg add a $ hg commit -m 'a file' ``` to se...
3637496
How can I ignore all directories except one using .hgignore?
17
2010-09-03 15:58:48
<p>I'm managing $HOME using Mercurial, to keep my dotfiles nice and tracked, or at least the ones that matter to me.</p> <p>However, there's a profusion of files and directories in ~ that do not need to be tracked, and that set is ever-changing and ever-growing.</p> <p>Historically, I've dealt with this by having thi...
7,491
23,309
2010-09-03 20:09:54
3,639,040
19
2010-09-03 19:41:05
351,301
2010-09-03 19:47:57
https://stackoverflow.com/q/3637496
https://stackoverflow.com/a/3639040
<p>Try this in <code>.hgignore</code> instead:</p> <pre><code>syntax: regexp ^(?!(scripts|foo|bar)/)[^/]+/ </code></pre> <ul> <li><code>^</code> matches start of path</li> <li><code>(?!(scripts|foo|bar)</code> uses negative lookahead to ignore all files except those in directories <code>scripts</code>, <code>foo</co...
<p>Try this in <code>.hgignore</code> instead:</p> <pre><code>syntax: regexp ^(?!(scripts|foo|bar)/)[^/]+/ </code></pre> <ul> <li><code>^</code> matches start of path</li> <li><code>(?!(scripts|foo|bar)</code> uses negative lookahead to ignore all files except those in directories <code>scripts</code>, <code>foo</co...
802, 31419
hgignore, mercurial
<h1>How can I ignore all directories except one using .hgignore?</h1> <p>I'm managing $HOME using Mercurial, to keep my dotfiles nice and tracked, or at least the ones that matter to me.</p> <p>However, there's a profusion of files and directories in ~ that do not need to be tracked, and that set is ever-changing and ...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,142
mercurial
# How can I ignore all directories except one using .hgignore? I'm managing $HOME using Mercurial, to keep my dotfiles nice and tracked, or at least the ones that matter to me. However, there's a profusion of files and directories in ~ that do not need to be tracked, and that set is ever-changing and ever-growing. H...
Try this in `.hgignore` instead: ``` syntax: regexp ^(?!(scripts|foo|bar)/)[^/]+/ ``` - `^` matches start of path - `(?!(scripts|foo|bar)` uses negative lookahead to ignore all files except those in directories `scripts`, `foo` or `bar` - `/)` ensures that directories which have a tracked directory as a prefix are i...
3026351
Mercurial: Recommended way of sending a whole repository to someone
17
2010-06-11 21:24:55
<p>I have done some programming and I have used Mercurial for source control. I now need to send all of my code to someone else (because they are going to take over).</p> <p>Since all copies of a mercurial repository is a full and real repository my first thought is to first do a clone of my repository without an upda...
3,226
39,321
2019-11-04 13:43:37
3,027,017
19
2010-06-12 00:30:17
256,362
2017-06-20 11:55:17
https://stackoverflow.com/q/3026351
https://stackoverflow.com/a/3027017
<p>What you've suggested will work fine, but you can also use <code>hg bundle</code> to create a changegroup file encapsulating a compressed copy of the entire repository (see <code>hg help bundle</code> for the full details, or this page: <a href="http://www.selenic.com/mercurial/hg.1.html#bundle" rel="nofollow norefe...
<p>What you've suggested will work fine, but you can also use <code>hg bundle</code> to create a changegroup file encapsulating a compressed copy of the entire repository (see <code>hg help bundle</code> for the full details, or this page: <a href="http://www.selenic.com/mercurial/hg.1.html#bundle" rel="nofollow norefe...
802, 4167
export, mercurial
<h1>Mercurial: Recommended way of sending a whole repository to someone</h1> <p>I have done some programming and I have used Mercurial for source control. I now need to send all of my code to someone else (because they are going to take over).</p> <p>Since all copies of a mercurial repository is a full and real reposi...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,143
mercurial
# Mercurial: Recommended way of sending a whole repository to someone I have done some programming and I have used Mercurial for source control. I now need to send all of my code to someone else (because they are going to take over). Since all copies of a mercurial repository is a full and real repository my first th...
What you've suggested will work fine, but you can also use `hg bundle` to create a changegroup file encapsulating a compressed copy of the entire repository (see `hg help bundle` for the full details, or this page: <http://www.selenic.com/mercurial/hg.1.html#bundle>). On your machine: ``` hg -R /path/to/repo bundle -...
8621874
Mercurial, how to tag old version of files
16
2011-12-24 00:37:45
<p>I forgot to tag and older version of my files with a release tag. The older version is at r13, latest is about r65. I cloned the latest repository to a new directory, did an "hg update -r13" to get the older code I wanted to tag, then did the tag command, but got the message:</p> <p>abort: not at a branch head (u...
2,667
258,526
2017-06-16 12:27:57
8,621,951
19
2011-12-24 00:57:31
432,745
2017-06-16 12:27:57
https://stackoverflow.com/q/8621874
https://stackoverflow.com/a/8621951
<p>I guess you can still do the tagging right in the repo without updating yourself to a particular revision.</p> <blockquote> <p>hg tag -r 13 tagname</p> </blockquote> <p>See the details at <a href="https://www.mercurial-scm.org/wiki/Tag" rel="nofollow noreferrer">Mercurial wiki</a>.</p> <p>I tried testing it :</...
<p>I guess you can still do the tagging right in the repo without updating yourself to a particular revision.</p> <blockquote> <p>hg tag -r 13 tagname</p> </blockquote> <p>See the details at <a href="https://www.mercurial-scm.org/wiki/Tag" rel="nofollow noreferrer">Mercurial wiki</a>.</p> <p>I tried testing it :</...
802, 1097
mercurial, tagging
<h1>Mercurial, how to tag old version of files</h1> <p>I forgot to tag and older version of my files with a release tag. The older version is at r13, latest is about r65. I cloned the latest repository to a new directory, did an "hg update -r13" to get the older code I wanted to tag, then did the tag command, but got...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,144
mercurial
# Mercurial, how to tag old version of files I forgot to tag and older version of my files with a release tag. The older version is at r13, latest is about r65. I cloned the latest repository to a new directory, did an "hg update -r13" to get the older code I wanted to tag, then did the tag command, but got the messag...
I guess you can still do the tagging right in the repo without updating yourself to a particular revision. > hg tag -r 13 tagname See the details at [Mercurial wiki](https://www.mercurial-scm.org/wiki/Tag). I tried testing it : ``` temp $ hg init . temp $ touch a.txt temp $ hg add a.txt temp $ hg commit -m "added ...
5169670
Use of Mercurial hg bundle and hg export vs merging?
15
2011-03-02 15:28:19
<p>When exactly would you use <code>hg export</code> and <code>hg bundle</code>?</p> <p>These commands are listed on the Mercurial quick start <a href="http://ivy.fr/mercurial/ref/v1.0/Mercurial-QuickStart-v1.0-120dpi.png" rel="noreferrer">guide</a> but we're not clear when to use them.</p> <p>Currently we manage dev...
7,356
47,281
2011-03-02 16:36:57
5,170,529
19
2011-03-02 16:36:57
8,992
2011-03-02 16:36:57
https://stackoverflow.com/q/5169670
https://stackoverflow.com/a/5170529
<p>The primary difference is whether or not the parent changeset exists in the destination repository. If for example your source repo has this:</p> <pre><code>[A]--[B]---[C] </code></pre> <p>and your destination has this:</p> <pre><code>[A]--[B] </code></pre> <p>and you want to send [C] you could use bundle (or j...
<p>The primary difference is whether or not the parent changeset exists in the destination repository. If for example your source repo has this:</p> <pre><code>[A]--[B]---[C] </code></pre> <p>and your destination has this:</p> <pre><code>[A]--[B] </code></pre> <p>and you want to send [C] you could use bundle (or j...
717, 802
mercurial, merge
<h1>Use of Mercurial hg bundle and hg export vs merging?</h1> <p>When exactly would you use <code>hg export</code> and <code>hg bundle</code>?</p> <p>These commands are listed on the Mercurial quick start <a href="http://ivy.fr/mercurial/ref/v1.0/Mercurial-QuickStart-v1.0-120dpi.png" rel="noreferrer">guide</a> but we'...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,145
mercurial
# Use of Mercurial hg bundle and hg export vs merging? When exactly would you use `hg export` and `hg bundle`? These commands are listed on the Mercurial quick start [guide](http://ivy.fr/mercurial/ref/v1.0/Mercurial-QuickStart-v1.0-120dpi.png) but we're not clear when to use them. Currently we manage dev by having ...
The primary difference is whether or not the parent changeset exists in the destination repository. If for example your source repo has this: ``` [A]--[B]---[C] ``` and your destination has this: ``` [A]--[B] ``` and you want to send [C] you could use bundle (or just push/pull). If, however, your destination repos...
4156094
Splitting files in Mercurial and retaining history on both sides
14
2010-11-11 15:32:19
<p>I need to split a number of files and I'm looking for options to retain the full file history in the split-off files.</p> <p><strong>Background...</strong></p> <p>I've inherited a project containing lots of Oracle PL/SQL packages with the package spec and the package body all stored in a single ".sql" file. I'd pr...
1,547
4,003
2017-03-23 11:34:49
4,156,146
19
2010-11-11 15:37:50
364,327
2010-11-11 15:49:48
https://stackoverflow.com/q/4156094
https://stackoverflow.com/a/4156146
<p>Splitting files can be modelled by <code>hg rename</code> and <code>hg copy</code> to retain the history:</p> <pre><code>hg copy myfile.sql myfile.pks hg rename myfile.sql myfile.pkb </code></pre> <p>The edit the *.pks and *.pkb file to remove the half that doesn't belong there.</p> <p>After the edit commit it ...
<p>Splitting files can be modelled by <code>hg rename</code> and <code>hg copy</code> to retain the history:</p> <pre><code>hg copy myfile.sql myfile.pks hg rename myfile.sql myfile.pkb </code></pre> <p>The edit the *.pks and *.pkb file to remove the half that doesn't belong there.</p> <p>After the edit commit it ...
802, 2148
mercurial, plsql
<h1>Splitting files in Mercurial and retaining history on both sides</h1> <p>I need to split a number of files and I'm looking for options to retain the full file history in the split-off files.</p> <p><strong>Background...</strong></p> <p>I've inherited a project containing lots of Oracle PL/SQL packages with the pa...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,146
mercurial
# Splitting files in Mercurial and retaining history on both sides I need to split a number of files and I'm looking for options to retain the full file history in the split-off files. **Background...** I've inherited a project containing lots of Oracle PL/SQL packages with the package spec and the package body all ...
Splitting files can be modelled by `hg rename` and `hg copy` to retain the history: ``` hg copy myfile.sql myfile.pks hg rename myfile.sql myfile.pkb ``` The edit the *.pks and *.pkb file to remove the half that doesn't belong there. After the edit commit it all. To see the copies and renames you have to use git ...
50223
How to repeatedly merge branches in Mercurial
14
2008-09-08 17:27:16
<p>We're using Mercurial where I work and I want to have a setup similar to how I used SVN:</p> <ul> <li>Trunk</li> <li>Tags <ul> <li>Production</li> </ul></li> <li>Branches</li> </ul> <p>Since Mercurial supports branches natively, I know how to create a named branch, but I can't find any documentation on how to rep...
5,472
956
2008-09-08 19:26:01
50,475
19
2008-09-08 19:26:01
3,462
2008-09-08 19:26:01
https://stackoverflow.com/q/50223
https://stackoverflow.com/a/50475
<p>As the previous poster mentioned, the transplant extension can be used for cherry-picking individual changes from one branch to another. If, however, you always want to pull <em>all</em> the latest changes, the <code>hg merge</code> command will get you there.</p> <p>The simplest case is when you're using clones t...
<p>As the previous poster mentioned, the transplant extension can be used for cherry-picking individual changes from one branch to another. If, however, you always want to pull <em>all</em> the latest changes, the <code>hg merge</code> command will get you there.</p> <p>The simplest case is when you're using clones t...
456, 802
mercurial, version-control
<h1>How to repeatedly merge branches in Mercurial</h1> <p>We're using Mercurial where I work and I want to have a setup similar to how I used SVN:</p> <ul> <li>Trunk</li> <li>Tags <ul> <li>Production</li> </ul></li> <li>Branches</li> </ul> <p>Since Mercurial supports branches natively, I know how to create a 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,147
mercurial
# How to repeatedly merge branches in Mercurial We're using Mercurial where I work and I want to have a setup similar to how I used SVN: - Trunk - Tags - Production - Branches Since Mercurial supports branches natively, I know how to create a named branch, but I can't find any documentation on how to repeatedly me...
As the previous poster mentioned, the transplant extension can be used for cherry-picking individual changes from one branch to another. If, however, you always want to pull *all* the latest changes, the `hg merge` command will get you there. The simplest case is when you're using clones to implement branching (since ...
32623680
How to list all tags in a certain Mercurial branch?
13
2015-09-17 06:16:49
<p>Is it possible to list the tags only on a certain branch? (from command line preferably)</p> <p>For example:</p> <pre><code>$ hg branch test1 ... (make some commits) $ hg tag mytag_on_test1_branch $ hg branch test2 ... (make some commits) $ hg tag mytag_on_test2_branch ... (make some commits) $ hg tag mytag_on_te...
8,772
593,487
2015-09-17 13:33:46
32,624,071
19
2015-09-17 06:46:09
2,611,159
2015-09-17 13:33:46
https://stackoverflow.com/q/32623680
https://stackoverflow.com/a/32624071
<p>Like so often, the answer lies in the proper use of revsets; they are a powerful tool to limit the revision ranges to nearly whatever need. See <code>hg help revsets</code> for details.</p> <p>In your case we also make use of the output templating to only get shown the tags instead of full log output of those revi...
<p>Like so often, the answer lies in the proper use of revsets; they are a powerful tool to limit the revision ranges to nearly whatever need. See <code>hg help revsets</code> for details.</p> <p>In your case we also make use of the output templating to only get shown the tags instead of full log output of those revi...
802
mercurial
<h1>How to list all tags in a certain Mercurial branch?</h1> <p>Is it possible to list the tags only on a certain branch? (from command line preferably)</p> <p>For example:</p> <pre><code>$ hg branch test1 ... (make some commits) $ hg tag mytag_on_test1_branch $ hg branch test2 ... (make some commits) $ hg tag mytag...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,148
mercurial
# How to list all tags in a certain Mercurial branch? Is it possible to list the tags only on a certain branch? (from command line preferably) For example: ``` $ hg branch test1 ... (make some commits) $ hg tag mytag_on_test1_branch $ hg branch test2 ... (make some commits) $ hg tag mytag_on_test2_branch ... (make ...
Like so often, the answer lies in the proper use of revsets; they are a powerful tool to limit the revision ranges to nearly whatever need. See `hg help revsets` for details. In your case we also make use of the output templating to only get shown the tags instead of full log output of those revisions. Thus if you nee...
7282684
Automatically close Redmine Task with commit comment
12
2011-09-02 11:22:18
<p>There is a feature (associated revisions) in Redmine to link commits with tasks with specific keywords typed in comment on commit:</p> <blockquote> <p>Default keywords are:</p> <pre><code>* for referencing issues: refs, references, IssueID * for fixing issues: fixes, closes </code></pre> </blockquote> <p><a hre...
8,333
883,931
2015-02-04 19:36:20
7,292,711
19
2011-09-03 10:57:39
63,733
2011-09-03 11:05:27
https://stackoverflow.com/q/7282684
https://stackoverflow.com/a/7292711
<p>Log in as an admin and go to <em>Settings -> Repositories -> Referencing and fixing issues in commit messages</em>:</p> <p><img src="https://i.sstatic.net/qOzv5.png" alt="redmine settings"></p> <p>Make sure that:</p> <ul> <li>you have a status defined in the dropdown <em>applied status</em></li> <li>you're using ...
<p>Log in as an admin and go to <em>Settings -> Repositories -> Referencing and fixing issues in commit messages</em>:</p> <p><img src="https://i.sstatic.net/qOzv5.png" alt="redmine settings"></p> <p>Make sure that:</p> <ul> <li>you have a status defined in the dropdown <em>applied status</em></li> <li>you're using ...
802, 12495, 33953
mercurial, redmine, visual-studio
<h1>Automatically close Redmine Task with commit comment</h1> <p>There is a feature (associated revisions) in Redmine to link commits with tasks with specific keywords typed in comment on commit:</p> <blockquote> <p>Default keywords are:</p> <pre><code>* for referencing issues: refs, references, IssueID * for fixin...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,151
mercurial
# Automatically close Redmine Task with commit comment There is a feature (associated revisions) in Redmine to link commits with tasks with specific keywords typed in comment on commit: > Default keywords are: > > ``` > * for referencing issues: refs, references, IssueID > * for fixing issues: fixes, closes > ``` <h...
Log in as an admin and go to *Settings -> Repositories -> Referencing and fixing issues in commit messages*: ![redmine settings](https://i.sstatic.net/qOzv5.png) Make sure that: - you have a status defined in the dropdown *applied status* - you're using the correct keywords in your commit messages The following exa...
3298236
How to push code to multiple servers by Mercurial?
12
2010-07-21 10:25:46
<p>How can we push code to multiple servers? We have many servers which needs to have the same copy of the code. It is difficult to push to individual server. I know mercurial has hooks but none of them gives a proper solution.</p>
3,114
367,097
2013-11-10 00:04:32
3,298,493
19
2010-07-21 11:02:40
47,860
2013-11-10 00:04:32
https://stackoverflow.com/q/3298236
https://stackoverflow.com/a/3298493
<p>In your central server you create a <a href="http://hgbook.red-bean.com/read/handling-repository-events-with-hooks.html" rel="noreferrer">changegroup</a> hook.</p> <p>So your central server would have the following hgrc:</p> <pre><code>[paths] server2=http://server2 server3=http://server3 [hooks] changegroup.serve...
<p>In your central server you create a <a href="http://hgbook.red-bean.com/read/handling-repository-events-with-hooks.html" rel="noreferrer">changegroup</a> hook.</p> <p>So your central server would have the following hgrc:</p> <pre><code>[paths] server2=http://server2 server3=http://server3 [hooks] changegroup.serve...
802
mercurial
<h1>How to push code to multiple servers by Mercurial?</h1> <p>How can we push code to multiple servers? We have many servers which needs to have the same copy of the code. It is difficult to push to individual server. I know mercurial has hooks but none of them gives a proper solution.</p>
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,152
mercurial
# How to push code to multiple servers by Mercurial? How can we push code to multiple servers? We have many servers which needs to have the same copy of the code. It is difficult to push to individual server. I know mercurial has hooks but none of them gives a proper solution.
In your central server you create a [changegroup](http://hgbook.red-bean.com/read/handling-repository-events-with-hooks.html) hook. So your central server would have the following hgrc: ``` [paths] server2=http://server2 server3=http://server3 [hooks] changegroup.server2 = hg push -f server2 changegroup.server3 = hg ...
2395179
How to make mercurial ignore all hidden files?
12
2010-03-07 04:26:48
<p>I hate seeing nearly every directory in my repository list each file twice, once with a dot in front of it and once without. I tried adding <code>.*</code> to my .hgignore file, but it has no effect. Is this the wrong syntax, and more importantly, is it a bad idea to try this in the first place? Thanks.</p>
4,603
null
2016-04-05 17:47:44
2,396,964
19
2010-03-07 16:27:54
8,992
2010-03-07 16:27:54
https://stackoverflow.com/q/2395179
https://stackoverflow.com/a/2396964
<p>You've got almost the right answer in the comments from gavinb, but the match was a little to broad. However, key concept about ignoring after the face was provided by RogerPage, again in a comment (what's with everyone preferring comments to answers?).</p> <p>Let's look at these nine files:</p> <pre><code>dir.wi...
<p>You've got almost the right answer in the comments from gavinb, but the match was a little to broad. However, key concept about ignoring after the face was provided by RogerPage, again in a comment (what's with everyone preferring comments to answers?).</p> <p>Let's look at these nine files:</p> <pre><code>dir.wi...
802, 3346, 3889, 31419
dvcs, glob, hgignore, mercurial
<h1>How to make mercurial ignore all hidden files?</h1> <p>I hate seeing nearly every directory in my repository list each file twice, once with a dot in front of it and once without. I tried adding <code>.*</code> to my .hgignore file, but it has no effect. Is this the wrong syntax, and more importantly, is it a bad i...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,153
mercurial
# How to make mercurial ignore all hidden files? I hate seeing nearly every directory in my repository list each file twice, once with a dot in front of it and once without. I tried adding `.*` to my .hgignore file, but it has no effect. Is this the wrong syntax, and more importantly, is it a bad idea to try this in t...
You've got almost the right answer in the comments from gavinb, but the match was a little to broad. However, key concept about ignoring after the face was provided by RogerPage, again in a comment (what's with everyone preferring comments to answers?). Let's look at these nine files: ``` dir.with.dots/file.with.dots...
3950792
How to deal with committer name change in Mercurial
11
2010-10-16 21:05:54
<p>I have a project in Mercurial with a group of committers. Unfortunately, some of the committers has changed names several times, e.g. first it was "nickname", and then it became "Name Surname ", and then something else.</p> <p>Most of the repository analysis tools expect committer to have same name over the course ...
1,840
6,533
2018-02-22 10:52:09
3,950,827
19
2010-10-16 21:14:46
167,958
2018-02-22 10:52:09
https://stackoverflow.com/q/3950792
https://stackoverflow.com/a/3950827
<p>Yes, it's possible. Use the <a href="https://www.mercurial-scm.org/wiki/ConvertExtension" rel="nofollow noreferrer">Convert extension</a> and then <code>hg convert</code> from the repository with the bad names to the new repository with the good names and use an authormap. There are many things you can accomplish ...
<p>Yes, it's possible. Use the <a href="https://www.mercurial-scm.org/wiki/ConvertExtension" rel="nofollow noreferrer">Convert extension</a> and then <code>hg convert</code> from the repository with the bad names to the new repository with the good names and use an authormap. There are many things you can accomplish ...
456, 802
mercurial, version-control
<h1>How to deal with committer name change in Mercurial</h1> <p>I have a project in Mercurial with a group of committers. Unfortunately, some of the committers has changed names several times, e.g. first it was "nickname", and then it became "Name Surname ", and then something else.</p> <p>Most of the repository analy...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,154
mercurial
# How to deal with committer name change in Mercurial I have a project in Mercurial with a group of committers. Unfortunately, some of the committers has changed names several times, e.g. first it was "nickname", and then it became "Name Surname ", and then something else. Most of the repository analysis tools expect...
Yes, it's possible. Use the [Convert extension](https://www.mercurial-scm.org/wiki/ConvertExtension) and then `hg convert` from the repository with the bad names to the new repository with the good names and use an authormap. There are many things you can accomplish using the convert extension and converting from Mercu...
12372647
TortoiseHG : Removing commit
10
2012-09-11 14:58:42
<p>I've accidentally committed bunch of files locally, but didn't pushed. So basically what I want to do is to remove this my commit, then push some other changes.</p> <p>I can remove the commit by Backout-ing, then I've to commit locally so it is actually removed locally.</p> <p>So my question is following, if I do ...
16,865
426,305
2018-02-22 12:18:36
12,374,750
19
2012-09-11 17:17:25
63,147
2018-02-22 12:18:36
https://stackoverflow.com/q/12372647
https://stackoverflow.com/a/12374750
<p>It sounds like <a href="https://www.mercurial-scm.org/repo/hg/help/rollback" rel="nofollow noreferrer"><code>hg rollback</code></a> is the command you want.</p> <p><a href="https://www.mercurial-scm.org/repo/hg/help/backout" rel="nofollow noreferrer"><code>hg backout &lt;REV&gt;</code></a> creates a new commit that...
<p>It sounds like <a href="https://www.mercurial-scm.org/repo/hg/help/rollback" rel="nofollow noreferrer"><code>hg rollback</code></a> is the command you want.</p> <p><a href="https://www.mercurial-scm.org/repo/hg/help/backout" rel="nofollow noreferrer"><code>hg backout &lt;REV&gt;</code></a> creates a new commit that...
802, 8122
mercurial, tortoisehg
<h1>TortoiseHG : Removing commit</h1> <p>I've accidentally committed bunch of files locally, but didn't pushed. So basically what I want to do is to remove this my commit, then push some other changes.</p> <p>I can remove the commit by Backout-ing, then I've to commit locally so it is actually removed locally.</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,155
mercurial
# TortoiseHG : Removing commit I've accidentally committed bunch of files locally, but didn't pushed. So basically what I want to do is to remove this my commit, then push some other changes. I can remove the commit by Backout-ing, then I've to commit locally so it is actually removed locally. So my question is foll...
It sounds like [`hg rollback`](https://www.mercurial-scm.org/repo/hg/help/rollback) is the command you want. [`hg backout <REV>`](https://www.mercurial-scm.org/repo/hg/help/backout) creates a new commit that reverses the changes made in `<REV>`. Both the original commit and the backout commit will remain in your histo...
1968847
Committing only some files in Mercurial
10
2009-12-28 10:28:42
<p>Many times I'm making two different changes to files in my repository, I want those changes to be treated as two consecutive commits.</p> <p>For example, in repository</p> <ul> <li>prog.c</li> <li>prog.h</li> <li>README.txt</li> </ul> <p>While fixing a bug <code>prog.c</code> and <code>prog.h</code>, I fixed a ty...
5,397
55,094
2017-04-15 16:37:12
1,968,856
19
2009-12-28 10:31:30
219,183
2009-12-28 16:50:10
https://stackoverflow.com/q/1968847
https://stackoverflow.com/a/1968856
<pre><code>hg commit -m "bug #1234" prog.c prog.h </code></pre> <p>then</p> <pre><code>hg commit -m "some typos fixed" README.txt </code></pre>
<pre><code>hg commit -m "bug #1234" prog.c prog.h </code></pre> <p>then</p> <pre><code>hg commit -m "some typos fixed" README.txt </code></pre>
456, 802
mercurial, version-control
<h1>Committing only some files in Mercurial</h1> <p>Many times I'm making two different changes to files in my repository, I want those changes to be treated as two consecutive commits.</p> <p>For example, in repository</p> <ul> <li>prog.c</li> <li>prog.h</li> <li>README.txt</li> </ul> <p>While fixing a bug <code>pr...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,156
mercurial
# Committing only some files in Mercurial Many times I'm making two different changes to files in my repository, I want those changes to be treated as two consecutive commits. For example, in repository - prog.c - prog.h - README.txt While fixing a bug `prog.c` and `prog.h`, I fixed a typo in `README.txt`. Now I wa...
``` hg commit -m "bug #1234" prog.c prog.h ``` then ``` hg commit -m "some typos fixed" README.txt ```
1625660
Can Mercurial merge a named-branch that isn't a head?
7
2009-10-26 16:08:02
<p>Basically, I have dev branch, and what I like to do is to create a feature branch while I implement something, and then merge it back. So situations like the following occurs</p> <pre><code> a b c d - dev / e f - feature </code></pre> <p>Since dev isn't a head, is it still possible to bring dev up to feature s...
1,447
45,144
2009-10-27 13:10:25
1,627,090
19
2009-10-26 20:15:58
13,498
2009-10-26 20:15:58
https://stackoverflow.com/q/1625660
https://stackoverflow.com/a/1627090
<p>Carl Meyer is right. You're thinking as a git user, and Mercurial handles things differently.</p> <p>You could do what Carl suggested and just force the next commit to be on the dev branch. I'd personally find this rather confusing if I saw it though, since there would be a discontinuity in the dev branch.</p> <...
<p>Carl Meyer is right. You're thinking as a git user, and Mercurial handles things differently.</p> <p>You could do what Carl suggested and just force the next commit to be on the dev branch. I'd personally find this rather confusing if I saw it though, since there would be a discontinuity in the dev branch.</p> <...
717, 802, 1879
branch, mercurial, merge
<h1>Can Mercurial merge a named-branch that isn't a head?</h1> <p>Basically, I have dev branch, and what I like to do is to create a feature branch while I implement something, and then merge it back. So situations like the following occurs</p> <pre><code> a b c d - dev / e f - feature </code></pre> <p>Since dev ...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,158
mercurial
# Can Mercurial merge a named-branch that isn't a head? Basically, I have dev branch, and what I like to do is to create a feature branch while I implement something, and then merge it back. So situations like the following occurs ``` a b c d - dev / e f - feature ``` Since dev isn't a head, is it still possibl...
Carl Meyer is right. You're thinking as a git user, and Mercurial handles things differently. You could do what Carl suggested and just force the next commit to be on the dev branch. I'd personally find this rather confusing if I saw it though, since there would be a discontinuity in the dev branch. The way I'd handl...
4296636
List remote branches in Mercurial
32
2010-11-28 12:03:07
<p>Is there a way to list remote branches in Mercurial like there in Git?</p> <pre><code>git branch -r </code></pre> <p>I want to list the branches on a remote machine (e.g. Bitbucket), so using:</p> <pre><code>hg branches -R `hg showconfig paths.default` --color false </code></pre> <p>fails with abort: repository ...
28,443
5,160
2019-06-27 21:12:58
4,344,621
18
2010-12-03 10:29:30
479,048
2017-06-19 11:26:48
https://stackoverflow.com/q/4296636
https://stackoverflow.com/a/4344621
<p>No, it is not possible to list branches of a remote repository without cloning it to local.</p> <p>If there is SSH access to the machine having the remote repository, then Mercurial could be used directly: <code>ssh server hg -R path/to/repo branches</code>.</p> <p>If the repository is served with hgweb, then a li...
<p>No, it is not possible to list branches of a remote repository without cloning it to local.</p> <p>If there is SSH access to the machine having the remote repository, then Mercurial could be used directly: <code>ssh server hg -R path/to/repo branches</code>.</p> <p>If the repository is served with hgweb, then a li...
802, 1879
branch, mercurial
<h1>List remote branches in Mercurial</h1> <p>Is there a way to list remote branches in Mercurial like there in Git?</p> <pre><code>git branch -r </code></pre> <p>I want to list the branches on a remote machine (e.g. Bitbucket), so using:</p> <pre><code>hg branches -R `hg showconfig paths.default` --color false </co...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,159
mercurial
# List remote branches in Mercurial Is there a way to list remote branches in Mercurial like there in Git? ``` git branch -r ``` I want to list the branches on a remote machine (e.g. Bitbucket), so using: ``` hg branches -R `hg showconfig paths.default` --color false ``` fails with abort: repository not local
No, it is not possible to list branches of a remote repository without cloning it to local. If there is SSH access to the machine having the remote repository, then Mercurial could be used directly: `ssh server hg -R path/to/repo branches`. If the repository is served with hgweb, then a list of branches can be fetche...
20895469
Adding pinch zoom to a UICollectionView
31
2014-01-03 02:20:45
<h1>Intro</h1> <p>I'm going to describe the effect I want to achieve, and then I'll give detail on how I'm currently trying to implement this and what's wrong with its behaviour as it stands. I'll also mention another approach I've looked at but couldn't make work at all.</p> <p>The most relevant code is inline at th...
17,695
2,547,229
2016-11-20 23:29:35
20,996,509
18
2014-01-08 13:05:21
2,547,229
2014-01-08 13:05:21
https://stackoverflow.com/q/20895469
https://stackoverflow.com/a/20996509
<h2>The good bit – how to make it work</h2> <p>Some very minor tweaks to the above code have resolved <strong>What Doesn't Work 1</strong> &amp; <strong>What Doesn't Work 2</strong> in the question.</p> <p>I have added the following lines in to the <code>viewDidLoad</code> method of my <code>UICollectionViewControlle...
<h2>The good bit – how to make it work</h2> <p>Some very minor tweaks to the above code have resolved <strong>What Doesn't Work 1</strong> &amp; <strong>What Doesn't Work 2</strong> in the question.</p> <p>I have added the following lines in to the <code>viewDidLoad</code> method of my <code>UICollectionViewControlle...
58338, 76984, 77205, 84213, 87486
ios, pinchzoom, uicollectionview, uicollectionviewlayout, uipinchgesturerecognizer
<h1>Adding pinch zoom to a UICollectionView</h1> <h1>Intro</h1> <p>I'm going to describe the effect I want to achieve, and then I'll give detail on how I'm currently trying to implement this and what's wrong with its behaviour as it stands. I'll also mention another approach I've looked at but couldn't make work at al...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,160
mercurial
# Adding pinch zoom to a UICollectionView # Intro I'm going to describe the effect I want to achieve, and then I'll give detail on how I'm currently trying to implement this and what's wrong with its behaviour as it stands. I'll also mention another approach I've looked at but couldn't make work at all. The most rel...
## The good bit – how to make it work Some very minor tweaks to the above code have resolved **What Doesn't Work 1** & **What Doesn't Work 2** in the question. I have added the following lines in to the `viewDidLoad` method of my `UICollectionViewController`: ``` [collectionView setMinimumZoomScale: 0.25]; [collecti...
2963250
How to remove accidental branch in TortoiseHg?
22
2010-06-03 04:03:05
<p>(I am a relative newcomer to TortoiseHg, so bear with me :-) I use TortoiseHg on two machines to talk to my remote source repository. I made changes on one machine, committed them, and attempted to push them to the remote repository BUT I forgot to first do a pull to get the latest code first. The push gave me a few...
32,365
115,690
2016-11-11 09:30:46
2,963,290
18
2010-06-03 04:17:56
56,338
2010-06-03 04:17:56
https://stackoverflow.com/q/2963250
https://stackoverflow.com/a/2963290
<p>First make sure you have committed all your local changes. Then merge the branches by calling <code>hg merge</code> and commit the result.</p> <p>This should bring you back to a single branch, reuniting the two heads.</p>
<p>First make sure you have committed all your local changes. Then merge the branches by calling <code>hg merge</code> and commit the result.</p> <p>This should bring you back to a single branch, reuniting the two heads.</p>
802, 8122
mercurial, tortoisehg
<h1>How to remove accidental branch in TortoiseHg?</h1> <p>(I am a relative newcomer to TortoiseHg, so bear with me :-) I use TortoiseHg on two machines to talk to my remote source repository. I made changes on one machine, committed them, and attempted to push them to the remote repository BUT I forgot to first do a p...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,161
mercurial
# How to remove accidental branch in TortoiseHg? (I am a relative newcomer to TortoiseHg, so bear with me :-) I use TortoiseHg on two machines to talk to my remote source repository. I made changes on one machine, committed them, and attempted to push them to the remote repository BUT I forgot to first do a pull to ge...
First make sure you have committed all your local changes. Then merge the branches by calling `hg merge` and commit the result. This should bring you back to a single branch, reuniting the two heads.
2371330
What is the correct way to handle nested Hg repositories with Mercurial/TortoiseHg?
22
2010-03-03 12:53:31
<p>I'm struggling on how to correctly track nested repositories using TortoiseHg.</p> <p>I have a main repository that tracks my whole project. This project contains several little plugins that are stored inside a plugins/ subdirectory.</p> <p>I would love to track each plugin independently (committing and pushing to...
10,836
285,283
2010-03-05 11:51:26
2,386,433
18
2010-03-05 11:51:26
285,283
2010-03-05 11:51:26
https://stackoverflow.com/q/2371330
https://stackoverflow.com/a/2386433
<p>I've finally managed to make it work the way I'd love. I'm using TortoiseHg on winXP, so I won't be able to tell you what hg calls were internally made, but I don't think anything fancy is used here.</p> <p>I started with an existing repo, inside which I had a <code>plugins/</code> directory filled with <code>plugi...
<p>I've finally managed to make it work the way I'd love. I'm using TortoiseHg on winXP, so I won't be able to tell you what hg calls were internally made, but I don't think anything fancy is used here.</p> <p>I started with an existing repo, inside which I had a <code>plugins/</code> directory filled with <code>plugi...
802, 8122, 49387
mercurial, subrepos, tortoisehg
<h1>What is the correct way to handle nested Hg repositories with Mercurial/TortoiseHg?</h1> <p>I'm struggling on how to correctly track nested repositories using TortoiseHg.</p> <p>I have a main repository that tracks my whole project. This project contains several little plugins that are stored inside a plugins/ sub...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,162
mercurial
# What is the correct way to handle nested Hg repositories with Mercurial/TortoiseHg? I'm struggling on how to correctly track nested repositories using TortoiseHg. I have a main repository that tracks my whole project. This project contains several little plugins that are stored inside a plugins/ subdirectory. I wo...
I've finally managed to make it work the way I'd love. I'm using TortoiseHg on winXP, so I won't be able to tell you what hg calls were internally made, but I don't think anything fancy is used here. I started with an existing repo, inside which I had a `plugins/` directory filled with `plugin1/`, `plugin/2` directori...
4372103
mercurial -- "merge" by abandoning one changeset
21
2010-12-06 23:43:41
<p>I have two heads, let's call them "A" (the good head) and "B" (the bad head). I want to merge them by taking everything from A and nothing from B. Basically, my merge of A and B is A.</p> <p>When I try hg merge, it starts asking me about this file and that, and inevitably I get into trouble. I don't want any of ...
4,665
246,568
2016-06-09 06:54:02
4,373,415
18
2010-12-07 04:33:00
142,074
2010-12-07 04:33:00
https://stackoverflow.com/q/4372103
https://stackoverflow.com/a/4373415
<p>One thing I came across and started using recently on some personal repos was just using the close-branch switch with commit. e.g.</p> <pre><code>$ hg update B $ hg commit --close-branch -m "Abandoning branch" </code></pre> <p>In my reasoning, if you're blowing away one branch in favor of the other entirely, it's ...
<p>One thing I came across and started using recently on some personal repos was just using the close-branch switch with commit. e.g.</p> <pre><code>$ hg update B $ hg commit --close-branch -m "Abandoning branch" </code></pre> <p>In my reasoning, if you're blowing away one branch in favor of the other entirely, it's ...
717, 802
mercurial, merge
<h1>mercurial -- "merge" by abandoning one changeset</h1> <p>I have two heads, let's call them "A" (the good head) and "B" (the bad head). I want to merge them by taking everything from A and nothing from B. Basically, my merge of A and B is A.</p> <p>When I try hg merge, it starts asking me about this file and that...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,163
mercurial
# mercurial -- "merge" by abandoning one changeset I have two heads, let's call them "A" (the good head) and "B" (the bad head). I want to merge them by taking everything from A and nothing from B. Basically, my merge of A and B is A. When I try hg merge, it starts asking me about this file and that, and inevitably I...
One thing I came across and started using recently on some personal repos was just using the close-branch switch with commit. e.g. ``` $ hg update B $ hg commit --close-branch -m "Abandoning branch" ``` In my reasoning, if you're blowing away one branch in favor of the other entirely, it's simply not a merge and it's...
4788898
Mercurial commandline: How to show changes of a specific revision?
20
2011-01-25 00:45:04
<p>After I pull a new head into my repository, I want to see what <strong>files</strong> are touched by the new head. Like an <code>hg status</code> but without changing over to it. I don't want the whole diff, just an overview.</p> <p>Which I expect is a specific version of the more general question: how do i see a...
14,691
75,033
2012-03-26 18:55:20
4,793,664
18
2011-01-25 12:45:33
110,204
2012-03-26 18:55:20
https://stackoverflow.com/q/4788898
https://stackoverflow.com/a/4793664
<p>The status command shows you which files are changed. Use</p> <pre><code>hg status --rev .:tip </code></pre> <p>to compare the working copy parent revision (the currently checked out revision) with the tip revision.</p> <p>If you've pulled more than one changeset, then this is different from</p> <pre><code>hg st...
<p>The status command shows you which files are changed. Use</p> <pre><code>hg status --rev .:tip </code></pre> <p>to compare the working copy parent revision (the currently checked out revision) with the tip revision.</p> <p>If you've pulled more than one changeset, then this is different from</p> <pre><code>hg st...
802
mercurial
<h1>Mercurial commandline: How to show changes of a specific revision?</h1> <p>After I pull a new head into my repository, I want to see what <strong>files</strong> are touched by the new head. Like an <code>hg status</code> but without changing over to it. I don't want the whole diff, just an overview.</p> <p>Which...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,164
mercurial
# Mercurial commandline: How to show changes of a specific revision? After I pull a new head into my repository, I want to see what **files** are touched by the new head. Like an `hg status` but without changing over to it. I don't want the whole diff, just an overview. Which I expect is a specific version of the mor...
The status command shows you which files are changed. Use ``` hg status --rev .:tip ``` to compare the working copy parent revision (the currently checked out revision) with the tip revision. If you've pulled more than one changeset, then this is different from ``` hg status --change tip ``` That command only show...
2591276
Branching and remote heads in Mercurial
20
2010-04-07 09:29:00
<p>I created a new branch using this command:</p> <pre><code>hg branch new_branch </code></pre> <p>After the first commit to the new branch, the default branch becomes inactive. If this is pushed the central repository will have only one head which belongs to the new branch.</p> <p>When my colleague pushes his comm...
4,753
84,952
2019-07-31 22:40:38
2,591,777
18
2010-04-07 10:57:37
310,500
2011-10-19 21:48:52
https://stackoverflow.com/q/2591276
https://stackoverflow.com/a/2591777
<p>Remote heads are bad because you’re basically pushing the effort of merging onto another person. This message is there to prevent people from accidentally introducing remote heads, telling them to merge first before pushing.</p> <p>In this case though, you have created a named branch, meaning you intentionally intr...
<p>Remote heads are bad because you’re basically pushing the effort of merging onto another person. This message is there to prevent people from accidentally introducing remote heads, telling them to merge first before pushing.</p> <p>In this case though, you have created a named branch, meaning you intentionally intr...
802, 1879
branch, mercurial
<h1>Branching and remote heads in Mercurial</h1> <p>I created a new branch using this command:</p> <pre><code>hg branch new_branch </code></pre> <p>After the first commit to the new branch, the default branch becomes inactive. If this is pushed the central repository will have only one head which belongs to the new ...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,165
mercurial
# Branching and remote heads in Mercurial I created a new branch using this command: ``` hg branch new_branch ``` After the first commit to the new branch, the default branch becomes inactive. If this is pushed the central repository will have only one head which belongs to the new branch. When my colleague pushes ...
Remote heads are bad because you’re basically pushing the effort of merging onto another person. This message is there to prevent people from accidentally introducing remote heads, telling them to merge first before pushing. In this case though, you have created a named branch, meaning you intentionally introduce and ...
18119315
What parts of a Xamarin solution should be kept out of the repository?
18
2013-08-08 06:31:28
<p>I'm working with a designer on a Xamarin.Android application and we are having trouble keeping in sync. We use Mercurial, but my question should be as relevant for Git or any other DVCS. My .hgignore file looks like this:</p> <pre><code>^bin/ ^obj/ ^Components/ \.keystore$ </code></pre> <p>I am unsure about these ...
7,309
96,944
2013-08-08 13:06:26
18,126,862
18
2013-08-08 13:06:26
267
2013-08-08 13:06:26
https://stackoverflow.com/q/18119315
https://stackoverflow.com/a/18126862
<p>To answer your question, you're wondering about this:</p> <pre><code>^Resources/Resource.designer.cs \.sln$ \.userprefs$ \.csproj$ </code></pre> <p>The <code>Resource.designer.cs</code> file should definitely not be ignored. Sure, it'll get regenerated in some cases, especially if you alter the resx file it is gen...
<p>To answer your question, you're wondering about this:</p> <pre><code>^Resources/Resource.designer.cs \.sln$ \.userprefs$ \.csproj$ </code></pre> <p>The <code>Resource.designer.cs</code> file should definitely not be ignored. Sure, it'll get regenerated in some cases, especially if you alter the resx file it is gen...
456, 802, 3346, 54681, 80035
dvcs, mercurial, version-control, xamarin, xamarin.android
<h1>What parts of a Xamarin solution should be kept out of the repository?</h1> <p>I'm working with a designer on a Xamarin.Android application and we are having trouble keeping in sync. We use Mercurial, but my question should be as relevant for Git or any other DVCS. My .hgignore file looks like this:</p> <pre><code...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,166
mercurial
# What parts of a Xamarin solution should be kept out of the repository? I'm working with a designer on a Xamarin.Android application and we are having trouble keeping in sync. We use Mercurial, but my question should be as relevant for Git or any other DVCS. My .hgignore file looks like this: ``` ^bin/ ^obj/ ^Compon...
To answer your question, you're wondering about this: ``` ^Resources/Resource.designer.cs \.sln$ \.userprefs$ \.csproj$ ``` The `Resource.designer.cs` file should definitely not be ignored. Sure, it'll get regenerated in some cases, especially if you alter the resx file it is generated from, but just committing it to...
4457538
Does a mercurial subrepository have to be a subdirectory of the main repository?
18
2010-12-16 04:51:16
<p>My project is made up of code in the following locations</p> <pre><code>C:\Dev\ProjectA C:\Lib\LibraryB C:\Lib\LibraryC </code></pre> <p>Presently each of these folders is a completely independent Mercurial repository. Project A changes all the time, Library B and Library C change rarely.</p> <p>I currently tag e...
3,740
60,004
2018-02-22 11:57:14
4,459,853
18
2010-12-16 10:42:50
52,626
2018-02-22 11:57:14
https://stackoverflow.com/q/4457538
https://stackoverflow.com/a/4459853
<blockquote> <p>If Library B and C must be subdirectories of Project A what do I do if I want to start a Project D that uses Library B but isn't otherwise affiliated with Project A at all?</p> </blockquote> <p>Any project can exist both independently <em>and</em> as subrepository of another project at the sa...
<blockquote> <p>If Library B and C must be subdirectories of Project A what do I do if I want to start a Project D that uses Library B but isn't otherwise affiliated with Project A at all?</p> </blockquote> <p>Any project can exist both independently <em>and</em> as subrepository of another project at the sa...
802, 49387
mercurial, subrepos
<h1>Does a mercurial subrepository have to be a subdirectory of the main repository?</h1> <p>My project is made up of code in the following locations</p> <pre><code>C:\Dev\ProjectA C:\Lib\LibraryB C:\Lib\LibraryC </code></pre> <p>Presently each of these folders is a completely independent Mercurial repository. Projec...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,167
mercurial
# Does a mercurial subrepository have to be a subdirectory of the main repository? My project is made up of code in the following locations ``` C:\Dev\ProjectA C:\Lib\LibraryB C:\Lib\LibraryC ``` Presently each of these folders is a completely independent Mercurial repository. Project A changes all the time, Library...
> If Library B and C must be > subdirectories of Project A what do I > do if I want to start a Project D that > uses Library B but isn't otherwise > affiliated with Project A at all? Any project can exist both independently *and* as subrepository of another project at the same time. I'll explain by suggesting a workfl...
4805098
How to commit empty folders to a Mercurial repository?
17
2011-01-26 13:31:21
<p>I noticed that TortoiseHg doesn't commit empty folders. How to fix that?</p>
5,700
48,465
2022-12-08 07:46:11
4,805,119
18
2011-01-26 13:33:18
289,466
2012-10-23 06:16:36
https://stackoverflow.com/q/4805098
https://stackoverflow.com/a/4805119
<p>This is usually done by adding a hidden file in the folder (starting with a dot, like <code>.hidden</code>).</p>
<p>This is usually done by adding a hidden file in the folder (starting with a dot, like <code>.hidden</code>).</p>
218, 802, 8122
directory, mercurial, tortoisehg
<h1>How to commit empty folders to a Mercurial repository?</h1> <p>I noticed that TortoiseHg doesn't commit empty folders. How to fix that?</p>
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,168
mercurial
# How to commit empty folders to a Mercurial repository? I noticed that TortoiseHg doesn't commit empty folders. How to fix that?
This is usually done by adding a hidden file in the folder (starting with a dot, like `.hidden`).
3423122
hg transplant fails - how do I 'fix up the merge' as it suggests?
17
2010-08-06 10:59:31
<p>My branch2274 was branched from default. Rev. 415 was the first commit and it shares an ancestor with the rev. 412 on the default branch.</p> <p>Branch2274 is a bug fix which needs merging into default soon BUT I did a very silly thing - I merged in changes from a feature branch (at rev. 418)</p> <p>In simple term...
4,849
104,189
2015-08-19 08:55:37
3,428,222
18
2010-08-06 22:24:35
104,189
2010-08-06 22:24:35
https://stackoverflow.com/q/3423122
https://stackoverflow.com/a/3428222
<p>In the interests of not leaving a question unanswered (!), I managed to resolve this and the ultimate answer is that there's no simple way to resolve it automatically. Transplant deals in patches, differences between two files but doesn't take into account the common ancestry of the two files so struggles to know wh...
<p>In the interests of not leaving a question unanswered (!), I managed to resolve this and the ultimate answer is that there's no simple way to resolve it automatically. Transplant deals in patches, differences between two files but doesn't take into account the common ancestry of the two files so struggles to know wh...
802
mercurial
<h1>hg transplant fails - how do I 'fix up the merge' as it suggests?</h1> <p>My branch2274 was branched from default. Rev. 415 was the first commit and it shares an ancestor with the rev. 412 on the default branch.</p> <p>Branch2274 is a bug fix which needs merging into default soon BUT I did a very silly thing - I m...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,169
mercurial
# hg transplant fails - how do I 'fix up the merge' as it suggests? My branch2274 was branched from default. Rev. 415 was the first commit and it shares an ancestor with the rev. 412 on the default branch. Branch2274 is a bug fix which needs merging into default soon BUT I did a very silly thing - I merged in changes...
In the interests of not leaving a question unanswered (!), I managed to resolve this and the ultimate answer is that there's no simple way to resolve it automatically. Transplant deals in patches, differences between two files but doesn't take into account the common ancestry of the two files so struggles to know what ...
3558365
Mercurial: Remove file from all changesets
14
2010-08-24 15:54:01
<p>I understand how to <a href="https://stackoverflow.com/questions/2684898/mercurial-remove-history">remove an entire changeset</a> from history but it's not clear how to remove a subset instead.</p> <p>For example, how do I remove all DLL files from an existing changeset while leaving the source-code alone?</p>
5,646
14,731
2018-02-22 11:59:50
3,558,892
18
2010-08-24 16:53:15
2,363
2018-02-22 11:59:50
https://stackoverflow.com/q/3558365
https://stackoverflow.com/a/3558892
<p>Because the revision ids (e.g. a8d7641f...) are based on a hash of the changeset, it's not really possible to <em>remove</em> a subset of a changeset from history.</p> <p>However, it is possible to create a new repo with a parallel history, except for a certain set of files, by using the <a href="https://www.mercur...
<p>Because the revision ids (e.g. a8d7641f...) are based on a hash of the changeset, it's not really possible to <em>remove</em> a subset of a changeset from history.</p> <p>However, it is possible to create a new repo with a parallel history, except for a certain set of files, by using the <a href="https://www.mercur...
802
mercurial
<h1>Mercurial: Remove file from all changesets</h1> <p>I understand how to <a href="https://stackoverflow.com/questions/2684898/mercurial-remove-history">remove an entire changeset</a> from history but it's not clear how to remove a subset instead.</p> <p>For example, how do I remove all DLL files from an existing cha...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,170
mercurial
# Mercurial: Remove file from all changesets I understand how to [remove an entire changeset](https://stackoverflow.com/questions/2684898/mercurial-remove-history) from history but it's not clear how to remove a subset instead. For example, how do I remove all DLL files from an existing changeset while leaving the so...
Because the revision ids (e.g. a8d7641f...) are based on a hash of the changeset, it's not really possible to *remove* a subset of a changeset from history. However, it is possible to create a new repo with a parallel history, except for a certain set of files, by using the [Convert](https://www.mercurial-scm.org/wiki...
3920197
delete files in history to save some space in mercurial
13
2010-10-13 01:20:10
<p>ok, when I was young, I put severial big files(like resource file, dll, etc..) in my mercurial repos. and I found the size of it is so big that I cannot easily push it into bitbucket,</p> <p>any way to delete this files history <strong>EASILY</strong>?</p> <p>I put all those files in /res and /dll path.</p> <p>ed...
3,159
73,048
2010-10-13 02:14:29
3,920,347
18
2010-10-13 02:14:29
8,992
2010-10-13 02:14:29
https://stackoverflow.com/q/3920197
https://stackoverflow.com/a/3920347
<p>Your best bet is to use the convert extension, but <strong>warning</strong> you'll end up with a totally different repo. Every hash will be different and every person who cloned will need to delete their clone and re-clone.</p> <p>That said, here's what you do:</p> <p>Create a filemap file named <code>filemap.txt...
<p>Your best bet is to use the convert extension, but <strong>warning</strong> you'll end up with a totally different repo. Every hash will be different and every person who cloned will need to delete their clone and re-clone.</p> <p>That said, here's what you do:</p> <p>Create a filemap file named <code>filemap.txt...
802
mercurial
<h1>delete files in history to save some space in mercurial</h1> <p>ok, when I was young, I put severial big files(like resource file, dll, etc..) in my mercurial repos. and I found the size of it is so big that I cannot easily push it into bitbucket,</p> <p>any way to delete this files history <strong>EASILY</strong>...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,171
mercurial
# delete files in history to save some space in mercurial ok, when I was young, I put severial big files(like resource file, dll, etc..) in my mercurial repos. and I found the size of it is so big that I cannot easily push it into bitbucket, any way to delete this files history **EASILY**? I put all those files in /...
Your best bet is to use the convert extension, but **warning** you'll end up with a totally different repo. Every hash will be different and every person who cloned will need to delete their clone and re-clone. That said, here's what you do: Create a filemap file named `filemap.txt` containing: ``` exclude res exclu...
3105427
How do I move a private Mercurial repository to a central server?
12
2010-06-23 20:47:47
<p>I’m just getting started with Mercurial, and I’ve read Joel Spolsky’s <a href="http://hginit.com/index.html" rel="noreferrer">Hg Init tutorial</a>, which I liked.</p> <p>I’m wondering: let’s say I have a private repository and I work on it for about a month. Then I decide I want to centralize it or make it public,...
5,315
171,134
2010-06-24 10:59:09
3,105,582
18
2010-06-23 21:09:24
14,343
2010-06-23 21:09:24
https://stackoverflow.com/q/3105427
https://stackoverflow.com/a/3105582
<p><a href="http://bitbucket.org/help/UsingBitbucket#importing-existing-files-already-in-mercurial" rel="noreferrer">BitBucket's help</a> says it's as easy as making an empty repo on BitBucket, then pushing to it:</p> <blockquote> <p>... create a new empty repository via the "Create repository" page. We will assume ...
<p><a href="http://bitbucket.org/help/UsingBitbucket#importing-existing-files-already-in-mercurial" rel="noreferrer">BitBucket's help</a> says it's as easy as making an empty repo on BitBucket, then pushing to it:</p> <blockquote> <p>... create a new empty repository via the "Create repository" page. We will assume ...
802, 7330, 8337, 34046
bitbucket, hgrc, mercurial, repository
<h1>How do I move a private Mercurial repository to a central server?</h1> <p>I’m just getting started with Mercurial, and I’ve read Joel Spolsky’s <a href="http://hginit.com/index.html" rel="noreferrer">Hg Init tutorial</a>, which I liked.</p> <p>I’m wondering: let’s say I have a private repository and I work on it f...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,172
mercurial
# How do I move a private Mercurial repository to a central server? I’m just getting started with Mercurial, and I’ve read Joel Spolsky’s [Hg Init tutorial](http://hginit.com/index.html), which I liked. I’m wondering: let’s say I have a private repository and I work on it for about a month. Then I decide I want to ce...
[BitBucket's help](http://bitbucket.org/help/UsingBitbucket#importing-existing-files-already-in-mercurial) says it's as easy as making an empty repo on BitBucket, then pushing to it: > ... create a new empty repository via the "Create repository" page. We will assume that this repository is named blonk and is to be fo...
1898600
cleaning out a Mercurial Repository
12
2009-12-14 02:08:31
<p>There are a bunch of file in the history of my hg repo that have been removed. They are causing the repo to get pretty big (several of them are images, and sql dumps from early in the project, among other things that never should have been comitted in the first place).</p> <p>How do I get mercurial to forget about ...
3,104
2,908
2017-06-20 09:06:56
1,898,609
18
2009-12-14 02:12:00
89,391
2017-06-20 09:06:56
https://stackoverflow.com/q/1898600
https://stackoverflow.com/a/1898609
<p>See: </p> <pre><code>$ hg convert --help </code></pre> <p>...</p> <pre><code>$ hg convert --filemap fmap old new </code></pre> <p>where file fmap contains something like:</p> <pre><code>exclude path/to/file/to/purge </code></pre> <p>(src: <a href="https://www.mercurial-scm.org/pipermail/mercurial/2008-August/0...
<p>See: </p> <pre><code>$ hg convert --help </code></pre> <p>...</p> <pre><code>$ hg convert --filemap fmap old new </code></pre> <p>where file fmap contains something like:</p> <pre><code>exclude path/to/file/to/purge </code></pre> <p>(src: <a href="https://www.mercurial-scm.org/pipermail/mercurial/2008-August/0...
456, 802
mercurial, version-control
<h1>cleaning out a Mercurial Repository</h1> <p>There are a bunch of file in the history of my hg repo that have been removed. They are causing the repo to get pretty big (several of them are images, and sql dumps from early in the project, among other things that never should have been comitted in the first place).</p...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,173
mercurial
# cleaning out a Mercurial Repository There are a bunch of file in the history of my hg repo that have been removed. They are causing the repo to get pretty big (several of them are images, and sql dumps from early in the project, among other things that never should have been comitted in the first place). How do I g...
See: ``` $ hg convert --help ``` ... ``` $ hg convert --filemap fmap old new ``` where file fmap contains something like: ``` exclude path/to/file/to/purge ``` (src: <https://www.mercurial-scm.org/pipermail/mercurial/2008-August/020721.html>)
21615561
How to detect renames in Tortoise HG Workbench
11
2014-02-06 22:34:59
<p>I had a significant number of files in my project just on the root level so I decided to clean them up by placing them into folders for Manager classes, API classes etc. When I go into Tortoise HG's workbench, I see that is thinks I have removed all of these files and added them (with the folder extensions). I see o...
3,269
2,442,468
2016-08-08 11:49:47
21,615,658
18
2014-02-06 22:40:58
151,501
2016-08-08 11:49:47
https://stackoverflow.com/q/21615561
https://stackoverflow.com/a/21615658
<p>When you moved the items they should have become unknown <code>?</code> (pink). Right click on one and choose "Detect Renames".</p> <p>It only works for unknown files, and only will match with files of status <code>!</code> missing.</p> <p>Once it finds a match it turns the rename into an <code>A</code> add and an...
<p>When you moved the items they should have become unknown <code>?</code> (pink). Right click on one and choose "Detect Renames".</p> <p>It only works for unknown files, and only will match with files of status <code>!</code> missing.</p> <p>Once it finds a match it turns the rename into an <code>A</code> add and an...
8122
tortoisehg
<h1>How to detect renames in Tortoise HG Workbench</h1> <p>I had a significant number of files in my project just on the root level so I decided to clean them up by placing them into folders for Manager classes, API classes etc. When I go into Tortoise HG's workbench, I see that is thinks I have removed all of these fi...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,174
mercurial
# How to detect renames in Tortoise HG Workbench I had a significant number of files in my project just on the root level so I decided to clean them up by placing them into folders for Manager classes, API classes etc. When I go into Tortoise HG's workbench, I see that is thinks I have removed all of these files and a...
When you moved the items they should have become unknown `?` (pink). Right click on one and choose "Detect Renames". It only works for unknown files, and only will match with files of status `!` missing. Once it finds a match it turns the rename into an `A` add and an `R` remove. If you click on one of the added file...
18846643
Mercurial discard local changes of a file or group of files or all
11
2013-09-17 09:52:50
<p>From <a href="http://mercurial.selenic.com/wiki/FAQ#FAQ.2FCommonProblems.I_did_an_hg_revert_and_my_working_directory_still_has_changes_in_it.21" rel="noreferrer">Mercurial FAQ</a> page I read how to discard all local changes of my repo.</p> <pre><code>hg update -C -r </code></pre> <p>But what I want is to discard ...
13,392
355,507
2013-09-17 10:06:24
18,846,922
18
2013-09-17 10:06:24
1,077,279
2013-09-17 10:06:24
https://stackoverflow.com/q/18846643
https://stackoverflow.com/a/18846922
<p>You can use <code>revert</code></p> <pre><code>hg revert --no-backup file.rb </code></pre> <p>As of Mercurial 2.0, you can use</p> <pre><code>hg revert -C file.rb </code></pre> <p>to prevent the creation of <em>.orig</em> files.</p>
<p>You can use <code>revert</code></p> <pre><code>hg revert --no-backup file.rb </code></pre> <p>As of Mercurial 2.0, you can use</p> <pre><code>hg revert -C file.rb </code></pre> <p>to prevent the creation of <em>.orig</em> files.</p>
802
mercurial
<h1>Mercurial discard local changes of a file or group of files or all</h1> <p>From <a href="http://mercurial.selenic.com/wiki/FAQ#FAQ.2FCommonProblems.I_did_an_hg_revert_and_my_working_directory_still_has_changes_in_it.21" rel="noreferrer">Mercurial FAQ</a> page I read how to discard all local changes of my repo.</p> ...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,175
mercurial
# Mercurial discard local changes of a file or group of files or all From [Mercurial FAQ](http://mercurial.selenic.com/wiki/FAQ#FAQ.2FCommonProblems.I_did_an_hg_revert_and_my_working_directory_still_has_changes_in_it.21) page I read how to discard all local changes of my repo. ``` hg update -C -r ``` But what I want...
You can use `revert` ``` hg revert --no-backup file.rb ``` As of Mercurial 2.0, you can use ``` hg revert -C file.rb ``` to prevent the creation of *.orig* files.
6283139
How to hgignore all subfolders but not the file in a folder?
11
2011-06-08 17:58:57
<p>I am looking to use <a href="http://blog.davidebbo.com/2011/03/using-nuget-without-committing-packages.html" rel="noreferrer">nuget without committing the packages</a>. I want to ignore in mercurial all packages subfolder that are located in the <code>/packages/</code> folder, but I do not want to exclude the <code>...
2,667
151,488
2015-01-13 18:43:43
6,283,799
18
2011-06-08 18:59:59
92,529
2011-06-08 18:59:59
https://stackoverflow.com/q/6283139
https://stackoverflow.com/a/6283799
<p>Can't you just do this:</p> <pre><code>hg add packages/repositories.config </code></pre> <p>And then have this in your .hgignore file</p> <pre><code>syntax: glob packages </code></pre> <p>?</p>
<p>Can't you just do this:</p> <pre><code>hg add packages/repositories.config </code></pre> <p>And then have this in your .hgignore file</p> <pre><code>syntax: glob packages </code></pre> <p>?</p>
18, 802, 31419, 62770
hgignore, mercurial, nuget, regex
<h1>How to hgignore all subfolders but not the file in a folder?</h1> <p>I am looking to use <a href="http://blog.davidebbo.com/2011/03/using-nuget-without-committing-packages.html" rel="noreferrer">nuget without committing the packages</a>. I want to ignore in mercurial all packages subfolder that are located in the <...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,176
mercurial
# How to hgignore all subfolders but not the file in a folder? I am looking to use [nuget without committing the packages](http://blog.davidebbo.com/2011/03/using-nuget-without-committing-packages.html). I want to ignore in mercurial all packages subfolder that are located in the `/packages/` folder, but I do not want...
Can't you just do this: ``` hg add packages/repositories.config ``` And then have this in your .hgignore file ``` syntax: glob packages ``` ?
8672763
www.bitbucket.org certificate with fingerprint not verified issue while pushing changes
10
2011-12-29 19:58:24
<p>I am trying to push changes to a project I am contributing to. I have permissions to commit to the project and has a valid account in bitbucket. I am getting the below error while pushing the changes. Appreciate help on fixing this.</p> <p><img src="https://i.sstatic.net/XO71X.png" alt="enter image description here...
3,842
127,320
2014-03-08 05:35:45
8,675,264
18
2011-12-30 01:22:53
127,320
2014-03-08 05:35:45
https://stackoverflow.com/q/8672763
https://stackoverflow.com/a/8675264
<p>It started working after adding the below to repo specific hgrc file</p> <pre><code>[hostfingerprints] bitbucket.org = 24:9c:45:8b:9c:aa:ba:55:4e:01:6d:58:ff:e4:28:7d:2a:14:ae:3b </code></pre> <p>based on the suggestion <a href="https://bitbucket.org/site/master/issue/2780/getting-warning-while-using-https-and-ssh...
<p>It started working after adding the below to repo specific hgrc file</p> <pre><code>[hostfingerprints] bitbucket.org = 24:9c:45:8b:9c:aa:ba:55:4e:01:6d:58:ff:e4:28:7d:2a:14:ae:3b </code></pre> <p>based on the suggestion <a href="https://bitbucket.org/site/master/issue/2780/getting-warning-while-using-https-and-ssh...
641, 802, 3346, 8337, 14423
bitbucket, dvcs, mercurial, ssl, ssl-certificate
<h1>www.bitbucket.org certificate with fingerprint not verified issue while pushing changes</h1> <p>I am trying to push changes to a project I am contributing to. I have permissions to commit to the project and has a valid account in bitbucket. I am getting the below error while pushing the changes. Appreciate help on ...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,177
mercurial
# www.bitbucket.org certificate with fingerprint not verified issue while pushing changes I am trying to push changes to a project I am contributing to. I have permissions to commit to the project and has a valid account in bitbucket. I am getting the below error while pushing the changes. Appreciate help on fixing th...
It started working after adding the below to repo specific hgrc file ``` [hostfingerprints] bitbucket.org = 24:9c:45:8b:9c:aa:ba:55:4e:01:6d:58:ff:e4:28:7d:2a:14:ae:3b ``` based on the suggestion [here](https://bitbucket.org/site/master/issue/2780/getting-warning-while-using-https-and-ssh) [certificate was changed o...
14401862
How to undo hg init?
9
2013-01-18 15:14:54
<p>I typed <code>hg init</code> in a directory, but then changed my mind: I'd rather not have this under version control. So how do I undo <code>hg init</code>?</p> <p>I suppose there is another solution than deleting <code>.hg</code> directories, but I couldn't find the command. Or is it impossible for mercurial to r...
1,565
626,537
2013-01-18 15:25:52
14,401,885
18
2013-01-18 15:16:24
1,616,951
2013-01-18 15:25:52
https://stackoverflow.com/q/14401862
https://stackoverflow.com/a/14401885
<p>Why don't using</p> <p><code>rm -rv .hg/</code> on Linux/Unix systems or under MacOS</p> <p>or</p> <p><code>rmdir /S .hg</code> on WIndows systems (with the good ol' cmdline, the first example works under the PowerShell too).</p> <p>It's simple and effective and does what you want: Removing Mercurial from the pr...
<p>Why don't using</p> <p><code>rm -rv .hg/</code> on Linux/Unix systems or under MacOS</p> <p>or</p> <p><code>rmdir /S .hg</code> on WIndows systems (with the good ol' cmdline, the first example works under the PowerShell too).</p> <p>It's simple and effective and does what you want: Removing Mercurial from the pr...
456, 802
mercurial, version-control
<h1>How to undo hg init?</h1> <p>I typed <code>hg init</code> in a directory, but then changed my mind: I'd rather not have this under version control. So how do I undo <code>hg init</code>?</p> <p>I suppose there is another solution than deleting <code>.hg</code> directories, but I couldn't find the command. Or is it...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,178
mercurial
# How to undo hg init? I typed `hg init` in a directory, but then changed my mind: I'd rather not have this under version control. So how do I undo `hg init`? I suppose there is another solution than deleting `.hg` directories, but I couldn't find the command. Or is it impossible for mercurial to remove itself from a...
Why don't using `rm -rv .hg/` on Linux/Unix systems or under MacOS or `rmdir /S .hg` on WIndows systems (with the good ol' cmdline, the first example works under the PowerShell too). It's simple and effective and does what you want: Removing Mercurial from the project.
6158419
Hg (Mercurial): any way to "set aside" the working copy for later?
8
2011-05-27 22:53:57
<p>Scenario: After your last commit, you decided to do some extensive refactoring of the codebase. After a time, you realize it is taking longer than expected, and you'd really rather put off the refactoring for another time, and work on more pressing tasks. But you don't want to lose all of the refactoring work you've...
721
187,949
2011-12-14 10:39:52
6,159,449
18
2011-05-28 03:20:57
8,992
2011-05-28 03:20:57
https://stackoverflow.com/q/6158419
https://stackoverflow.com/a/6159449
<p>Don't worry about "the fear of two heads". Two heads is a <strong>very</strong> normal state. It's called anonymous branches, and it's one of the ways people do temporary branches in Mercurial.</p> <p>Just commit, and then update to tip-1 and you're ready to go:</p> <pre><code>hg commit -m "working on XXX" hg up...
<p>Don't worry about "the fear of two heads". Two heads is a <strong>very</strong> normal state. It's called anonymous branches, and it's one of the ways people do temporary branches in Mercurial.</p> <p>Just commit, and then update to tip-1 and you're ready to go:</p> <pre><code>hg commit -m "working on XXX" hg up...
456, 802, 8103
mercurial, shelve, version-control
<h1>Hg (Mercurial): any way to "set aside" the working copy for later?</h1> <p>Scenario: After your last commit, you decided to do some extensive refactoring of the codebase. After a time, you realize it is taking longer than expected, and you'd really rather put off the refactoring for another time, and work on more p...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,179
mercurial
# Hg (Mercurial): any way to "set aside" the working copy for later? Scenario: After your last commit, you decided to do some extensive refactoring of the codebase. After a time, you realize it is taking longer than expected, and you'd really rather put off the refactoring for another time, and work on more pressing t...
Don't worry about "the fear of two heads". Two heads is a **very** normal state. It's called anonymous branches, and it's one of the ways people do temporary branches in Mercurial. Just commit, and then update to tip-1 and you're ready to go: ``` hg commit -m "working on XXX" hg update -r "tip-1" ``` and away you go...
2085798
Fastest way to "reset" Mercurial repository to Version X (without cloning)
8
2010-01-18 12:00:17
<p>Let's say I clone a remote Mercurial repository (over the local network or even over the Internet) to try something out.<br> I work in my clone, make a few commits...and then I realize that my changes don't make sense and I have to start over again.</p> <p>So I want to have a "fresh" clone again, from the same sour...
4,397
6,884
2018-12-13 14:46:16
2,087,445
18
2010-01-18 16:19:09
8,992
2010-01-18 16:19:09
https://stackoverflow.com/q/2085798
https://stackoverflow.com/a/2087445
<p>You'll end us using <code>hg strip</code> as gizmo suggests, but the traditional way to do this would be to clone again -- not from the remote repo, but from your own local repo. For example, if you checkout is 'repository' and you've added changesets 99 and 100 that you don't like you'd do:</p> <pre><code>cd .. h...
<p>You'll end us using <code>hg strip</code> as gizmo suggests, but the traditional way to do this would be to clone again -- not from the remote repo, but from your own local repo. For example, if you checkout is 'repository' and you've added changesets 99 and 100 that you don't like you'd do:</p> <pre><code>cd .. h...
456, 802, 8122
mercurial, tortoisehg, version-control
<h1>Fastest way to "reset" Mercurial repository to Version X (without cloning)</h1> <p>Let's say I clone a remote Mercurial repository (over the local network or even over the Internet) to try something out.<br> I work in my clone, make a few commits...and then I realize that my changes don't make sense and I have to s...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,180
mercurial
# Fastest way to "reset" Mercurial repository to Version X (without cloning) Let's say I clone a remote Mercurial repository (over the local network or even over the Internet) to try something out. I work in my clone, make a few commits...and then I realize that my changes don't make sense and I have to start over a...
You'll end us using `hg strip` as gizmo suggests, but the traditional way to do this would be to clone again -- not from the remote repo, but from your own local repo. For example, if you checkout is 'repository' and you've added changesets 99 and 100 that you don't like you'd do: ``` cd .. hg clone -r 98 respository ...
2046050
Tab Completion in Python Command Line Interface - how to catch Tab events
8
2010-01-12 01:11:57
<p>I'm writing a little CLI in Python (as an extension to Mercurial) and would like to support tab-completion. Specifically, I would like catch tabs in the prompt and show a list of matching options (just like bash).</p> <p>Example: Enter section name:</p> <pre><code> ext*TAB* extensions extras </code></pre> <...
5,541
99,183
2012-01-19 07:18:33
2,046,054
18
2010-01-12 01:13:35
17,160
2010-01-12 01:40:12
https://stackoverflow.com/q/2046050
https://stackoverflow.com/a/2046054
<p>For that you use the <a href="http://docs.python.org/library/readline.html" rel="noreferrer"><code>readline</code></a> module.</p> <p>Simplest code I can think:</p> <pre><code>import readline COMMANDS = ['extra', 'extension', 'stuff', 'errors', 'email', 'foobar', 'foo'] def complete(text, state): ...
<p>For that you use the <a href="http://docs.python.org/library/readline.html" rel="noreferrer"><code>readline</code></a> module.</p> <p>Simplest code I can think:</p> <pre><code>import readline COMMANDS = ['extra', 'extension', 'stuff', 'errors', 'email', 'foobar', 'foo'] def complete(text, state): ...
16, 802, 12891, 16224
mercurial, python, raw-input, tab-completion
<h1>Tab Completion in Python Command Line Interface - how to catch Tab events</h1> <p>I'm writing a little CLI in Python (as an extension to Mercurial) and would like to support tab-completion. Specifically, I would like catch tabs in the prompt and show a list of matching options (just like bash).</p> <p>Example: Ent...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,181
mercurial
# Tab Completion in Python Command Line Interface - how to catch Tab events I'm writing a little CLI in Python (as an extension to Mercurial) and would like to support tab-completion. Specifically, I would like catch tabs in the prompt and show a list of matching options (just like bash). Example: Enter section name:...
For that you use the [`readline`](http://docs.python.org/library/readline.html) module. Simplest code I can think: ``` import readline COMMANDS = ['extra', 'extension', 'stuff', 'errors', 'email', 'foobar', 'foo'] def complete(text, state): for cmd in COMMANDS: if cmd.startswith(text): ...
2386440
Embedding mercurial revision information in Visual Studio c# projects automatically
55
2010-03-05 11:53:24
<h2>Original Problem</h2> <p>In building our projects, I want the mercurial id of each repository to be embedded within the product(s) of that repository (the library, application or test application).</p> <p>I find it makes it so much easier to debug an application being run by customers 8 timezones away if you know...
8,661
42,473
2012-02-07 22:05:05
2,527,238
17
2010-03-26 22:41:41
301,020
2012-02-07 22:05:05
https://stackoverflow.com/q/2386440
https://stackoverflow.com/a/2527238
<p>I think I have an answer for you. This will be a bit involved, but it gets you away from having to do any batch files. You can rely on MSBuild and Custom Tasks to do this for you. I've used the extension pack for MSBuild (Available at <a href="http://msbuildextensionpack.codeplex.com/" rel="noreferrer">CodePlex</a>)...
<p>I think I have an answer for you. This will be a bit involved, but it gets you away from having to do any batch files. You can rely on MSBuild and Custom Tasks to do this for you. I've used the extension pack for MSBuild (Available at <a href="http://msbuildextensionpack.codeplex.com/" rel="noreferrer">CodePlex</a>)...
9, 802, 5647, 32472
build, c#, mercurial, visual-studio-2008
<h1>Embedding mercurial revision information in Visual Studio c# projects automatically</h1> <h2>Original Problem</h2> <p>In building our projects, I want the mercurial id of each repository to be embedded within the product(s) of that repository (the library, application or test application).</p> <p>I find it makes ...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,182
mercurial
# Embedding mercurial revision information in Visual Studio c# projects automatically ## Original Problem In building our projects, I want the mercurial id of each repository to be embedded within the product(s) of that repository (the library, application or test application). I find it makes it so much easier to d...
I think I have an answer for you. This will be a bit involved, but it gets you away from having to do any batch files. You can rely on MSBuild and Custom Tasks to do this for you. I've used the extension pack for MSBuild (Available at [CodePlex](http://msbuildextensionpack.codeplex.com/)) - but the second task you need...
799187
DVCS with a Windows central repository
24
2009-04-28 18:09:15
<p>We are currently using VSS for version control. Quite few of our developers are interested in a distributed model (And want to get rid of VSS). Our network is full of Windows machines and while our IT department has experience maintaining Linux machines they would prefer not to.</p> <p>What DVCS systems can host th...
3,001
95,157
2012-12-06 13:58:28
799,429
17
2009-04-28 19:10:52
2,354
2009-04-28 19:21:56
https://stackoverflow.com/q/799187
https://stackoverflow.com/a/799429
<p>Mercurial's almost certainly your easiest option on Windows.</p> <p>If you didn't care about authentication, you actually can trivially allow <code>hg serve</code> to permit push. To do so, you merely need to add the following to the <code>.hg/hgrc</code> file in the repository you wish to serve:</p> <pre><code>[...
<p>Mercurial's almost certainly your easiest option on Windows.</p> <p>If you didn't care about authentication, you actually can trivially allow <code>hg serve</code> to permit push. To do so, you merely need to add the following to the <code>.hg/hgrc</code> file in the repository you wish to serve:</p> <pre><code>[...
64, 119, 456, 802
git, mercurial, version-control, windows
<h1>DVCS with a Windows central repository</h1> <p>We are currently using VSS for version control. Quite few of our developers are interested in a distributed model (And want to get rid of VSS). Our network is full of Windows machines and while our IT department has experience maintaining Linux machines they would pref...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,183
mercurial
# DVCS with a Windows central repository We are currently using VSS for version control. Quite few of our developers are interested in a distributed model (And want to get rid of VSS). Our network is full of Windows machines and while our IT department has experience maintaining Linux machines they would prefer not to...
Mercurial's almost certainly your easiest option on Windows. If you didn't care about authentication, you actually can trivially allow `hg serve` to permit push. To do so, you merely need to add the following to the `.hg/hgrc` file in the repository you wish to serve: ``` [web] allow_push = * push_ssl = false ``` Th...
2034118
Unable to merge in mercurial
21
2010-01-09 17:04:36
<p>I am a newcomer to mercurial. I have recently set up a repository with 2 colleagues and am having difficulty with pushing my code. [I am using command-line hg in Windows]. In particular when I push I get a dialogue like the following:</p> <pre><code>&gt;hg commit -u petermr &gt;hg push pushing to http://bitbucket....
21,162
130,964
2017-06-16 15:34:42
2,034,209
17
2010-01-09 17:26:17
115,866
2010-01-09 17:26:17
https://stackoverflow.com/q/2034118
https://stackoverflow.com/a/2034209
<p>Your local clone of the repo is probably not up-to-date. Do a</p> <pre><code>hg pull </code></pre> <p>to change that. Now you have two heads locally (your own previous tip and the tip of the bitbucket repo). Now</p> <pre><code>hg merge </code></pre> <p>to merge the two heads and</p> <pre><code>hg commit -m "Mer...
<p>Your local clone of the repo is probably not up-to-date. Do a</p> <pre><code>hg pull </code></pre> <p>to change that. Now you have two heads locally (your own previous tip and the tip of the bitbucket repo). Now</p> <pre><code>hg merge </code></pre> <p>to merge the two heads and</p> <pre><code>hg commit -m "Mer...
802, 4236
mercurial, push
<h1>Unable to merge in mercurial</h1> <p>I am a newcomer to mercurial. I have recently set up a repository with 2 colleagues and am having difficulty with pushing my code. [I am using command-line hg in Windows]. In particular when I push I get a dialogue like the following:</p> <pre><code>&gt;hg commit -u petermr &g...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,184
mercurial
# Unable to merge in mercurial I am a newcomer to mercurial. I have recently set up a repository with 2 colleagues and am having difficulty with pushing my code. [I am using command-line hg in Windows]. In particular when I push I get a dialogue like the following: ``` >hg commit -u petermr >hg push pushing to http:...
Your local clone of the repo is probably not up-to-date. Do a ``` hg pull ``` to change that. Now you have two heads locally (your own previous tip and the tip of the bitbucket repo). Now ``` hg merge ``` to merge the two heads and ``` hg commit -m "Merged before pushing" ``` Now your local repo has only one head...
4592664
hg: How do I change the language of my Mercurial(hg) installation? (MacOS)
20
2011-01-04 10:39:05
<p>I re-installed mercurial on my Mac (snow leopard) yesterday. The UI/console language of Mercurial has changed from English to Danish. My machine is set up to US-English and my keyboard layout is Danish. I do not want the Danish translation active as it is incomplete.</p> <p><em>I just need Mercurial to "speak" Engl...
6,766
562,378
2018-11-10 17:59:07
4,650,477
17
2011-01-10 19:09:43
896
2011-01-10 19:09:43
https://stackoverflow.com/q/4592664
https://stackoverflow.com/a/4650477
<p>If you set your LANG environment variable to en_US.UTF-8 your can change the language of the Mercurial client (Hg).</p> <pre><code>export LANG=en_US.UTF-8 </code></pre>
<p>If you set your LANG environment variable to en_US.UTF-8 your can change the language of the Mercurial client (Hg).</p> <pre><code>export LANG=en_US.UTF-8 </code></pre>
802, 34046
hgrc, mercurial
<h1>hg: How do I change the language of my Mercurial(hg) installation? (MacOS)</h1> <p>I re-installed mercurial on my Mac (snow leopard) yesterday. The UI/console language of Mercurial has changed from English to Danish. My machine is set up to US-English and my keyboard layout is Danish. I do not want the Danish trans...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,185
mercurial
# hg: How do I change the language of my Mercurial(hg) installation? (MacOS) I re-installed mercurial on my Mac (snow leopard) yesterday. The UI/console language of Mercurial has changed from English to Danish. My machine is set up to US-English and my keyboard layout is Danish. I do not want the Danish translation ac...
If you set your LANG environment variable to en_US.UTF-8 your can change the language of the Mercurial client (Hg). ``` export LANG=en_US.UTF-8 ```
4264192
Mercurial - how to fetch latest changes from parent of fork?
18
2010-11-24 06:55:58
<p>I've been dabbling with Mercurial for a short while now, and I've now set up several projects on BitBucket, one forking off of the other.</p> <p>I've been able to make changes to each repo with no problem, but one thing I can't figure out, is how to keep the fork up-to-date with changes from the parent repo?</p> <...
7,231
441,739
2018-03-05 11:56:45
4,264,207
17
2010-11-24 06:59:24
251,311
2013-04-08 09:59:44
https://stackoverflow.com/q/4264192
https://stackoverflow.com/a/4264207
<p>Just perform the <code>pull</code> with the source repository as an argument. It will pull all the changes done after your previous pull (or from the time you forked the project, if no pulls were performed).</p> <p>After that you will have some additional heads, which you have to merge with your ones.</p>
<p>Just perform the <code>pull</code> with the source repository as an argument. It will pull all the changes done after your previous pull (or from the time you forked the project, if no pulls were performed).</p> <p>After that you will have some additional heads, which you have to merge with your ones.</p>
802, 2347, 8337
bitbucket, fork, mercurial
<h1>Mercurial - how to fetch latest changes from parent of fork?</h1> <p>I've been dabbling with Mercurial for a short while now, and I've now set up several projects on BitBucket, one forking off of the other.</p> <p>I've been able to make changes to each repo with no problem, but one thing I can't figure out, is how...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,186
mercurial
# Mercurial - how to fetch latest changes from parent of fork? I've been dabbling with Mercurial for a short while now, and I've now set up several projects on BitBucket, one forking off of the other. I've been able to make changes to each repo with no problem, but one thing I can't figure out, is how to keep the for...
Just perform the `pull` with the source repository as an argument. It will pull all the changes done after your previous pull (or from the time you forked the project, if no pulls were performed). After that you will have some additional heads, which you have to merge with your ones.
8531915
What does hg copy do?
16
2011-12-16 09:06:07
<p>We recently did a <code>hg copy</code> of a directory in our repository. We thought it does something like <code>cp -a</code> and <code>hg add</code> and maybe flag somehow that this file has been copied from another file inside the repo (so <code>hg annotate</code> shows the original committer). But it now seems th...
12,194
110,204
2019-05-26 04:57:04
8,531,968
17
2011-12-16 09:11:19
110,204
2011-12-16 09:11:19
https://stackoverflow.com/q/8531915
https://stackoverflow.com/a/8531968
<blockquote> <ul> <li>What exactly does hg copy do and what special treatment does this cause in the future?</li> </ul> </blockquote> <p>It adds new files and marks them as copies of the old files. Because they are copies, a change made in the original file will be merged into copy. Time flows from left to rig...
<blockquote> <ul> <li>What exactly does hg copy do and what special treatment does this cause in the future?</li> </ul> </blockquote> <p>It adds new files and marks them as copies of the old files. Because they are copies, a change made in the original file will be merged into copy. Time flows from left to rig...
456, 717, 802
mercurial, merge, version-control
<h1>What does hg copy do?</h1> <p>We recently did a <code>hg copy</code> of a directory in our repository. We thought it does something like <code>cp -a</code> and <code>hg add</code> and maybe flag somehow that this file has been copied from another file inside the repo (so <code>hg annotate</code> shows the original ...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,187
mercurial
# What does hg copy do? We recently did a `hg copy` of a directory in our repository. We thought it does something like `cp -a` and `hg add` and maybe flag somehow that this file has been copied from another file inside the repo (so `hg annotate` shows the original committer). But it now seems that `hg copy` does more...
> - What exactly does hg copy do and what special treatment does this > cause in the future? It adds new files and marks them as copies of the old files. Because they are copies, a change made in the original file will be merged into copy. Time flows from left to right: ``` (init) --- (edit a.txt) ---- (a.txt edit ...
3277334
What files will be changed vs added when I do an hg pull and hg update
14
2010-07-18 21:31:13
<p>So in Subversion when I do an <code>svn up</code> I get a list of files that were added, modified, deleted, and conflicted.</p> <p>When I do an <code>hg pull</code> then <code>hg up -v</code> it just displays a list of: <code>getting file.ext</code> but I have no way of know if that file is new or already existed. ...
4,915
395,349
2012-03-30 12:27:36
3,289,331
17
2010-07-20 11:15:09
110,204
2010-07-21 10:03:16
https://stackoverflow.com/q/3277334
https://stackoverflow.com/a/3289331
<p>Use the status command to list changes in file status between the working copy and its parent revision or <strong>between any two revisions</strong>. It gives you output like this:</p> <pre><code>$ hg status --rev .:tip M hgext/keyword.py M mercurial/cmdutil.py M mercurial/commands.py M mercurial/context.py M mercu...
<p>Use the status command to list changes in file status between the working copy and its parent revision or <strong>between any two revisions</strong>. It gives you output like this:</p> <pre><code>$ hg status --rev .:tip M hgext/keyword.py M mercurial/cmdutil.py M mercurial/commands.py M mercurial/context.py M mercu...
456, 802, 3346, 4860
dvcs, mercurial, pull, version-control
<h1>What files will be changed vs added when I do an hg pull and hg update</h1> <p>So in Subversion when I do an <code>svn up</code> I get a list of files that were added, modified, deleted, and conflicted.</p> <p>When I do an <code>hg pull</code> then <code>hg up -v</code> it just displays a list of: <code>getting fi...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,188
mercurial
# What files will be changed vs added when I do an hg pull and hg update So in Subversion when I do an `svn up` I get a list of files that were added, modified, deleted, and conflicted. When I do an `hg pull` then `hg up -v` it just displays a list of: `getting file.ext` but I have no way of know if that file is new ...
Use the status command to list changes in file status between the working copy and its parent revision or **between any two revisions**. It gives you output like this: ``` $ hg status --rev .:tip M hgext/keyword.py M mercurial/cmdutil.py M mercurial/commands.py M mercurial/context.py M mercurial/patch.py A tests/test-...
4965108
How to add .hgignore to my Mercurial folder?
13
2011-02-11 02:38:08
<p>I'm learning to use Mercurial, and its learning curve is pretty straightforward. But one of my problem is, I can't add the .hgignore file to Mercurial folder. Windows (7) does not allow me to do this, and when I run the command </p> <blockquote> <p>hg add .hgignore</p> </blockquote> <p>, it returns error: </p> ...
7,858
79,109
2016-11-28 21:37:14
4,965,144
17
2011-02-11 02:46:23
251,311
2016-11-28 21:37:14
https://stackoverflow.com/q/4965108
https://stackoverflow.com/a/4965144
<p>Execute</p> <p><code>touch .hgignore</code></p> <p>or</p> <p><code>echo "" &gt; .hgignore</code></p> <p>in the needed directory</p>
<p>Execute</p> <p><code>touch .hgignore</code></p> <p>or</p> <p><code>echo "" &gt; .hgignore</code></p> <p>in the needed directory</p>
99, 456, 802
filesystems, mercurial, version-control
<h1>How to add .hgignore to my Mercurial folder?</h1> <p>I'm learning to use Mercurial, and its learning curve is pretty straightforward. But one of my problem is, I can't add the .hgignore file to Mercurial folder. Windows (7) does not allow me to do this, and when I run the command </p> <blockquote> <p>hg add .hgi...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,189
mercurial
# How to add .hgignore to my Mercurial folder? I'm learning to use Mercurial, and its learning curve is pretty straightforward. But one of my problem is, I can't add the .hgignore file to Mercurial folder. Windows (7) does not allow me to do this, and when I run the command > hg add .hgignore , it returns error: > ...
Execute `touch .hgignore` or `echo "" > .hgignore` in the needed directory
20457107
How to clone the OpenJDK Java 8 repository?
12
2013-12-08 18:20:13
<p>How do I clone the OpenJDK repository using mercurial?</p> <p>I would like to clone the Java source code from there to understand what they are developing in JDK8 and would like to co-operate if possible. </p>
3,909
2,579,839
2019-10-15 12:15:14
20,457,154
17
2013-12-08 18:23:38
null
2015-12-09 12:24:54
https://stackoverflow.com/q/20457107
https://stackoverflow.com/a/20457154
<p>The repository is linked on <a href="http://openjdk.java.net/" rel="noreferrer">http://openjdk.java.net/</a>. Clone it and execute the<code>get_source.sh</code> script.</p> <pre><code>$ hg clone http://hg.openjdk.java.net/jdk8/jdk8 $ cd jdk8 &amp;&amp; sh get_source.sh </code></pre> <p>A <a href="http://openjdk.ja...
<p>The repository is linked on <a href="http://openjdk.java.net/" rel="noreferrer">http://openjdk.java.net/</a>. Clone it and execute the<code>get_source.sh</code> script.</p> <pre><code>$ hg clone http://hg.openjdk.java.net/jdk8/jdk8 $ cd jdk8 &amp;&amp; sh get_source.sh </code></pre> <p>A <a href="http://openjdk.ja...
17, 802
java, mercurial
<h1>How to clone the OpenJDK Java 8 repository?</h1> <p>How do I clone the OpenJDK repository using mercurial?</p> <p>I would like to clone the Java source code from there to understand what they are developing in JDK8 and would like to co-operate if possible. </p>
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,190
mercurial
# How to clone the OpenJDK Java 8 repository? How do I clone the OpenJDK repository using mercurial? I would like to clone the Java source code from there to understand what they are developing in JDK8 and would like to co-operate if possible.
The repository is linked on <http://openjdk.java.net/>. Clone it and execute the`get_source.sh` script. ``` $ hg clone http://hg.openjdk.java.net/jdk8/jdk8 $ cd jdk8 && sh get_source.sh ``` A [guide to the OpenJDK repositories](http://openjdk.java.net/guide/repositories.html) and a [How to contribute](http://openjdk....
13631273
Mercurial: graft vs. record vs. qrecord vs. shelve vs. transplant vs. dirstate vs. queue
11
2012-11-29 17:23:25
<p>I am new to Mercurial and still somehow in the evaluation process, so these four concepts are kind of confusing for me. Some are mentioned to be an equivalent to Git's Staging/Index concept, or some even a better one than Git's Staging. </p> <p>How do the four commands <code>hg graft</code>, <code>hg record</code>,...
1,972
1,544,277
2018-12-21 12:31:22
13,631,582
17
2012-11-29 17:42:55
63,147
2018-02-22 12:05:31
https://stackoverflow.com/q/13631273
https://stackoverflow.com/a/13631582
<p>The design of Mercurial simply does not include the concept of a staging area. That is, there is no intermediate state between local modification and commit.</p> <p>Here is an overview of each of the concepts you mentioned:</p> <p><a href="https://www.mercurial-scm.org/repo/hg/help/graft" rel="nofollow noreferrer...
<p>The design of Mercurial simply does not include the concept of a staging area. That is, there is no intermediate state between local modification and commit.</p> <p>Here is an overview of each of the concepts you mentioned:</p> <p><a href="https://www.mercurial-scm.org/repo/hg/help/graft" rel="nofollow noreferrer...
802, 31422
mercurial, shelving
<h1>Mercurial: graft vs. record vs. qrecord vs. shelve vs. transplant vs. dirstate vs. queue</h1> <p>I am new to Mercurial and still somehow in the evaluation process, so these four concepts are kind of confusing for me. Some are mentioned to be an equivalent to Git's Staging/Index concept, or some even a better one th...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,191
mercurial
# Mercurial: graft vs. record vs. qrecord vs. shelve vs. transplant vs. dirstate vs. queue I am new to Mercurial and still somehow in the evaluation process, so these four concepts are kind of confusing for me. Some are mentioned to be an equivalent to Git's Staging/Index concept, or some even a better one than Git's ...
The design of Mercurial simply does not include the concept of a staging area. That is, there is no intermediate state between local modification and commit. Here is an overview of each of the concepts you mentioned: [`hg graft`](https://www.mercurial-scm.org/repo/hg/help/graft) is the equivalent of [`git cherry-pick...
5145174
Accidentally Working on the Wrong Named Branch in Mercurial
11
2011-02-28 17:13:47
<p>I have been making some changes to my working directory, and noticed that I have accidentally been working on the wrong branch. I have not committed anything yet, and I would like my next commit to go against another branch. What is the best way to do this?</p>
1,873
572,140
2011-03-01 08:25:22
5,146,169
17
2011-02-28 18:45:02
8,992
2011-02-28 18:45:02
https://stackoverflow.com/q/5145174
https://stackoverflow.com/a/5146169
<p>The Shelve extension can give you grief, and this can be done entirely with Mercurial commands. Krtek almost had it but he used <code>export</code> instead of <code>diff</code>. Try this:</p> <pre><code>hg diff --git &gt; ~/saved-work.patch hg update --clean desiredbranch hg import --no-commit ~/saved-work.patch ...
<p>The Shelve extension can give you grief, and this can be done entirely with Mercurial commands. Krtek almost had it but he used <code>export</code> instead of <code>diff</code>. Try this:</p> <pre><code>hg diff --git &gt; ~/saved-work.patch hg update --clean desiredbranch hg import --no-commit ~/saved-work.patch ...
802
mercurial
<h1>Accidentally Working on the Wrong Named Branch in Mercurial</h1> <p>I have been making some changes to my working directory, and noticed that I have accidentally been working on the wrong branch. I have not committed anything yet, and I would like my next commit to go against another branch. What is the best way to...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,192
mercurial
# Accidentally Working on the Wrong Named Branch in Mercurial I have been making some changes to my working directory, and noticed that I have accidentally been working on the wrong branch. I have not committed anything yet, and I would like my next commit to go against another branch. What is the best way to do this?
The Shelve extension can give you grief, and this can be done entirely with Mercurial commands. Krtek almost had it but he used `export` instead of `diff`. Try this: ``` hg diff --git > ~/saved-work.patch hg update --clean desiredbranch hg import --no-commit ~/saved-work.patch ```
3373642
How to create a zip of my Mercurial repo for release?
11
2010-07-30 16:49:24
<p>As part of my release process, I want to create a zip file that is basically a dump of the hg working dir at the time of that particular release. What's the easiest way to do this in an automated way?</p> <p>BTW, if I simply "zip -r proj.zip" the zip will contain all sorts of things I don't want -- like compiled f...
2,932
98,003
2010-07-30 17:34:17
3,373,982
17
2010-07-30 17:32:21
19,465
2010-07-30 17:32:21
https://stackoverflow.com/q/3373642
https://stackoverflow.com/a/3373982
<p>Use <code>hg archive</code>:</p> <pre><code>hg archive -t zip /destination/path/zipfile.zip </code></pre> <p>It also takes the standard <code>-r</code> option to archive a revision other than the tip.</p>
<p>Use <code>hg archive</code>:</p> <pre><code>hg archive -t zip /destination/path/zipfile.zip </code></pre> <p>It also takes the standard <code>-r</code> option to archive a revision other than the tip.</p>
802
mercurial
<h1>How to create a zip of my Mercurial repo for release?</h1> <p>As part of my release process, I want to create a zip file that is basically a dump of the hg working dir at the time of that particular release. What's the easiest way to do this in an automated way?</p> <p>BTW, if I simply "zip -r proj.zip" the zip w...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,193
mercurial
# How to create a zip of my Mercurial repo for release? As part of my release process, I want to create a zip file that is basically a dump of the hg working dir at the time of that particular release. What's the easiest way to do this in an automated way? BTW, if I simply "zip -r proj.zip" the zip will contain all s...
Use `hg archive`: ``` hg archive -t zip /destination/path/zipfile.zip ``` It also takes the standard `-r` option to archive a revision other than the tip.
6730735
Troubles with mercurial 1.9 and ssh
10
2011-07-18 09:12:08
<p>Last weekend (16. July 2011) our mercurial packages auto-updated to the newest 1.9 mercurial binaries using the mercurial-stable ppa on a ubuntu lucid.</p> <p>Now pulling from repository over SSH no longer works. Following error is displayed:</p> <pre><code>remote: Traceback (most recent call last): remote: File...
1,052
619,789
2017-06-16 12:55:15
6,731,147
17
2011-07-18 09:51:36
619,789
2011-07-18 09:51:36
https://stackoverflow.com/q/6730735
https://stackoverflow.com/a/6731147
<p>Ok, found a (workaround) solution by editing a python script.</p> <p>Edit the script /usr/share/mercurial-server/hg-ssh At the end of the script replace the line:</p> <pre><code>dispatch.dispatch(['-R', repo, 'serve', '--stdio']) </code></pre> <p>with the line:</p> <pre><code>dispatch.dispatch(dispatch.request([...
<p>Ok, found a (workaround) solution by editing a python script.</p> <p>Edit the script /usr/share/mercurial-server/hg-ssh At the end of the script replace the line:</p> <pre><code>dispatch.dispatch(['-R', repo, 'serve', '--stdio']) </code></pre> <p>with the line:</p> <pre><code>dispatch.dispatch(dispatch.request([...
58, 802
linux, mercurial
<h1>Troubles with mercurial 1.9 and ssh</h1> <p>Last weekend (16. July 2011) our mercurial packages auto-updated to the newest 1.9 mercurial binaries using the mercurial-stable ppa on a ubuntu lucid.</p> <p>Now pulling from repository over SSH no longer works. Following error is displayed:</p> <pre><code>remote: Trac...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,194
mercurial
# Troubles with mercurial 1.9 and ssh Last weekend (16. July 2011) our mercurial packages auto-updated to the newest 1.9 mercurial binaries using the mercurial-stable ppa on a ubuntu lucid. Now pulling from repository over SSH no longer works. Following error is displayed: ``` remote: Traceback (most recent call las...
Ok, found a (workaround) solution by editing a python script. Edit the script /usr/share/mercurial-server/hg-ssh At the end of the script replace the line: ``` dispatch.dispatch(['-R', repo, 'serve', '--stdio']) ``` with the line: ``` dispatch.dispatch(dispatch.request(['-R', repo, 'serve', '--stdio'])) ``` Replac...
4866213
Combination of incoming + outgoing + status?
10
2011-02-01 18:02:11
<p>Is there an hg command that will combine <code>hg incoming</code> + <code>hg outgoing</code> + <code>hg status</code>? </p> <p>This would tell you if there's anything remote that needs to come in, anything committed locally that needs to go out, or any local changes that need to be committed.</p>
955
47,281
2013-05-06 16:33:25
4,866,279
17
2011-02-01 18:07:11
267
2011-02-01 18:07:11
https://stackoverflow.com/q/4866213
https://stackoverflow.com/a/4866279
<p>Though you won't get the actual changesets or files, to get the current status summary, use the summary command:</p> <pre><code>hg summary --remote </code></pre> <p>Example output:</p> <pre><code>C:\Temp\repo&gt; hg summary --remote parent: 5:18ee64a17016 tip Added lots of unit-tests for DatabaseConnection. bran...
<p>Though you won't get the actual changesets or files, to get the current status summary, use the summary command:</p> <pre><code>hg summary --remote </code></pre> <p>Example output:</p> <pre><code>C:\Temp\repo&gt; hg summary --remote parent: 5:18ee64a17016 tip Added lots of unit-tests for DatabaseConnection. bran...
802, 3346
dvcs, mercurial
<h1>Combination of incoming + outgoing + status?</h1> <p>Is there an hg command that will combine <code>hg incoming</code> + <code>hg outgoing</code> + <code>hg status</code>? </p> <p>This would tell you if there's anything remote that needs to come in, anything committed locally that needs to go out, or any local ch...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,195
mercurial
# Combination of incoming + outgoing + status? Is there an hg command that will combine `hg incoming` + `hg outgoing` + `hg status`? This would tell you if there's anything remote that needs to come in, anything committed locally that needs to go out, or any local changes that need to be committed.
Though you won't get the actual changesets or files, to get the current status summary, use the summary command: ``` hg summary --remote ``` Example output: ``` C:\Temp\repo> hg summary --remote parent: 5:18ee64a17016 tip Added lots of unit-tests for DatabaseConnection. branch: default commit: 1 modified ...
11668065
creating new remote repository for existing project with Mercurial
9
2012-07-26 11:14:56
<p>I have a project with version.2 and i have to start working on it to develop a new version.3 . I want to create a new repo on a remote server (i.e. a mercurial-server) so that my team member could access that repo .I have my project file on my local machine .</p> <p>I have two concerned questions :</p> <ol> <li><p...
15,474
307,517
2012-07-26 18:45:20
11,669,832
17
2012-07-26 12:58:00
8,992
2012-07-26 18:44:41
https://stackoverflow.com/q/11668065
https://stackoverflow.com/a/11669832
<p>Without installing additional server side software your team will need ssh accounts on that box. I'm assuming you have one and that you can create them for your friends. If you don't have that setup you're better off just using bitbucket, which is free and provides both ssh and ftp access.</p> <p>Also, you don't ...
<p>Without installing additional server side software your team will need ssh accounts on that box. I'm assuming you have one and that you can create them for your friends. If you don't have that setup you're better off just using bitbucket, which is free and provides both ssh and ftp access.</p> <p>Also, you don't ...
386, 802, 34046
hgrc, mercurial, ssh
<h1>creating new remote repository for existing project with Mercurial</h1> <p>I have a project with version.2 and i have to start working on it to develop a new version.3 . I want to create a new repo on a remote server (i.e. a mercurial-server) so that my team member could access that repo .I have my project file on ...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,196
mercurial
# creating new remote repository for existing project with Mercurial I have a project with version.2 and i have to start working on it to develop a new version.3 . I want to create a new repo on a remote server (i.e. a mercurial-server) so that my team member could access that repo .I have my project file on my local ...
Without installing additional server side software your team will need ssh accounts on that box. I'm assuming you have one and that you can create them for your friends. If you don't have that setup you're better off just using bitbucket, which is free and provides both ssh and ftp access. Also, you don't say if you p...
4319232
Mercurial, "Branching with bookmarks"
9
2010-11-30 22:14:03
<p>I read this document: <a href="http://stevelosh.com/blog/2009/08/a-guide-to-branching-in-mercurial/" rel="noreferrer">A Guide to Branching with Mercurial</a>, specifically the section titled <a href="http://stevelosh.com/blog/2009/08/a-guide-to-branching-in-mercurial/#branching-with-bookmarks" rel="noreferrer">Branc...
4,223
267
2018-02-22 12:14:48
4,324,493
17
2010-12-01 12:47:01
151,299
2018-02-22 12:14:35
https://stackoverflow.com/q/4319232
https://stackoverflow.com/a/4324493
<p>If I got you right, you want <em>only the bookmark you've updated</em> to move on the next commit. For this purpose the bookmarks extensions has the <code>track.current</code> option.</p> <p>From <a href="https://www.mercurial-scm.org/wiki/BookmarksExtension#Configuration" rel="nofollow noreferrer">BookmarksExtensi...
<p>If I got you right, you want <em>only the bookmark you've updated</em> to move on the next commit. For this purpose the bookmarks extensions has the <code>track.current</code> option.</p> <p>From <a href="https://www.mercurial-scm.org/wiki/BookmarksExtension#Configuration" rel="nofollow noreferrer">BookmarksExtensi...
802, 1879, 2416
bookmarks, branch, mercurial
<h1>Mercurial, "Branching with bookmarks"</h1> <p>I read this document: <a href="http://stevelosh.com/blog/2009/08/a-guide-to-branching-in-mercurial/" rel="noreferrer">A Guide to Branching with Mercurial</a>, specifically the section titled <a href="http://stevelosh.com/blog/2009/08/a-guide-to-branching-in-mercurial/#b...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,197
mercurial
# Mercurial, "Branching with bookmarks" I read this document: [A Guide to Branching with Mercurial](http://stevelosh.com/blog/2009/08/a-guide-to-branching-in-mercurial/), specifically the section titled [Branching with Bookmarks](http://stevelosh.com/blog/2009/08/a-guide-to-branching-in-mercurial/#branching-with-bookm...
If I got you right, you want *only the bookmark you've updated* to move on the next commit. For this purpose the bookmarks extensions has the `track.current` option. From [BookmarksExtension](https://www.mercurial-scm.org/wiki/BookmarksExtension#Configuration): > By default, when several bookmarks point to the same c...
970669
How to swap Mercurial Queues in and out of a repository
9
2009-06-09 15:10:32
<p>I have a platform neutral mercurial code repo called "Simulator"</p> <p>and want to apply patches that target specific platform's optimizations before a build. </p> <p>According to the guide we can accomplish this by the use of patches with guards.</p> <ul> <li>Windows Experimental.patch +windows</li> <li>Unix E...
1,902
279,750
2010-11-21 20:30:42
970,905
17
2009-06-09 15:48:02
115,023
2009-06-09 16:07:28
https://stackoverflow.com/q/970669
https://stackoverflow.com/a/970905
<p>Interesting use of Mercurial Queues :)</p> <p>I assume here that you are already versioning your mercurial queues somewhere. If you don't/for those that don't know how to do this, have a look at <a href="http://hgbook.red-bean.com/read/managing-change-with-mercurial-queues.html#sec:mq:repo" rel="noreferrer">the rel...
<p>Interesting use of Mercurial Queues :)</p> <p>I assume here that you are already versioning your mercurial queues somewhere. If you don't/for those that don't know how to do this, have a look at <a href="http://hgbook.red-bean.com/read/managing-change-with-mercurial-queues.html#sec:mq:repo" rel="noreferrer">the rel...
802, 32068
mercurial, mercurial-queue
<h1>How to swap Mercurial Queues in and out of a repository</h1> <p>I have a platform neutral mercurial code repo called "Simulator"</p> <p>and want to apply patches that target specific platform's optimizations before a build. </p> <p>According to the guide we can accomplish this by the use of patches with guards.<...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,198
mercurial
# How to swap Mercurial Queues in and out of a repository I have a platform neutral mercurial code repo called "Simulator" and want to apply patches that target specific platform's optimizations before a build. According to the guide we can accomplish this by the use of patches with guards. - Windows Experimental.p...
Interesting use of Mercurial Queues :) I assume here that you are already versioning your mercurial queues somewhere. If you don't/for those that don't know how to do this, have a look at [the relevant section from the hgbook](http://hgbook.red-bean.com/read/managing-change-with-mercurial-queues.html#sec:mq:repo): it'...
7351076
how to ignore files in kiln/mercurial using tortoise hg "that are part of the repository"
8
2011-09-08 16:01:41
<p>We use tortoise hg with Kiln. In my vs 2010 c# project there are some files that are part of the repository but I would like tortoise hg to ignore them when I make a commit. For eg., say in a login screen I may hard code the userid, password for testing. I dont really want this file considered during a commit. I un...
2,591
666,490
2018-02-27 15:13:04
7,351,306
17
2011-09-08 16:21:18
6,884
2011-09-08 16:39:56
https://stackoverflow.com/q/7351076
https://stackoverflow.com/a/7351306
<p>I always use a combination of .hgignore and <code>BeforeBuild</code> (in the .csproj file) for things like this.</p> <p>In one of my pet projects, I have the following setup:</p> <p><code>App.config</code> contains my real hardcoded user id and password for testing.<br> <code>App.config.example</code> is identical...
<p>I always use a combination of .hgignore and <code>BeforeBuild</code> (in the .csproj file) for things like this.</p> <p>In one of my pet projects, I have the following setup:</p> <p><code>App.config</code> contains my real hardcoded user id and password for testing.<br> <code>App.config.example</code> is identical...
802, 3346, 8122, 43091
dvcs, kiln, mercurial, tortoisehg
<h1>how to ignore files in kiln/mercurial using tortoise hg "that are part of the repository"</h1> <p>We use tortoise hg with Kiln. In my vs 2010 c# project there are some files that are part of the repository but I would like tortoise hg to ignore them when I make a commit. For eg., say in a login screen I may hard co...
q.PostTypeId = 1; a.PostTypeId = 2; EXISTS tag '%mercurial%' OR '%hg%'; a.Body contains code block; q.Score > 5; a.Score > 10
24,199
mercurial
# how to ignore files in kiln/mercurial using tortoise hg "that are part of the repository" We use tortoise hg with Kiln. In my vs 2010 c# project there are some files that are part of the repository but I would like tortoise hg to ignore them when I make a commit. For eg., say in a login screen I may hard code the us...
I always use a combination of .hgignore and `BeforeBuild` (in the .csproj file) for things like this. In one of my pet projects, I have the following setup: `App.config` contains my real hardcoded user id and password for testing. `App.config.example` is identical, but with fake data like "dummy_user" and "dummy_pw...