Comments (7)
It is working fine here, even on Git 1.7.9.
From the looks of it, this is failing:
import time as ptime
print "committer remote-hg <> %s" % (ptime.strftime('%s %z'))
What happens when you run that in python?
from git.
Well, (ptime.strftime('%s %z')) just returns an empty string from my cygwin python distribution (which I is the one being called from cygwin bash), while from my enthought canopy python distribution on the same machine throws a
ValueError: Invalid format string
Looking at the python docs, I guessed that maybe you meant the uppercase version,
strftime('%S %Z')
which gives (e.g.)
'51 BST'
from cygwin python, or (confusingly for me, since they both claim to be 2.7.3),
'51 GMT Daylight Time'
from enthought canopy distribution. Now I think about it though, if you meant an error to be thrown by an invalid format, then it isn't happening. Does any of that make sense?
from git.
looking at this SO post, I realize that neither %s nor %z are officially supported by python. To paraphrase, they may work on some (most?) platforms if python passes the argument to the system strftime.
So, I think I've come up with a replacement which doesn't rely on the problematic formats, but uses the already-existing gittz method:
import time as ptime
print "committer remote-hg <> %d %s" % (ptime.time(), gittz(ptime.timezone) )
It seems to fix my original issue, although I now get:
Cloning into 'sapphire'...
requesting all changes
adding changesets
adding manifests
adding file changes
added 473 changesets with 1482 changes to 416 files (+6 heads)
progress revision 0 'master' (0/441)
progress revision 100 'master' (100/441)
progress revision 200 'master' (200/441)
progress revision 300 'master' (300/441)
progress revision 400 'master' (400/441)
WARNING: Branch 'FPGA___based___TimeTagger' has more than one head, consider merging
error: git-remote-hg died of signal 6
I guess this is unrelated, but can't find from git-remote-hg.py where this return value comes from, so maybe not. Should I submit this as a separated issue?
from git.
Having looked into it, I find that signal 6 is SIGABRT, so probably a much more low-level bug in one of my distributions somewhere. As far as I can tell, git-remote-hg gets all the way through to the end of main(), and even calls bye(), which runs all the way through marks.store(), so it seems the SIGABRT can only come at sys.exit(), so maybe it's not a big deal as far as my repo goes. Not really sure how to check, though.
Thanks for your help thus far.
from git.
looking at this SO post, I realize that neither %s nor %z are officially supported by python.
Yes. I was afraid this was the problem. Fortunately the code you proposed looks fine as a replacement.
Having looked into it, I find that signal 6 is SIGABRT, so probably a much more low-level bug in one of my distributions somewhere.
You should probably open another bug report for that one. I would try to play with different simple scripts, sys.exit() and so on to try to narrow down the problem.
from git.
I've made a pull request for the edit, I'm not really sure whether that was the right thing to do, or whether I should have made a branch first, I'm a bit new to this. Let me know if I should be doing something else.
For the SIGABRT, where should I open a bug, on the same file? I sort of assumed it was more to do with my python stack, so was reluctant to pin it on here.
from git.
It is all right, I've merged the fix.
As for the SIGABRT issue. I suggest you investigate if the issue is indeed with your python or not, and whether we can do anything about it in git-remote-hg.
from git.
Related Issues (20)
- Something is wrong with git-stage docs HOT 2
- Crash during push to Hg repo HOT 2
- planet bzr repos cannot be cloned HOT 6
- push failed when git branch is different than bzr branch name HOT 2
- Trying to Parse email as int. HOT 1
- Push to new launchpad branch using git-remote-bzr HOT 4
- Fatal error thrown by felipec-git on fast-import of Hg assets HOT 13
- bzrlib.errors.NoSuchFile error while cloning openobject-addons on Launchpad HOT 1
- Cannot push when using https authentication with git-remote-hg HOT 5
- git-remote-hg mysteriously fails HOT 2
- Cloning hg repo from Octave project crashes fast-import HOT 5
- rebase or merge latest git release HOT 2
- Git commits show up in the "draft" phase in BitBucket HOT 2
- Closed branches can cause synchronization issues after gc
- Link to git-remote-hg.py in the wiki is wrong HOT 2
- Worked for a while, now fetch fails with "mark not declared"
- Sorry, flubbed an enter key press... please delete.
- git-remote-hg doesn't fetch HOT 2
- Bookmarks on named branches HOT 1
- uses obsolete python2 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from git.