NavicoOS / ac2git

Tool to convert an AccuRev repository to Git.
29 stars 15 forks source link

IndexError: list index out of range #122

Open veljkosbbb opened 2 years ago

veljkosbbb commented 2 years ago

Can you please assist me with the error "IndexError: list index out of range".
I have run the script with command: python.exe ac2git.py -m ignore I can see it catches the list of transaction but I cannot understand why it cannot get the transaction? I have set only one stream to migrate for the start.

Retrieving stream ArenaWebRUF info from Accurev for transaction range : 1 - 20760267
Processing Accurev state for ArenaWebRUF : 1 - 20760267
ArenaWebRUF: retrieving transaction range #20595435 - #20760267
Running time was  0:00:46.11
The script has encountered an exception, aborting!
...........................................................
..........................................................
  File "C:\Projects\AccurevMigration\ac2git\accurev.py", line 2551, in restrict_timespec_to_timelock
    preLockTr = hist(depot=depot, timeSpec=UTCDateTimeOrNone(timelock)).transactions[0]
IndexError: list index out of range

What can I do to resolve this? Attaching the log. accurev2git.log

edwardtew commented 2 years ago

The error is reported as this line in the code : https://github.com/NavicoOS/ac2git/blob/master/accurev.py#L2551

This implies that the 'transactions' list object is currently empty as the entry 0 does not exist.

This may be result of a typo in your configuration so that the streams are not being identified or that you are ignoring missing users and the transactions have not been processed because the user to attribute them to had not been created.

See details like the "-m ignore" option here: https://github.com/NavicoOS/ac2git/blob/master/ac2git.py#L4013

Check there readme and other documentation for more details of how to use the script and steps to be followed for best results.

Thanks Ed

Sent from Outlook for Androidhttps://aka.ms/ghei36 sorry about any autoconnects


