Changeset 4732 for trunk


Ignore:
Timestamp:
Jan 6, 2021 11:13:16 PM (10 months ago)
Author:
toby
Message:

workarounds for missing files

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIpath.py

    r4687 r4732  
    596596    if loadpath:
    597597        fpath = os.path.join(loadpath,rpath,filename)
     598        svntmp = os.path.join(loadpath,'.svn','tmp')
    598599    else:
    599600        fpath = os.path.join(path2GSAS2,rpath,filename)
     601        svntmp = os.path.join(path2GSAS2,'.svn','tmp')
     602    # fix up problems with missing empty directories
     603    if not os.path.exists(fpath):
     604        print('Repairing missing directory',fpath)
     605        cmd = [svn,'revert',fpath]
     606        s = subprocess.Popen(cmd,stderr=subprocess.PIPE)
     607        out,err = MakeByte2str(s.communicate())
     608        if out: print(out)
     609        if err: print(err)
     610    if not os.path.exists(svntmp):
     611        print('Repairing missing directory',svntmp)
     612        cmd = ['mkdir',svntmp]
     613        s = subprocess.Popen(cmd,stderr=subprocess.PIPE)
     614        out,err = MakeByte2str(s.communicate())
     615        if out: print(out)
     616        if err: print(err)
     617       
    600618    cmd = [svn,'switch',URL,fpath,
    601619           '--non-interactive','--trust-server-cert',
Note: See TracChangeset for help on using the changeset viewer.