I am using eclipse helios 3.2 for the development purpose also i am using Mercurial 3.2,Tortoise HG for configuration management but when i want to pull the repositories from bitbucket it shows the error that hg root not known.And also when i synchronise my changes then it shows the error that Authrization Failed
I am pulling the request by right clicking on project and selecting the Team option then selecting pull suboption but it shows the error that hg root is not known
please let me know why this issue arising
Thanks
Umesh
Related
I am working with a mercurial repository and switched from installing hg via one package manager (nix) to another (guix).
Now I get the error message
% hg pull
abort: accessing `persistent-nodemap` repository without associated fast implementation.
(check `hg help config.format.use-persistent-nodemap` for details)
And cannot interact with the repo anymore. How can I circumvent hg's attempt at trying to use persistent-nodemap. my repo is a few lines of code and I don't need any performance optimisation.
I need to control the version of a few files accessible via an SMB share. These files will be modified by several people. The files themselves are directly used by a web server.
Since these are production files I wanted to force the users to pull a local copy, edit them, commit and push them back. Unfortunately there is no Mercurial server on that machine.
What would be the appropriate way to configure Mercurial on my side so that:
the versioning (.hg directory) is kept on the share
and that the files on the share are at the latest version?
I do not have access to this server (other than via the share). If I could have a mercurial server on that machine I would have used a hook to update the files in the production directory (I am saying this just to highlight what I want to achieve - this approach is not possible as I do not control that server)
Thanks!
UPDATE: I ended up using an intermediate server (which I have control over). A hook on changegroup triggers a script which i) hg update to have fresh local files ii) copies them to the SMB share
EDIT 1 Following discussions in comments with alex I have looked at the verbose version of the command line output. The \\srv\hg\test1 repo has a [hooks] section with changegroup = hg update. The output from a hg push -v gives some insights:
pushing to \\srv\hg\test1
query 1; heads
(...)
updating the branch cache
running hook changegroup: hg update
'\\srv\hg\test1'
CMD.EXE was started with the above path as the current directory.
UNC paths are not supported. Defaulting to Windows directory.
abort: no repository found in 'C:\Windows' (.hg not found)!
warning: changegroup hook exited with status 255
checking for updated bookmarks
listing keys for "bookmarks"
If I understand correctly the output above:
a cmd.exe was triggered on the client, even though the [hook] was on the receiving server
it tried to update the remote repo
... but failed because UNC are not supported
So alex's answer was correct - it just does not work (yet?) on MS Windows. (Alex please correct me in the comments if I am wrong)
If I understood correctly, you are looking for two things:
A repository hook that will automatically update the production repo to the latest version whenever someone pushes to it. This is simple: You're looking for the answer to this question.
If you can rely on your co-workers to always go through the pull-commit-push process, you're done. If that's not the case, you need a way to prevent people from modifying the production files in place and never committing them.
Unfortunately, I don't think you can selectively withhold write permissions to the checked-out files (but not to the repo) on an SMB share. But you could discourage direct modification by making the location of the files less obvious. Perhaps you could direct people to a second repository, configured so that everything pushed to it is immediately pushed on to the production repository. This repo need not have a checked-out version of the files at all (create it with hg clone -U, or do an hg update -r 0 afterwards), eliminating the temptation to bypass mercurial.
What prevents you from mount your Samba share and run hg init there? You don't need mercurial server (hg serve or more sophisticated things) to perform push/pull operations.
I've set up TeamCity (v6.5.5 - build 18087) to build an ASP.NET project from Mercurial. Twice in 56 build now I have got the error below, and the only common denominator I can see is that these changesets had files added to them.
If I clear the server's mercurial cache I get rif of the problem until next time, but that's not a great solution.
I've seen posts from people with similar problems, but haven't found a solution from reading them.
Would be thankful if someone can point me in the right direction here.
From TeamCity build log:
[20:54:21]: Patch is broken, can be found in file: C:\BuildAgent\temp\cache\temp547491181020464280patch_64
[20:54:21]: Failed to build patch for build #56 {build id=64}, VCS root: mercurial: http://server:8000 {instance id=1, parent id=2}, due to error: 'cmd /c hg cat -o C:\TeamCity\temp\mercurial9111169551826812670catresult\%p -r 75f205de9192 website\MasterPage.master website\MasterPage.master.designer.cs website\OurProject.csproj website\Login.aspx website\Login.aspx.designer.cs website\apage.aspx website\apage.aspx.designer.cs website\anotherpage.aspx website\anotherpage.aspx.designer.cs website\thirdpage.aspx website\thirdpage.aspx.designer.cs' command failed. stderr: abort: data/website/thirdpage.aspx.i#2b64b5d6eb86: no match found!
jetbrains.buildServer.agent.impl.patch.PatchDownloaderImpl$1: Server was not able to build correct patch, most likely due to VCS errors, will try again. at jetbrains.buildServer.agent.impl.patch.PatchDownloaderImpl.throwError(PatchDownloaderImpl.java:113) at jetbrains.buildServer.agent.impl.patch.PatchDownloaderImpl.checkPatch(PatchDownloaderImpl.java:103) at jetbrains.buildServer.agent.impl.patch.PatchDownloaderImpl.copyPatchAndCheck(PatchDownloaderImpl.java:64)...
We are migrating to Mercurial, and of course, we need to update our CruiseControl.Net build process to use it instead of Visual SourceSafe.
We updated our CruiseControl config file with the following block:
<sourcecontrol type="hg" autoGetSource="true">
<executable>C:\Program Files\Mercurial\hg.exe</executable>
<repo>https://bitbucket.org/GTSDevs/galaxy</repo>
<workingDirectory>C:\Cruise Control\Releases\5.0.0\source</workingDirectory>
<branch>master</branch>
<multipleHeadsFail>false</multipleHeadsFail>
<tagOnSuccess>true</tagOnSuccess>
<timeout units="minutes">20</timeout>
</sourcecontrol>
This worked well until we pushed some code to our repository with a branch in it. Now our build fails with the following error:
ThoughtWorks.CruiseControl.Core.CruiseControlException: Source control operation failed: abort: crosses branches (merge branches or use --clean to discard changes)
. Process command: C:\Program Files\TortoiseHg\hg.exe update -r master --noninteractive
at ThoughtWorks.CruiseControl.Core.Sourcecontrol.ProcessSourceControl.Execute(ProcessInfo processInfo)
at ThoughtWorks.CruiseControl.Core.Sourcecontrol.Mercurial.Mercurial.GetSource(IIntegrationResult result)
at ThoughtWorks.CruiseControl.Core.IntegrationRunner.Build(IIntegrationResult result)
at ThoughtWorks.CruiseControl.Core.IntegrationRunner.Integrate(IntegrationRequest request)
All the information I can find on the error appears to pertain to doing an update.
Can anyone help out with getting past this?
Is there something more we should be doing in our ccnet.config file to support Mercurial?
Some ideas:
the best way would be to add a new parameter to the Mercurial source control block in order to add the --clean command line parameter
mercurial support in CruiseControl.NET - how to clean & update build folder?
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)