From: veljkosbbb @.***> Sent: Wednesday, 23 February 2022, 5:00 AM To: NavicoOS/ac2git Cc: Subscribed Subject: [NavicoOS/ac2git] IndexError: list index out of range (Issue #122)

CAUTION: External email, be careful with links and attachments.

Can you please assist me with the error "IndexError: list index out of range". I got it after 28 minutes the script started. I have run the script with command: python.exe ac2git.py -m ignore To what list does it refer that it cannot get the index? What can I do to resolve this? Attaching the log in attachment. accurev2git.loghttps://github.com/NavicoOS/ac2git/files/8118157/accurev2git.log

— Reply to this email directly, view it on GitHubhttps://github.com/NavicoOS/ac2git/issues/122, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AEXEAWSYPSHJXE3LCPOS6ZLU4OXJ5ANCNFSM5PBZ5M7Q. Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub. You are receiving this because you are subscribed to this thread.Message ID: @.***>

veljkosbbb commented 2 years ago

Hi @edwardtew and others... I have done some debugging. I run my script with & "C:\Python34\python.exe" ac2git.py. I have mapped all my users so that is not an issue! I am trying to migrate my new stream SoftBroker_git_migration but script throws error for my root stream and not for the stream which I specified. I am using the deep_hist method, I suppose this is very important. So I have FA depot, under it root stream (Type: Normal, Time Based stream) - this stream does not have any parent stream!!! under it base stream which is pass-through stream (not relevant so much) under it SoftBroker stream (Normal Dynamic stream) under it SoftBroker_git_migration stream.

So I am trying to migrate SoftBroker_git_migration stream, but, my exception is thrown for the root stream!!!!! What can I do to resolve that?

Error is thrown on line 2551 but function restrict_timespec_to_timelock it is invoked by this line: timelockTs = ext.restrict_timespec_to_timelock(depot=streamInfo.depotName, timeSpec=parentTs, timelock=streamInfo.time)

So now I added debugging:

& "C:\Python34\python.exe" ac2git.py
............................
Retrieveing stream information from Accurev into hidden refs.
Retrieving stream SoftBroker_git_migration info from Accurev for transaction range : 1 - 20768370
Processing Accurev state for SoftBroker_git_migration : 1 - 20768370
SoftBroker_git_migration: retrieving transaction range #20767371 - #20768370
*** entered deep_hist function ***
streamInfo.Type:normal
streamInfo.name:SoftBroker_git_migration
###invoking restrict_timespec_to_timelock###
depot:FA
parentTs:20767371-20768370
streamInfo.time:None
*** entered deep_hist function ***
streamInfo.Type:normal
streamInfo.name:SoftBroker
###invoking restrict_timespec_to_timelock###
depot:FA
parentTs:20767371-20768370
streamInfo.time:None
*** entered deep_hist function ***
### base stream is passthrough ###
*** entered deep_hist function ***
streamInfo.Type: normal
streamInfo.name: root
###invoking restrict_timespec_to_timelock###
depot:FA
parentTs:20767371-20768370
streamInfo.time:1995-09-11 09:38:11
Running time was  0:00:40.88
The script has encountered an exception, aborting!
.................................
preLockTr = hist(depot=depot, timeSpec=UTCDateTimeOrNone(timelock)).transactions[0]
IndexError: list index out of range

So you can see it breaks on the root stream, and not on my stream! I suppose it is because root stream does not have any parent, but script tries to find parent and its transactions I suppose . If I look in Accurev Gui it seems root stream also has transactions but it does not have parent stream. how this error can be resolved??? I suppose I am not doing anything wrong...

Thank you!!!

edwardtew commented 2 years ago

One option you could try, restrict the transaction scope to a smaller range so that you can iterate through the debugging seasons faster. Use the 'verbose' option to get more logging output.

Sent from Outlook for Androidhttps://aka.ms/ghei36 sorry about any autoconnects


From: veljkosbbb @.> Sent: Friday, February 25, 2022 5:20:19 AM To: NavicoOS/ac2git @.> Cc: Edward Tew @.>; Mention @.> Subject: Re: [NavicoOS/ac2git] IndexError: list index out of range (Issue #122)

CAUTION: External email, be careful with links and attachments.

Hi @edwardtewhttps://github.com/edwardtew and others... I have done some debugging. I run my script with & "C:\Python34\python.exe" ac2git.py. I have mapped all my users so that is not an issue! I am trying to migrate my new stream SoftBroker_git_migration but script throws error for my root stream and not for the stream which I specified. I am using the deep_hist method, I suppose this is very important. So I have FA depot, under it root stream (Type: Normal, Time Based stream) - this stream does not have any parent stream!!! under it base stream which is pass-through stream (not relevant so much) under it SoftBroker stream (Normal Dynamic stream) under it SoftBroker_git_migration stream.

So I am trying to migrate SoftBroker_git_migration stream, but, my exception is thrown for the root stream!!!!! What can I do to resolve that?

Error is thrown on line 2551 but function restrict_timespec_to_timelock it is invoked by this line: timelockTs = ext.restrict_timespec_to_timelock(depot=streamInfo.depotName, timeSpec=parentTs, timelock=streamInfo.time)

So now I added debugging:

& "C:\Python34\python.exe" ac2git.py ............................ Retrieveing stream information from Accurev into hidden refs. Retrieving stream SoftBroker_git_migration info from Accurev for transaction range : 1 - 20768370 Processing Accurev state for SoftBroker_git_migration : 1 - 20768370 SoftBroker_git_migration: retrieving transaction range #20767371 - #20768370 entered deep_hist function streamInfo.Type:normal streamInfo.name:SoftBroker_git_migration

invoking restrict_timespec_to_timelock

depot:FA parentTs:20767371-20768370 streamInfo.time:None entered deep_hist function streamInfo.Type:normal streamInfo.name:SoftBroker

invoking restrict_timespec_to_timelock

depot:FA parentTs:20767371-20768370 streamInfo.time:None entered deep_hist function

base stream is passthrough

entered deep_hist function streamInfo.Type: normal streamInfo.name: root

invoking restrict_timespec_to_timelock

depot:FA parentTs:20767371-20768370 streamInfo.time:1995-09-11 09:38:11 Running time was 0:00:40.88 The script has encountered an exception, aborting! ................................. preLockTr = hist(depot=depot, timeSpec=UTCDateTimeOrNone(timelock)).transactions[0] IndexError: list index out of range

So it breaks on root stream, and not on mine stream! If I look in Accurev Gui it seems root stream also has transaction but it does not have parent stream. how this error can be resolved??? I suppose I am not doing anything wrong...

Thank you!!!

— Reply to this email directly, view it on GitHubhttps://github.com/NavicoOS/ac2git/issues/122#issuecomment-1050025900, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AEXEAWVSTUFMWMSYCCRGETTU4ZLEHANCNFSM5PBZ5M7Q. Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub. You are receiving this because you were mentioned.Message ID: @.***>