I recently needed to strip some changesets from my Mercurial repository. I then tried to run a build from TeamCity but got the following error message:
[09:44:25]: Updating sources: agent side checkout... (16s)
[09:44:42]: [Updating sources: agent side checkout...] Failed to perform checkout on agent: 'cmd /c hg update -C -r 507b8c8f4cdb' command failed. stderr: abort: unknown revision '507b8c8f4cdb'!
The error makes sense since the changeset no longer exists in the repo, but I don't know how to reset TeamCity to pull from the new tip. I'm guessing that I could copy the TeamCity build configuration to a new build, but then I'd lose my history.
Is this possible? Or have I corrupted my TeamCity build and need to start up a new one?
Add a new commit to the repository so that the tip revision gets updated.
Related
My Phabricator stopped pulling new commits a few days ago, I tried to look at my repository in Diffusion, but an error occured:
Command failed with error #255!
COMMAND
hg --config ui.ssh='/var/www/phabricator/bin/ssh-connect' files --print0 --rev ''\''d753179d2d3defe5b6504c0f4d30f1dd9fb72766'\''' -I '.'
STDOUT
(empty)
STDERR
abort: integrity check failed on 00changelog.i:42440!
42440 was the last commit pulled from my repository. Is that a problem with my repo or with Phabricator? I cannot find anything useful.
Yes, it's a problem with your clone of repo. you can use any of described in related topic methods (starting from hg verify locally and remote) and if 42440 is damaged only in your clone get new good clone
JFYI: https://www.mercurial-scm.org/wiki/RepositoryCorruption
I'm getting the following error when attempting to commit to a Hg repository:
Z:\wormcard_maker>hg commit -m "asdf"
transaction abort!
rollback completed
abort: phases.new-commit: not a valid phase name ('')
This happens over multiple different repositories and has survived re-cloning the repository and reinstalling Mercurial. I can commit to the repository fine from a different computer (running Linux).
I'm running Hg 4.8 as distributed with TortoiseHg 4.8 on Windows 7.
In TortoiseHg just set the "File - Settings - Commit - New Commit Phase" option.
I tried using the THG setting but it didn't work; just kept producing the same error.
(While doing this I noticed that the THG dropdown for the phase choices had a bunch of blank lines in it; so I think THG was confused.)
Instead I manually edited my HGRC file and made sure it contained:
[phases]
new-commit = secret
which worked.
You could obviously use draft, etc. in place of secret.
Neither of the other answers worked for me - even though I had new-commit = secret in the HGRC it still produced the error.
The workaround I found was to do this:
hg ci -m "message" --config phases.new-commit=secret
which did work, apparently by overriding whatever invalid phase name hg was trying to use. Even though I don't know why.
I assume this would work with other comments, not just ci (aka commit).
# hg push
returns this following error shown in the below image:
I have pull the VexsysMindsCSCKrishna branch by following command:
#hg pull -b VexsysMindsCSCKrishna <https://bitbucket.org>
#hg update VexsysMindsCSCKrishna
My working branch is VexsysMindsCSCKrishna so I add,commit but when I try to push gives me error shown in the above figure . Is this the right step to checkout remote branch locally ? I don't know where the problem is and #hg push --force is also not helpful.
You do not have permission to push to that branch on the server you are pushing to. Fixing this will require changing the settings on the server.
It is my first time using Mercurial and I am having trouble with it.
I used hg add * and now I am trying to commit by using the hg com command but It's giving me back this error:
Nathans-MacBook-Pro:biogene Nathan$ hg com -m "First time commit"
abort: could not lock repository /Applications/MAMP/htdocs/merc/biogene: No such file or directory
Can anyone provide any insight as to what's going on? That directory certainly exists as I am currently inside of it.
Have you created a repository here first?
hg init
Before explaining my problem let me tell you the Mercurial setup,
We have the following repos,
RELEASE
DEVELOPMENT
BUGFIX
All the above repo are running on a central server using IIS and hgwebdir.cgi
Now coming to the problem,
I clone a local repo from DEVELOPMENT repo.
I make changes to the clone and commit (Not push).
I make a bundle from the clone and pass the bundle to QA who has cloned the RELEASE repo.
Now I try to apply the bundle to the RELEASE repo clone using hg unbundle
I get an error, abort: error: ftp error: no host given
What am I doing wrong? Can you give solution to the above problem keeping a Windows setup in mind?
It really sounds like you have a syntax error in your unbundle command. The normal usage is just:
hg unbundle c:\path\to\the.bundle
there's no ftp involved unless you're trying to use a ftp:// URL which isn't supported. Is it possible you have a directory named ftp and the parser is mistakign it for a component in a ftp URL?
Also, most folks wouldn't use bundles in the scenario you're describing. They'd just do:
hg push URL-or-file-path-to-QA
and push direct to QA's own repo (not to RELEASE)
People generally use bundles only when a network connection isn't possible or practical.
I experienced the same problem, I don't think hg likes uncs.
I mapped \server\DevSourceCode\Mercurial to R: and it worked fine, see below:
R:\Repositories\myproj>hg unbundle \\server\DevSourceCode\Mercurial\ChangeBundles\myproj_changes.hg
abort: error: ftp error: no host given
R:\Repositories\myproj>hg unbundle R:\ChangeBundles\myproj_changes.hg
adding changesets
adding manifests
adding file changes
added 0 changesets with 0 changes to 139 files
(run 'hg update' to get a working copy)