Opened 8 years ago

Closed 8 years ago

#630 closed defect (duplicate)

rev-parse problem when running from non-git/unitilized directory

Reported by: wojciech Owned by:
Priority: minor Milestone: SasView 4.0.0
Component: SasView Keywords:
Cc: Work Package: SasView Bug Fixing

Description

When running SASVIEW from builds or from run.py it complains.
WARNING:root:Error while determining build number Command '['git', 'rev-parse', 'HEAD']' returned non-zero exit status 1

This is because it runs from non-git repository (from build servers) or there is no build number initialized (when running from run.py). When running from run.py the side effect is that it doesn't log to sasview.log.

The potential fix to the problem may involve pass in expect statement of sasview/init.py instead of:
import logging
import sys
logging.warning("Error while determining build number\n %s" % sys.exc_value)

Change History (2)

comment:1 Changed 8 years ago by butler

Is this not the same issue as ticket #627? Also the build version presumably will mostly run on users machines who don't have git installed at all. As you can see from comments on #627 I am wondering if the growing code to check which eventually fails is what is causing the startup of SasView to slow down on windows machines. I have noticed that recent builds take an inordinate amount of time to start compared to the past (and not just the first time as with Mac builds).

One question: would it be better to move pulling the commit hash to the build script? Of course I guess then the build would need to write a number back into init.py which is now different from the git repo version? Or perhaps have it run only if a certain environment variable is set (which the build script does)? Just some random thoughts.

comment:2 Changed 8 years ago by wojciech

  • Resolution set to duplicate
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.