Mercurial Error 10061 only on some branches - version-control

I am using a very large Mercurial repository. I have done a clean clone of the repository.
When I try to update to the latest revision of the "default" branch I get the following error:
Error 10061 No connection could be made because the target machine actively
refused it.
After much trial and error I have found that branches whose ancestor is rev 1000 give me this error.
However, branches whose ancestor is rev 999 do not give me this error and I can update to them just fine.
Others who use this repository do not seem to have this issue.
I have done searches, but most people who get this error are having proxy or connection issues. I wouldn't think I have either of these issues because I can clone and update to some branches just fine.
What is causing this?
Edit
I have updated to the latest version of Tortoise-Hg with the same results.

I finally figured it out. I had a conflict of hgrc files.
The main project hgrc file had a default path address that could be accessed outside the company. A submodule had an hgrc file with a default path address that could only be accessed within the company subnet.
For some reason the conflict of addresses didn't allow me to update, even if I was using VPN to access the company subnet.
The submodule was added at rev 1000. Which is why I could do updates with revs below 1000 or branches that didn't have rev 1000 merged in.
By changing both hgrc files to use the same default path address that can be seen outside the company subnet fixed the issue.

Related

GitHub shows banner: ... repository doesn't contain the 'none' path in 'master'

As title. Recently GitHub keeps showing me a banner complaining that one of my Repo. seems to have some problem. Does anyone know what would cause this warning? And how to disable it?
The only clue I have is that this usually happened when I force push some commits to the repo.
Had the same warning since upgrading our GitHub Enterprise to 3.6.3 on one of our repos.
Turns out that one of the files within the repo contains a reference to a file which is no longer in the master branch. For me, it was simply that the readme was pointing to an image file which was no longer present. Where you have 'none', mine had reference to an svg file. If you do a text search for 'none' you might find where the problem is.
The fix was is to simply remove the reference to the missing file or re-add it back to the affected branch.
EDIT
Looks like the official GHE v3.6.x release notes have now been updated to include the following which I believe is the cause of this experience:
Following an upgrade to GitHub Enterprise Server 3.6 or later, existing inconsistencies in a repository such as broken refs or missing objects, may now be reported as errors like invalid sha1 pointer 0000000000000000000000000000000000000000, Zero-length loose reference file, or Zero-length loose object file. Previously, these indicators of repository corruption may have been silently ignored. GitHub Enterprise Server now uses an updated Git version with more diligent error reporting enabled. For more information, see this upstream commit in the Git project.

How to correct «unable to merge unrelated histories»?

