Questions tagged [mercurial]
Mercurial is a fast, open-source DVCS (Distributed Version Control System).
8,245
questions
2
votes
1
answer
22
views
How to uncommit one file in a series of commits in TortoiseHG (Mercurial)?
Hi,
I've just joined a new company, and they are using TortoiseHG for version control, but due to some IT restrictions have never got this setup properly (hopefully due to change soon). This means I ...
2
votes
1
answer
44
views
Finding changes to a block of text with mercurial
I have a text file that I'd like to track changes with. It's a file that stores values (as well as strings and arrays) and has the following format for its entries:
NAME: some_name
UNIT: some_unit
...
1
vote
0
answers
25
views
UnicodeDecodeError while pulling in mercurial (hg) UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 4: ordinal not in range(128)
This error occurred while pulling in Mercurial, couldn't even commit or push for all the actions the same error is occurring. This didn't occur to me in past and I'm using the same Mercurial version 6....
2
votes
0
answers
36
views
Can SharePoint be used for mercurial repositories?
Can I use a SharePoint folder to store a mercurial repository? I've read OneDrive may not be a good option for git (also here) but I have not seen anything specific (either pro or con) to SharePoint ...
1
vote
0
answers
26
views
Sequentially Fixing and Merging Linear Series of Branches in Mercurial (TortoiseHG)
Image of my messed up branching:
Each different colour is a different branch. As can be seen each branch is built linearly off one-another. And the changes in each branch do not affect each other.
I ...
2
votes
0
answers
14
views
How can I confirm which changeset mercurial has invoked merge tool for?
I had edited a file in several changesets, lets say four for this example, and went back to make a change using hg histedit. Marked the initial changeset and then made the change that I wanted. When ...
2
votes
0
answers
12
views
Is there an option to make TeamCity clone a Mercurial repository with minimal processing instead of init/pull?
We have an old TeamCity server that uses an old Kallithea on Windows. One of our projects has become relatively big and now only clonable with "--stream" option. Without it the "remote ...
2
votes
0
answers
19
views
Command "hg log <dir_name>" works incorrect
I had to deal with VCS Mercurial.
I have repo with next structure:
.
..
.hg
.hgignore
.last_commit.txt
css
img
index.html
When i am using command hg log css/ i get next output:
changeset: 5:...
2
votes
1
answer
36
views
Mercurial corruption? "No such file or directory"
I'm currently running Mercurial 6.4.2. I've been using TortoiseHg for a long time and just started running into this recurring issue where if I update some files in specific folders, or if I delete ...
0
votes
0
answers
28
views
Mercurial and netbeans is there a way to return a file to a specific date?
I have a project with severial files. I want to return 3 of those files to a specific date in time. I used this.
But this so misleading. When I supposedly would recover all the code of 2018. But it ...
1
vote
1
answer
37
views
Different SSH ports/keys for different hosts, with TortoisePLink
TortoiseHg (Mercurial) normally uses TortoisePLink/plink to connect via SSH. Different SSH hosts have different settings, including private keys and ports to connect to.
In its global hgrc settings, ...
2
votes
0
answers
31
views
How to set permissions for hg init in Mercurial?
I am running Mercurial 6.2.3 on Ubuntu 20.04.6 LTS.
I can run hg init without any problems in the home directory.
However the same command on a mounted disk fails with the following error:
abort: ...
0
votes
0
answers
12
views
Mercurial ( Tortoise hg ) clone creates subdirectory on clone command from within Jenkins
I updated a pretty old Jenkins environment including the Jenkins version and plugins due to security issues. ( windows server 12) We use mercurial for version control and Tortoise HG to use it.
Before ...
2
votes
0
answers
23
views
.hgignore not matching / with negative look-ahead
I want to use this pattern in my .hgignore:
syntax: regexp
(?<![^/])\.(?!(idea|yarn)/)
i.e. match all files/directories starting with a . other than the .idea/ and .yarn/ directories.
However, ...
1
vote
0
answers
24
views
How to use `hg amend` with HgGit to avoid `unknown revision` errors
Whenever I use hg amend or other commands that change history (for example hg rebase -s ... -d ...), certain commands, including hg push start to fail with abort: unknown revision error:
$ hg push -B ...
3
votes
2
answers
81
views
How to make Kaleidoscope diff app's ksdiff work with Mercurial / hg
Kaleidoscope is a really useful diff tool for Mac. It integrates with git difftool by adding this to your ~/.gitconfig:
[difftool "Kaleidoscope"]
cmd = ksdiff --partial-changeset --...
2
votes
1
answer
31
views
What is the Mercurial equivalent of git checkout --patch (aka -p)?
The Git command git checkout --patch <commit> allows you to interactively apply hunks from the diff between HEAD and <commit> to your worktree. In other words it allows you to prepare a ...
0
votes
0
answers
43
views
I am trying to migrate mercurial repos to gitlab in windows machine by using hg-fast-export tool, its throwing an error
I am trying to migrate mercurial repos to GitLab in windows machine by using hg-fast-export tool, packages installed Python-2.7.16 and mercurial 4.6.1. its throwing an error.
export tool repo iam ...
2
votes
0
answers
24
views
Merge failed because "outstanding uncommitted changes", but "hg status" indicates there are none
We are using Mercurial. On one of our development computers, the merge fails because of "uncommitted changes". However, "hg status" gives no output, indicating that there are no ...
2
votes
2
answers
82
views
How to migrate specific files from Mercurial to gitlab with commit history?
I have a case to migrate only one folder from Mercurial(Hg) to Gitlab (not the entire repository) with its history.
I came across hg-fast-export but I am not sure if we can export only a few files to ...
3
votes
1
answer
34
views
How do I branch on a past Revision in Mercurial
I have a code base in Mercurial and I am using TortoiseHg 5.0.2. I am the only developer though I do rarely merge in some low level stuff from another developer. This should make my ask a bit easier. ...
1
vote
0
answers
3k
views
Problem with Jenkins and Mercurial repository
I have Jenkins installed on an ubuntu distribution. From Jenkins I need to be able to access a remote Mercurial repository via ssh and that, every time a commit is performed in this repository, I am ...
1
vote
0
answers
42
views
How to separate topics in mercurial
I have the following structure in my mercurial branch history:
o topicA
|
|
o topicB
|
|
o public_branch
This is a linear dependency between the three, as we can see.
I need a hg command (or set of ...
1
vote
0
answers
16
views
Syncing configuration files from production server to mercurial repository
We have an admin page that allows us to upload and update a configuration file on our production server. We want to maintain a record of all changes made to the configuration file, so we need to push ...
3
votes
0
answers
50
views
Code review options for Mercurial repository [closed]
We use Mercurial as our code repository. Currently we are manually reviewing the code changes and all the developers are directly committing into main branch (single branch).
Please suggest possible ...
2
votes
1
answer
35
views
Mercurial .hgignore file on Windows
Using mercurial on Windows 10.
I have a .hgignore which reads so
syntax: glob
._site/**
When I run hg status I get
? .hgignore
? _posts\T1C.save
? _site\Tate\index.html
? _site\X1Ct\index.html
? ...
3
votes
1
answer
90
views
Why is the file I expect to be present missing after the final merge commit in Mercurial?
I ran into a situation in Mercurial at work where I would expect a file to exist, but it doesn't and I'd like to better understand why. I've put together a repro of the issue. In this repro I would ...
1
vote
1
answer
110
views
Mercurial (TortoiseHG) command-line on Windows does not respond to pager environment variables (and fails to use a pager at all)
When I run commands such as hg log, I expect to see the output in a pager. I have configured my repository .hg\hgrc to use less:
...
[pager]
pager = C:\path\to\bin\less.exe
...
I have confirmed that ...
1
vote
1
answer
29
views
Adding layer to mercurial directory
I have a Mercury repo and I need to rename a directory from /animal/dog/ to /animal/mammal/dog/. So I did
hg rename /animal/dog/ /animal/mammal/dog/
But I get an error that says
abort: destination /...
2
votes
0
answers
17
views
Mercurial 'hg commit --logfile' working from commandline but not Python
I'm auto-generating 'hg add' then 'hg commit' commands and executing from Python 3.8 on Win 10.
The automation writes the commit template out to a temp file then passes it to the hg commit command ...
5
votes
2
answers
60
views
Pass file list to Mercurial 'hg add' command from text file
I'm attempting to add about 40k files to Mercurial using 'hg add' on Win 10. Due to downstream constraints I need to split this up into chunks of 10k files for each add/commit, therefore I need to ...
2
votes
2
answers
33
views
Mercurial - how to retrieve orig file after a revert?
I accidentally ran hg revert and lost all changes to my file foo.js. I see that a backup of the file exists as foo.js.orig. How can I add the orig file back so that I can reinstate my changes?
Update: ...
2
votes
1
answer
86
views
Git does not recognise files with umlauts correctly on Windows 11 after migration from Mercurial
I try a migration from a Mercurial repository to Git on Windows 11 in the following way in Git Bash:
MINGW64$ ls
hg-repo/ git-repo/
MINGW64$ cd git-repo
MINGW64$ git init
MINGW64$ ~/fast-export/hg-...
3
votes
1
answer
39
views
Committed and pushed incorrect revision in TortoiseHg
I accidentally committed and pushed the incorrect revisions and was wondering if there was a way to undo the changes?
I used the rollback feature in TortoiseHg, but I don't believe that works when a ...
2
votes
2
answers
53
views
Rewriting non-linear history in Mercurial / Hg?
I want to hide a topological head (leftover not included into merge of feature branch) without damaging history graph.
The common solution is to merge closing branch commit back to default but this ...
1
vote
1
answer
41
views
TortoiseHG (Mercurial) - Push branch = abort: push creates new remote head
I closed a public branch inside Tortoise and want to push the change but I get this error:
abort: push creates new remote head 2756e9fac9ea on branch '4.4.72'!
2
votes
0
answers
59
views
SOLVED: Remote mercurial server fails in changegroup.notify with an exception
Pushing changes to a remote mercurial repo is reporting an error in my changegroup.notify hook. It worked with an old 2.7 release of mercurial, but is broken now.
My server has
Python 3.9, hg --...
2
votes
1
answer
93
views
How can I filter tortoisehg (Mercurial) to not show branches containing part of a string?
Our Mercurial/HG repo has a fair amount of wip feature branches, and I would like to be able to create a cleaner view and filter out any branches containing part of a string.
I know I can specify ...
1
vote
0
answers
19
views
how to give mercurial access through PPK key
When I try to clone the project on a formatted computer I get an error because I don't have access permission to the repositories. I try to clone to project using net beans "clone other" ...
2
votes
0
answers
91
views
Error while cloning Thunderbird's Mercurial repository
I wanted to clone the Mozilla Thunderbird repository to my PC.
I used the official guide (here) and tried to clone several times, but after a few minutes it always throws an error.
there is always the ...
3
votes
1
answer
117
views
How do I change TortoiseHg default UI font?
The default TortoiseHg / Hg Workbench UI font appears too small on a system running Win 11 Pro with ClearType disabled. Notably thinner and smaller than other applications.
I'm using TortoiseHg 6.2.3
...
1
vote
1
answer
122
views
Hg push a new branch to remote
how to push a branch to remote not merge with default in hg ?
1
vote
0
answers
30
views
Is it possible to switch repository in Mercurial Command Server protocol?
I'm batch processing lots of Mercurial repositories and I want to save CPU time by avoiding fork.
I can use internal Mercurial API: https://www.mercurial-scm.org/wiki/MercurialApi to create objects ...
1
vote
1
answer
18
views
Why different results of revsets received?
Revset 1
hg log -r "first(sort(date('Nov 2022'),date))"
Result
changeset: 2180:f6cfbc5fcd0c
...
date: Wed Nov 02 09:47:13 2022 +0100
Revset 2
The same (seems so) logic, less code
...
0
votes
1
answer
110
views
How do I get SourceTree my credentials for a custom Mercurial endpoint?
I've been trying to get SourceTree to communicate with my company's Mercurial remote repository but I seem to be failing. On the command line, I can get hg pull working just fine (it authenticates ...
0
votes
2
answers
38
views
Window Tortoisehg, realised I cannot use Bitbucket, is there free alternative for home use (with cheap annual subscription) which is easy to setup
Window Tortoisehg, realized I cannot use Bitbucket, is there free alternative for home use (with a cheap annual subscription) that is easy to setup. Many answer found here are outdated since Bitbucket ...
3
votes
0
answers
53
views
TortoiseHG: Folder showing unversion overlay although files inside have green check mark
I created a local repo and added a folder into it
however, all the files in the folder appear with the green check mark
but the folder itself appears with the Unversion overlay (Blue question mark) on ...
0
votes
0
answers
113
views
Error when cloning a repository mozilla-central
I get this error when just cloning the mozilla source code repository, can you tell me what the problem is?
or
When cloning via TortoiseHg GUI I get the following error
The remote host forcibly ...
1
vote
1
answer
45
views
404 when trying to clone geckodriver
I am trying to clone this project with mercurial:
https://hg.mozilla.org/mozilla-central/file/tip/testing/geckodriver
I have downloaded TortoiseHg and selected clone repository.
It gives 404 error:
%...
2
votes
1
answer
41
views
How can I use pass as credentials helper for Mercurial
In git I can use pass as a credential helper ^1.
[credential "https://github.com"]
helper = !pass git/rlue@github
Can I set up Mercurial/hg to also delegate password management to the ...