alarmz / boar

Automatically exported from code.google.com/p/boar
0 stars 0 forks source link

Option to skip errors during initial import #21

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
BOAR: 3-Mar-2011 daily
OS: Windows 7 x64
PYTHON: 2.7.1

When doing an initial import (in this case I'm importing a large document 
repository network mapped as drive letter X) boar quits with: 

Traceback (most recent call last):
  File "C:\[home]\boar\boar", line 501, in <module>
    return_code = main()
  File "C:\[home]\boar\boar", line 458, in main
    return cmd_import(args[1:])
  File "C:\[home]\boar\boar", line 274, in cmd_import
    log_message = log_message)
  File "C:\[home]\boar\workdir.py", line 183, in checkin
    self.get_changes()
  File "C:\[home]\boar\workdir.py", line 353, in get_changes
    filelist[f] = self.cached_md5sum(fn)
  File "C:\[home]\boar\workdir.py", line 310, in cached_md5sum
    stat = os.stat(abspath)
WindowsError: [Error 2] The system cannot find the file specified: 
u'x:\\/JOHNDOE/
DIR1/PDFsamTMPbufferELENL1.pdf'

I'm trying to do an import on a "live" document repository. At the moment, it 
seems boar quits when it finds a locked file or a file it expects disappears. I 
realize there are concerns with regard to snapshot integrity, but is there any 
harm in giving the user the option to ignore/skip a file/folder rather than 
aborting? It seems that would be a more graceful way to handle these cases. If 
a file is locked for editing, or is a tmp file that disappears during the 
import the file should be easy enough to add when it becomes available by doing 
an update correct?

Anyway, just wondering what you thoughts are on alternatives to simply aborting 
a large import process given how long such a process can take.

Original issue reported on code.google.com by in...@vittorio.me on 8 Jun 2011 at 10:48

GoogleCodeExporter commented 9 years ago
Agreed, this sounds like a good idea.

Original comment by ekb...@gmail.com on 9 Jun 2011 at 12:54

GoogleCodeExporter commented 9 years ago
Hey, was just curious if you've had a chance to look into handling the import 
process on "live" directories a little more gracefully when a file gets 
locked/moved (ie skip/ignore with warning). Happy to see the other 
patches/functionality you've implemented though :)

Original comment by in...@vittorio.me on 21 Jul 2011 at 10:31

GoogleCodeExporter commented 9 years ago
This feature has been checked in as of changeset 82b916905448. The new option 
for import is called "--ignore-errors". Please verify that it works as expected.

Original comment by ekb...@gmail.com on 7 Aug 2011 at 1:10

GoogleCodeExporter commented 9 years ago
Assuming verified.

Original comment by ekb...@gmail.com on 20 Aug 2011 at 9:48