Can't push branch to remote Hg repo
Actually, you only have two choices. You can merge or you can force it. I think in your case you want to force it.
Typically, you don't want to force a new head because other developers might not be aware of the new head. Since this is an experiment you just want to keep for posterity then it's fine to force it. If you find out you need it you would merge it at that time.
Mercurial: Unable to push to remote repository after pull-merge-commit
Not sure why, but this solved the issue:
hg push -r tip
where -r is
-r --rev REV [+] a changeset intended to be included in the destination
hg - what to do when hg push times out
It seems that all changesets did make it - i.e. answer is to retry and then trust Mercurial.
mercurial push /pull problem
To get the message about creating new heads on the server, yet pull saying there is no new changesets, means that you already have all the changesets from the server.
What you should do is look in your local clone and merge the multiple heads together to get one again, then you should be able to push.
However, you probably won't be able to do this on Windows (judging by the path examples in your question) since there is a case-folding collision between two files:
- src/java/itucs/blg361/hbs/linkpage.java <-- notice lower-case p in linkPage
- src/java/itucs/blg361/hbs/linkPage.java <-- notice upper-case P in linkPage
This will prevent you from actually using that branch unless someone with a system that considers the two to be different files (like *nix) gets rid of one of them for you, pushing that, and then you pulling in that new changeset.
So you have a couple of options:
- Force the push with --override (or the GUI equivalent). This is usually not the right way. This will create another head on the server, and then suddenly you have at least 3 different versions of the project.
- Pull (like you've done), merge, then push. This is usually the preferred choice. You should merge together the heads that belong together to get back to one branch.
In any case, I would figure out why you have multiple heads in the repository already. Did someone force a push? Was it intentional?
And get TortoiseHg - It'll make your life easier
Unable to merge in mercurial
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, and this head is a child of the bitbucket head, so pushing will not create a remote head anymore:
hg push
and you're done.
hg push hangs after modify file in repository
I finally resolved my issue.
In the .hg directory of the repository at the server, I found a wlock file that block any push commands. I just deleted it. I also delete the modified file so the push brings it back properly.
Problem solved!
Related Topics
How to Cut an Existing Variable and Assign to a New Variable in Bash
Netfilter-Like Kernel Module to Get Source and Destination Address
Trying to Ping Linux Vm Hosted on Azure Does Not Work
Amazon Linux: "Apt-Get: Command Not Found"
Recursively Find Files with a Specific Extension
How to Get Perf to Find Symbols in My Program
How to Run R Scripts on Servers Without X11
Opening a .Tar.Gz File with a Single Command
Get Filesystem Mount Point in Kernel Module
Monitoring Pthread Context Switching
Command Substitution Within Sed Expression
Linux Command or Script Counting Duplicated Lines in a Text File
Fork: Retry: Resource Temporarily Unavailable
Differencebetween Xterm-Color & Xterm-256Color
How to Get the Exit Code of Spawned Process in Expect Shell Script