git-remote-hg icon indicating copy to clipboard operation
git-remote-hg copied to clipboard

notes are lost when fetching from a new repo

Open mnauw opened this issue 8 years ago • 2 comments

Since a new repo does not yet have last-note info, the notes commit for fast-import does not mention a from mark, and so it starts a whole new hierarchy, thereby losing the existing notes (holding revision info from repos fetched so far).

Fix coming up that avoids using the last-note info altogether, and so prevents this from happening.

mnauw avatar Jul 02 '16 17:07 mnauw

It should also be noted (no pun intended ;-) ) that the above fixes actually no longer use the last_note metadata that is tracked in marks-hg. That is, last_note is still updated for backwards compatibility, but now git-remote-hg no longer has to rely on it to ensure proper updating of notes. Instead it makes git-fast-import simply continue on the current refs/notes/hg ref.

mnauw avatar Aug 20 '16 09:08 mnauw

Well, that's one way of doing it.

To me this is more of a hack, and while I could certainly apply a patch like this, I would like to maintain them separately from the main branch, to eventually remove them.

There should be a way to improve the core so this isn't needed.

felipec avatar Jun 04 '19 13:06 felipec