I use github desktop (https://desktop.github.com ) while developing the application with several other people, so, for some reason, when trying to merge two branches into one, the error "unable to merge unrelated histories" is displayed for one of the target branches.
What could be the problem?
First of all: You may also be able to find a solution using the search.
Potential reasons for the error message
From: https://komodor.com/learn/how-to-fix-fatal-refusing-to-merge-unrelated-histories-error
Here are some common scenarios where fatal: refusing to merge unrelated histories can occur.
You have a new Git repository with some commits. You then try to pull from an existing remote repo. The merge becomes incompatible because the histories for branch and remote pull are different. Git sees the situation as you trying to merge two completely unrelated branches, and it doesn’t know what to do.
There’s something wrong with the .git directory. It may have been accidentally deleted at some point or got corrupted. This can happen if you’ve cloned or cleaned a project. Here the error occurs because Git doesn’t have the necessary information about your local project’s history.
The branches are at different HEAD positions when you try to push or pull data from a remote repo and cannot be matched due to a lack of commonality.
Options to resolve the issue
The article describes two options on how to resolve/avoid such issues but targets command line /terminal users. I guess I would prefer option 2 over option 1 anyway, also using git in the terminal.
The article explains it like this:
The alternative (and longer) way of fixing refusing to merge unrelated histories issues is to unstage your current commits, stash them, clone your required remote repository, and then place your stashed branch contents into the new clone. This will ensure that any conflicts that you may encounter in the code are addressed before merging and prevent application errors from occurring.
How it (should) work in GitHub Desktop
In GitHub Desktop you should be able to use a modified version of option 2:
To unstage all the files in your last commit, double click staged files. This moves them to the unstaged area. Learn more in this GitHub issue.
To stash your unsaved files, right-click an unstaged file. Learn more about stashing files.
This will give you a clean working tree to pull your remote repository into. Once you’ve successfully pulled into your branch, you can:
unstash your files (see link above again) to reapply them to your current working copy.
commit them as a separate commit.
resolve any file conflicts that you may have.
I hope this explanation adds some clarity. Let me know if there are any wrong or misleading information in my text please.
This problem has several reasons.
But probably your project clone just differs from GitHub (main project).
First of all, save your project (because you probably don't want to code everything again).
Remove repo from GitHub desktop (not GitHub!!!)
Go to the project page in GitHub
Click code, open with GitHub Desktop, and code again.

GitHub - Desktop App Inserts Text Into My Code When I Sync

When I sometimes use the GitHub Desktop App and Sync to get whatever changes were made to repo, it inserts strings into my code like this:
>>>>>>> origin/master
Why is it doing this? I haven't found anything online that talks about this problem. Am I using the app right? The same thing happens to my coding partners as well.
>>>>>>> origin/master is a merge marker, which is Git's way of representing merge conflicts in a versioned file. In the course of updating your local master branch it can the case that a change you pulled in from the remote conflicts with the version you have locally. One example would be a method or function which both you and someone else in your team modified. Git will first try to automatically resolve this conflict. But if it cannot, then you will see something looking like the following:
<<<<<<< HEAD
// your local version
=======
// remote version
>>>>>>> origin/master
To resolve this you can use a merge conflict tool. If you wish to resolve by hand, then you should choose which version you want, possibly modify that as well, and then delete all the markers (i.e. delete <<<<<<<, =======, and >>>>>>>).

How can I copy an git repository in Xcode to github?

Every time a try to use github I get tangled in a series of errors that seem to have no solution and I give up. This time I thought I'd try to get help.
I have a local repository created and managed with Xcode. All the local git functions in Xcode work with no problem. Now I want to put this project on github so others can see it. I logged into github and created a repository. It's this one:
lummis/CS193P-2015-Assignment-5
I added a .gitignore file but then deleted it again because I thought it was causing an error. I tried adding a readme file but wasn't able to. I got some error that didn't make sense to me so I gave up on that. So at this point the github repository is empty so far as I can tell.
My local repository has many commits and is currently up-to-date. IOW there is nothing to commit. But when I do "Source Code / Push" I get the following error:
Working copy out of date. Try pulling from the remote to get the
latest changes then push again.
So I try to do that in Xcode by doing "Source Control / Pull". But then I get this error:
"github/master" is not a valid remote branch to pull from. Please
choose a different remote branch.
But there is only one branch. There is no other branch (local or remote) to choose. So I'm stuck in a Xcode-github error loop again. I searched for information about this but didn't find anything relevant. I have the Pro Git book and read and understood it at least thru chapter 2. But that doesn't help on interacting with Xcode.
Can anybody say what I need to do? I thought of deleting the remote repository and starting over but apparently there's no way to do that either!
I know lots of people use github so it must work once you know how to use it but it's a big source of frustration for me.
You have a local repository with "many commits". Let's imagine that we have three:
A---B---C
^
master
Your remote repository on GitHub also contains commits, but they are different ones from what you have locally, e.g.
Y---Z
^
master
At least one of these remote commits was created through the GitHub web interface, which creates a new commit each time you use it.
Because the two repositories contain no common history, Git can't figure out how to handle a push from your local repository to the remote one. It will refuse to accept such a push rather than making any remote commits inaccessible, which is what you usually want.
In this case, commits Y and Z in the remote repository can be discarded. They simply add and then remove a .gitignore file, and you want the remote to reflect what you have locally. The solution is to force push.
Force pushing should generally be avoided, since it can cause commits to be discarded (like Y and Z will be in this case) or to have their hashes changed, which causes major problems with shared repositories. In this instance I don't see any danger in force pushing, which can be accomplished with the -f or --force argument to git push.
(There's nothing fundamentally wrong with force pushing, and in some situations it makes perfect sense, but it should be done with care for the reasons listed above.)

SVN authorization failure, trunk non-existent in head revision, getting a GIT repository working in Eclipse

To simplify things, I have one local SVN repository D:\folder\repo_name and I have svnserve running as a service with root set to the mentioned path. Subclipse and SmartSVN can connect to the repository, also displays the correct head revision number, but when I try to explore the trunk (the only branch) it gives the following error: URL 'svn://localhost/trunk' non-existent in that revision. This while I can check out the complete repository perfectly fine. But I don't need the all the branches, I need just the contents of the trunk.
When I try to commit I get the error Authentication failed. However my credentials were fine when checking out earlier.
When I try to get my stuff out of there and move to GIT (which I suppose would be best as everything is always kept local), the git svn clone process completes, I see all my revisions and files pass in GIT Bash, and then try to import it in Eclipse. I see that it tries to import the project into the repository directory itself (see http://wiki.eclipse.org/Image:Egit-0.9-import-projects-general-project.png). Needless to say I get the error in the shape of D:\folder\repo_name_git overlaps the location of another project: 'repo_name_git' What I don't get is why I can't seem to find a single way to let me specify where I want the project to import into.
Alternatively, when I add the project in the git repository as an existing project into Eclipse, and then - through the Team > Share menu - try to get under version control, I get the error Can not move project to target location D:\folder\repo_name_git, as this location overlaps with location D:\folder\repo_name_git, which contains a .project file
I'm at a loss and these errors are to generic to give me an idea of how to tackle them. Any heads up would be appreciated.
2 points:
I was getting "Authentication failed" on "correct" credentials - except the plugin I used was forcing the first letter of my username to uppercase - check the case of your username (upper or lower).
I've just had a problem moving onto a Subversion 1.7 repository, which is not supported by my Subversive plugin, and I was getting some strange errors.
You need to check the credentials
make sure svnserve is not started with -R {readonly option}
Check if the following lines are commented in
"\REPO_NAME\conf\svnserve.conf
anon-access = read
auth-access = write
password-db = passwd"