gotsunami/gitlab-copy

Issue numbering off by one

Opened this issue · 2 comments

I copied a repo with 671 issues from private server of old developers to gitlab.com. The new repo has 670 issues. The copying has skipped issue 199, meaning all issues after that are off by 1, so cross-referencing of issues above 199 are wrong, which complicates matters! :-D

I can't see anything special about that issue, it just contains a couple of lines and a few comments...

matm commented

@andyhasit I know it's old ... but any chance you can reproduce and give us an error message or something useful for debugging. Thanks!

I'm afraid not... It's all long gone and moved, and I can't even remember how I got round this - I think I may have used another tool.

However my guess is that this is caused by something like:

  1. Get all tickets from HTTP (wrongly assumes it got them all because HTTP failed on one for some odd reason)
  2. Save result as list
  3. Iterate using the length of list (e.g. for j := len(notes) - 1; j >= 0; j-- {) instead of a "for each"
  4. Treat the iterator as the ticket number, thereby getting a negative offset after the missing issue

So maybe it's on gitlab's side, or maybe the loop squashed an error?