I have managed to really get my repo into a state, and I don't have the mad skills required to fix it, your help would be appreciated.
I am trying to merge/update so that the work I developed in a seperate branch is correctly integrated into my local one.
When I run and run a merge on rev 284, I get the following error:
% hg --repository C:\Projects\foo merge --verbose
--tool=internal:merge 284 abort: data/Web/Utilities/Extensions/RegexExtensions.cs.i#364e78cf7bcb: no
match found! [command returned code 255 Sat Jan 19 16:12:54 2013]
I am using tortoisehg, and have tried to search for a resolution but I can't figure out how to resolve this error?
What has happend in this case, is that the file has been deleted in one branch, and I guess exists in the other?
How to resovle?
.
Edit 1:
Was fiddling around and found this as well:
#!python
** Mercurial version (2.4.2). TortoiseHg version (2.6.2)
** Command: --nofork workbench
** CWD: C:\Projects\foo
** Encoding: cp1252
** Extensions loaded:
** Python version: 2.7.3 (default, Apr 10 2012, 23:24:47) [MSC v.1500 64 bit (AMD64)]
** Windows version: sys.getwindowsversion(major=6, minor=1, build=7600, platform=2, service_pack='')
** Processor architecture: x64
** Qt-4.8.0 PyQt-4.9.1
Traceback (most recent call last):
File "tortoisehg\hgqt\repowidget.pyo", line 1678, in visualDiffToLocal
File "tortoisehg\hgqt\visdiff.pyo", line 213, in visualdiff
File "mercurial\copies.pyo", line 166, in pathcopies
File "mercurial\copies.pyo", line 151, in _backwardcopies
File "mercurial\copies.pyo", line 138, in _forwardcopies
File "mercurial\copies.pyo", line 106, in _tracefile
File "mercurial\context.pyo", line 722, in ancestors
File "mercurial\context.pyo", line 546, in parents
File "mercurial\util.pyo", line 246, in __get__
File "mercurial\context.pyo", line 399, in _filenode
File "mercurial\revlog.pyo", line 776, in lookup
LookupError: data/web/Utilities/Extensions/RegexExtensions.cs.i#364e78cf7bcb: no match found
Edit 2:
I've managed to merge most of the revisions I need, I am left now with just one on the branch that is corrupt.
How can I now discard that revision/branch?
CLI-version of merge (screenshots - maybe later)
hg up
hg merge 297
hg commit -m "Merge 1"
hg merge 284
hg commit -m "Merge 2"
If you want to merge at some other points: fix destination of update (to this point you'll merge) and merge sources
Related
I have a repository which I am trying to work on. Unfortunately when I update to a revision of interest it fails with message
abort: Illegal byte sequence: /Users/<user>/Projects/P/infusion16/Standings ? Kattis, Infusion Programming Contest 2016.pdf
When I run update with --traceback and --debug options it shows following:
File "/Users/evgeniy.sharapov/.pyenv/versions/2.7.14/lib/python2.7/site-packages/mercurial/merge.py", line 1381, in batchget
atomictemp=atomictemp)
File "/Users/evgeniy.sharapov/.pyenv/versions/2.7.14/lib/python2.7/site-packages/mercurial/context.py", line 1969, in write
**kwargs)
File "/Users/evgeniy.sharapov/.pyenv/versions/2.7.14/lib/python2.7/site-packages/mercurial/localrepo.py", line 1115, in wwrite
**kwargs)
File "/Users/evgeniy.sharapov/.pyenv/versions/2.7.14/lib/python2.7/site-packages/mercurial/vfs.py", line 87, in write
with self(path, 'wb', backgroundclose=backgroundclose, **kwargs) as fp:
File "/Users/evgeniy.sharapov/.pyenv/versions/2.7.14/lib/python2.7/site-packages/mercurial/vfs.py", line 409, in __call__
fp = util.posixfile(f, mode)
IOError: [Errno 92] Illegal byte sequence: '/Users/<user>/Projects/Puzzles/infusion16/Standings \x96 Kattis, Infusion Programming Contest 2016.pdf'
abort: Illegal byte sequence: /Users/<user>/Projects/Puzzles/infusion16/Standings ? Kattis, Infusion Programming Contest 2016.pdf
Looks like it has some sort of a character that is not supported in a file name ? I check environment both LC_CTYPE and LANG are set to en_US.UTF-8.
What could be done in this situation ? I could probably live without this file or have it renamed? Another problem that the fail in update happens in the middle of the process so I don't have all the files in the work directory.
I'd first run hg man to obtain the relevant PATHNAME, and then extract that file's contents by: hg cat PATHNAME
Then you could try hg revert --all --exclude PATHNAME to extract everything else (assuming all the other filenames are accepted by the host OS).
I have problem with mercurial on OS X 10.9.1
I have a repository on bitbucket with couple files, when I'm trying to clone it I'm getting an error:
mac-mini-jakub:testrepo kubeczek$ hg clone https://kubecz3k#bitbucket.org/kubecz3k/test
abort: error: _ssl.c:507: error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version number
I have installed Mercurial 2.8.2 for MacOS X 10.9 from https://www.mercurial-scm.org/downloads/
I'm pretty sure that on the side of the bitbucket everything is ok, because I have no problem on linux machine.
here is the full traceback:
mac-mini-jakub:testrepo kubeczek$ hg clone https://kubecz3k#bitbucket.org/kubecz3k/test --traceback
Traceback (most recent call last):
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/mercurial/dispatch.py", line 133, in _runcatch
return _dispatch(req)
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/mercurial/dispatch.py", line 806, in _dispatch
cmdpats, cmdoptions)
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/mercurial/dispatch.py", line 585, in runcommand
ret = _runcommand(ui, options, cmd, d)
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/mercurial/dispatch.py", line 897, in _runcommand
return checkargs()
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/mercurial/dispatch.py", line 868, in checkargs
return cmdfunc()
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/mercurial/dispatch.py", line 803, in <lambda>
d = lambda: util.checksignature(func)(ui, *args, **cmdoptions)
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/mercurial/util.py", line 512, in check
return func(*args, **kwargs)
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/mercurial/commands.py", line 1286, in clone
branch=opts.get('branch'))
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/mercurial/hg.py", line 268, in clone
srcpeer = peer(ui, peeropts, source)
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/mercurial/hg.py", line 122, in peer
return _peerorrepo(rui, path, create).peer()
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/mercurial/hg.py", line 102, in _peerorrepo
obj = _peerlookup(path).instance(ui, path, create)
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/mercurial/httppeer.py", line 238, in instance
inst._fetchcaps()
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/mercurial/httppeer.py", line 57, in _fetchcaps
self.caps = set(self._call('capabilities').split())
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/mercurial/httppeer.py", line 171, in _call
fp = self._callstream(cmd, **args)
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/mercurial/httppeer.py", line 118, in _callstream
resp = self.urlopener.open(req)
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 404, in open
response = self._open(req, data)
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 422, in _open
'_open', req)
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 382, in _call_chain
result = func(*args)
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/mercurial/url.py", line 368, in https_open
return self.do_open(self._makeconnection, req)
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/mercurial/keepalive.py", line 257, in do_open
raise urllib2.URLError(err)
URLError: <urlopen error [Errno 1] _ssl.c:507: error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version number>
abort: error: _ssl.c:507: error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version number
My Python version is:
mac-mini-jakub:~ kubeczek$ python -V
Python 2.7.6
And SSL:
>>> print _ssl.OPENSSL_VERSION
OpenSSL 0.9.8y 5 Feb 2013
I will appreciate every help, thanks!
You probably have to disable TLS, read this
To do so, add this to ~/.hgrc
[ui]
tls = False
more information about SSL and TLS here
There is another cause. It might not have been your problem, but it should be listed here as well, for the case others encounter this problem:
If you are behind a proxy and your proxy settings are incorrect, this error message appears as well. God knows why...
Example: you have the following config
[http_proxy]
no = localhost,127.0.0.1
host = 1.2.3.4:8080
user = myusername
passwd = oldpassword
The oldpassword might be obsolet (you have forgotten to change it). Then the very same SSL wrong version error appears. It does absolutly make no sense at all (at least to me), but I reproduced this issue with mercurial 3.6.2. Correcting the proxy settings fixes everything.
Not exactly a direct solution but good workaround:
With strong suggestion that the problem lies is ssl I have switched to ssh(https://confluence.atlassian.com/pages/viewpage.action?pageId=270827678) and now everything works. So from a practical point of view for me this problem is solved.
I had this problem for some bitbucket repositories (but not all). I found that, as per the traceback, setting --config ui.clonebundles=false worked.
hg clone --config ui.clonebundles=false https://bitbucket.org/me/myrepo
made the clone much slower mind you.
[edit] -- Although, see my comment on #UniversE's answer above, the actual problem was to do with an atlassian subdomain not being on my squid proxy's whitelist. phew, that was hard to debug.
As one of the question's comments suggested, switching from https to ssh fixed it for me
You have to disable clonebundle from system wide mercurial config file or own config file.
To do, add following lines to /etc/mercurial/hgrc or ~/.hgrc
# system-wide mercurial configuration file
# See hgrc(5) for more information
[ui]
clonebundles = False
Anytime I try to do any interaction with the server, Mercurial returns "abort: HTTP Error 400: Bad Request". We are not using any authentication, so that's not an issue. We have three other developers working on the same repo with the same version of mercurial installed (2.2.3). They haven't had any issues, so it makes me think I'm corrupting something in the .hg folder or something. But I really have no clue.
I was able to clone and work from the new directory just fine. However, about 4 hours later, it started happening again in the new directory too. The only things I did in that time period were commit, pull, and push. When I committed a few hours later and tried to pull, that's when I got the error again.
Here is the debug log for incoming (hg --debug --traceback incoming):
using http://myserver/myapp
sending capabilities command
comparing with http://myserver/myapp
query 1; heads
sending batch command
searching for changes
taking initial sample
searching: 2 queries
query 2; still undecided: 208, sample size is: 200
sending known command
Traceback (most recent call last):
File "mercurial\dispatch.pyo", line 88, in _runcatch
File "mercurial\dispatch.pyo", line 740, in _dispatch
File "mercurial\dispatch.pyo", line 514, in runcommand
File "mercurial\dispatch.pyo", line 830, in _runcommand
File "mercurial\dispatch.pyo", line 801, in checkargs
File "mercurial\dispatch.pyo", line 737, in <lambda>
File "mercurial\util.pyo", line 472, in check
File "mercurial\extensions.pyo", line 144, in wrap
File "mercurial\util.pyo", line 472, in check
File "hgext\mq.pyo", line 3528, in mqcommand
File "mercurial\util.pyo", line 472, in check
File "mercurial\commands.pyo", line 3894, in incoming
File "mercurial\hg.pyo", line 513, in incoming
File "mercurial\hg.pyo", line 472, in _incoming
File "mercurial\bundlerepo.pyo", line 342, in getremotechanges
File "mercurial\discovery.pyo", line 45, in findcommonincoming
File "mercurial\setdiscovery.pyo", line 184, in findcommonheads
File "mercurial\wireproto.pyo", line 116, in plain
File "mercurial\wireproto.pyo", line 164, in _submitone
File "mercurial\httppeer.pyo", line 170, in _call
File "mercurial\httppeer.pyo", line 118, in _callstream
File "urllib2.pyo", line 406, in open
File "urllib2.pyo", line 519, in http_response
File "urllib2.pyo", line 444, in error
File "urllib2.pyo", line 378, in _call_chain
File "urllib2.pyo", line 527, in http_error_default
HTTPError: HTTP Error 400: Bad Request
abort: HTTP Error 400: Bad Request
As I said earlier, I can do a clone, but if I try to run incoming, outgoing, pull, or push, I get this error.
I was able to resolve this issue by running
hg rollback
Once I ran that, it uncommitted my files (but kept the changes, so I could see the modified files in hg status). I was then able to run incoming and pull. Then I re-committed my code and pushed it out without any problems.
So something must be getting corrupted when I commit, just not sure why.
I don't know what's the problem in this specific case. But we had a different problem with the same result - incoming and pull commands failed with 400 Bad Request. So here's receipt for how to investigate the failure, in case hg -v --debug doesn't help.
Take Fiddler for capturing and revealing HTTP traffic. Then run mercurial request as following:
hg --config http_proxy.host=127.0.0.1:8888 pull
The config causes redirects of requests through Fiddler, which is listening on port 8888. Then in Fiddler, you may find the red 400 reply and in Inspectors pane to see an entire message, not the code only.
You may look here for details on our problem, investigation and resolution.
I recently tried to push to a central repository and received the error: abandoned transaction found. Running hg recover said there was no missing transaction. On the advice of another answer I used hg verify to see that my repository is missing two revlogs; below is the result of running hg verify:
% hg --repository C:\dev\WHDLawWeb verify --verbose
repository uses revlog format 1
checking changesets
checking manifests
crosschecking files in changesets and manifests
checking files
data/WHDLawWeb/Images/pastsponsorships.jpg.d#167: missing revlog!
data/WHDLawWeb/WHDLawWeb/Resources/Image/ALFALogoWhite.jpg.i#319: missing revlog!
7175 files, 988 changesets, 14987 total revisions
2 integrity errors encountered!
(first damaged changeset appears to be 167)
[command returned code 1 Tue Jul 03 15:02:13 2012]
In an effort to correct this, and mostly due to my frustration at this point, I decided to just clone the central repository as I'd only be missing a few revisions. However, once I try to push from this cloned repository I get the following bug report:
** Mercurial version (2.2.2). TortoiseHg version (2.4.1)
** Command: --nofork workbench
** CWD: C:\dev
** Encoding: cp1252
** Extensions loaded: bugzilla, graphlog, convert, extdiff
** Python version: 2.6.6 (r266:84297, Aug 24 2010, 18:46:32) [MSC v.1500 32 bit (Intel)]
** Windows version: (6, 1, 7601, 2, 'Service Pack 1')
** Processor architecture: x86
** Qt-4.7.4 PyQt-4.8.6
Traceback (most recent call last):
File "tortoisehg\hgqt\repowidget.pyo", line 954, in repositoryChanged
File "tortoisehg\hgqt\repowidget.pyo", line 916, in rebuildGraph
File "tortoisehg\hgqt\repowidget.pyo", line 777, in setupModels
File "tortoisehg\hgqt\repomodel.pyo", line 151, in __init__
File "tortoisehg\hgqt\repomodel.pyo", line 170, in initBranchColors
File "mercurial\localrepo.pyo", line 523, in branchtags
File "mercurial\changelog.pyo", line 195, in read
File "mercurial\revlog.pyo", line 926, in revision
File "mercurial\revlog.pyo", line 849, in _chunkbase
File "mercurial\revlog.pyo", line 846, in _chunk
File "mercurial\revlog.pyo", line 115, in decompress
error: Error -5 while decompressing data: incomplete or truncated stream
Traceback (most recent call last):
File "tortoisehg\hgqt\commit.pyo", line 533, in repositoryChanged
File "tortoisehg\hgqt\commit.pyo", line 553, in refresh
File "tortoisehg\hgqt\thgrepo.pyo", line 631, in thgmqappliedpatch
File "tortoisehg\hgqt\thgrepo.pyo", line 623, in _thgmqpatchtags
File "mercurial\context.pyo", line 191, in tags
File "mercurial\localrepo.pyo", line 468, in nodetags
File "mercurial\util.pyo", line 237, in __get__
File "mercurial\localrepo.pyo", line 395, in _tagscache
File "mercurial\localrepo.pyo", line 428, in _findtags
File "mercurial\tags.pyo", line 30, in findglobaltags
File "mercurial\tags.pyo", line 242, in _readtagcache
File "mercurial\context.pyo", line 251, in filenode
File "mercurial\context.pyo", line 240, in _fileinfo
File "mercurial\context.pyo", line 183, in files
File "mercurial\util.pyo", line 237, in __get__
File "mercurial\context.pyo", line 134, in _changeset
File "mercurial\changelog.pyo", line 195, in read
File "mercurial\revlog.pyo", line 926, in revision
File "mercurial\revlog.pyo", line 849, in _chunkbase
File "mercurial\revlog.pyo", line 846, in _chunk
File "mercurial\revlog.pyo", line 115, in decompress
error: Error -5 while decompressing data: incomplete or truncated stream
Running hg verify on the central repository shows that the two revlogs are also missing here. If anyone knows how to fix either my original or cloned repository I'd appreciate any feedback.
Also tried a solution here and encountered the same problem. I'm relatively new to mercurial and tortiosehg, please forgive any stupid mistakes. Like I said help would be appreciated.
I've got a build that was previously working fine on the Jenkins Master node that I'm now trying to execute on the Jenkins slave.
I'm using the Jenkins Mercurial Plugin and pointing to the TortoiseHg installation directory on the slave machine.
The Mercurial repository that I'm using is secured by a self-signed certificate (hosted in IIS).
Working on the machine locally, I can clone the repository without issues (this is necessary to get TortoiseHg to preserve the user's password).
However, I seem to be running into issues getting this to work when the build is executed by Jenkins.
The specific error that I'm getting is listed below :
Building remotely on <slave> in workspace <workspace>
$ S:\Software\TortoiseHg/hg clone --rev default --noupdate https://<repository> <workspace_on_slave>
warning: <MercurialServerIP> certificate with fingerprint e3:5f:5e:ea:4f:da:ef:a4:0b:4a:bb:00:e8:31:59:de:ce:d0:28:94 not verified (check hostfingerprints or web.cacerts config setting)
** unknown exception encountered, please report by visiting
** http://mercurial.selenic.com/wiki/BugTracker
** Python 2.6.6 (r266:84297, Aug 24 2010, 18:13:38) [MSC v.1500 64 bit (AMD64)]
** Mercurial Distributed SCM (version 2.1.2)
** Extensions loaded: mercurial_keyring
Traceback (most recent call last):
File "hg", line 42, in <module>
File "mercurial\dispatch.pyo", line 27, in run
File "mercurial\dispatch.pyo", line 64, in dispatch
File "mercurial\dispatch.pyo", line 87, in _runcatch
File "mercurial\dispatch.pyo", line 685, in _dispatch
File "mercurial\dispatch.pyo", line 467, in runcommand
File "mercurial\dispatch.pyo", line 739, in _runcommand
File "mercurial\dispatch.pyo", line 693, in checkargs
File "mercurial\dispatch.pyo", line 682, in <lambda>
File "mercurial\util.pyo", line 456, in check
File "mercurial\commands.pyo", line 1157, in clone
File "mercurial\hg.pyo", line 250, in clone
File "mercurial\hg.pyo", line 93, in repository
File "mercurial\httprepo.pyo", line 236, in instance
File "mercurial\httprepo.pyo", line 57, in _fetchcaps
File "mercurial\httprepo.pyo", line 169, in _call
File "mercurial\httprepo.pyo", line 117, in _callstream
File "urllib2.pyo", line 397, in open
File "urllib2.pyo", line 510, in http_response
File "urllib2.pyo", line 429, in error
File "urllib2.pyo", line 369, in _call_chain
File "urllib2.pyo", line 864, in http_error_401
File "mercurial\url.pyo", line 429, in http_error_auth_reqed
File "hgext\mercurial_keyring.pyo", line 332, in basic_http_error_auth_reqed
File "urllib2.pyo", line 842, in http_error_auth_reqed
File "urllib2.pyo", line 845, in retry_http_basic_auth
File "hgext\mercurial_keyring.pyo", line 326, in find_user_password
File "hgext\mercurial_keyring.pyo", line 177, in find_auth
File "hgext\mercurial_keyring.pyo", line 60, in get_http_password
File "keyring\core.pyo", line 37, in get_password
File "keyring\backend.pyo", line 560, in get_password
File "keyring\backend.pyo", line 573, in _get_password
pywintypes.error: (1312, 'CredRead', 'A specified logon session does not exist. It may already have been terminated.')
ERROR: Failed to clone https://<repository>
Can anyone offer suggestions on what I can do to get past this?
Non-Polling Solution: (Useful if you're not doing polling of the repository to trigger builds)
The fix to this turns out to be to manually clone the repository on the slave at the workspace location (where it would normally end up).
It seems that once the repository is available on the slave, it's able to get past the 'A specified logon session does not exist. It may already have been terminated.' error.
Polling Solution: (The solution above does not seem to work with the Jenkins polling functionality, so we're left with the solution below).
See How do you specify authentication information for Mercurial as part of Jenkins? (mercurial_keyring)
The only way I was able to figure out how to get the server to remember the password (and work with polling) in my setup was to specify it manually in \mercurial.ini .
NOTE: You may also have to remove the mercurial_keyring line from mercurial.ini. (This disables the keyring extension on the Jenkins server/slave since we're specifying everything manually.)