Comments (2)
That is due to another bug in Git that is already fixed in the latest version.
And you are right, if you push again the issue should be gone.
You can try the old code this way:
diff --git a/git-remote-hg.py b/git-remote-hg.py
index cf149f3..cce3172 100755
--- a/git-remote-hg.py
+++ b/git-remote-hg.py
@@ -264,27 +264,12 @@ def fix_file_path(path):
return path
return os.path.relpath(path, '/')
-def export_files(files):
- final = []
- for f in files:
- fid = node.hex(f.filenode())
-
- if fid in filenodes:
- mark = filenodes[fid]
- else:
- mark = marks.next_mark()
- filenodes[fid] = mark
- d = f.data()
-
- print "blob"
- print "mark :%u" % mark
- print "data %d" % len(d)
- print d
-
- path = fix_file_path(f.path())
- final.append((gitmode(f.flags()), mark, path))
-
- return final
+def export_file(fc):
+ d = fc.data()
+ path = fix_file_path(fc.path())
+ print "M %s inline %s" % (gitmode(fc.flags()), path)
+ print "data %d" % len(d)
+ print d
def get_filechanges(repo, ctx, parent):
modified = set()
@@ -505,8 +490,6 @@ def export_ref(repo, name, kind, head):
if len(parents) == 0 and rev:
print 'reset %s/%s' % (prefix, ename)
- modified_final = export_files(c.filectx(f) for f in modified)
-
print "commit %s/%s" % (prefix, ename)
print "mark :%d" % (marks.get_mark(c.hex()))
print "author %s" % (author)
@@ -521,8 +504,8 @@ def export_ref(repo, name, kind, head):
for f in removed:
print "D %s" % (fix_file_path(f))
- for f in modified_final:
- print "M %s :%u %s" % f
+ for f in modified:
+ export_file(c.filectx(f))
print
progress = (rev - tip)
@@ -1157,7 +1140,6 @@ def main(args):
global peer, mode, bad_mail, bad_name
global track_branches, force_push, is_tmp
global parsed_tags
- global filenodes
global fake_bmark, hg_version
global dry_run
global notes, alias
@@ -1199,7 +1181,6 @@ def main(args):
blob_marks = {}
parsed_refs = {}
parsed_tags = {}
- filenodes = {}
fake_bmark = None
try:
hg_version = tuple(int(e) for e in util.version().split('.'))
from git.
You are unbeatable! Thank you very much for the patch above, works indeed as expected :).
Janusz
from git.
Related Issues (20)
- Something is wrong with git-stage docs 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.