From 4f910f65d9eccd5dc4a0743995e83024c4a748df Mon Sep 17 00:00:00 2001 From: Mark Nauwelaerts Date: Sat, 13 Aug 2016 14:27:45 +0200 Subject: [PATCH] Also still track notes HEAD during import Fixes felipec/git-remote-hg#58 --- git-remote-hg | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/git-remote-hg b/git-remote-hg index 3cf884b..9493acb 100755 --- a/git-remote-hg +++ b/git-remote-hg @@ -634,8 +634,11 @@ def export_ref(repo, name, kind, head): # continue incrementally on current notes branch (whenever possible) # to avoid wiping out present content upon fetch of new repo current_note = rev_parse(ref) - if current_note: + if current_note and not len(notes): print 'from %s^0' % (ref) + # but track along with the previous ref as import goes along + elif marks.last_note: + print "from :%u" % (marks.last_note) for rev in pending_revs: notes.add(rev)