On Thursday, August 25, 2011 6:08:54 PM UTC-7, leif wrote: > > > Found the "culprit" (for the message; this is from 4.7.rc2's sage- > update / #9433): > > # check sage root repo. if present, check status; if there are > # any unchecked in changes, abort. > os.chdir(SAGE_ROOT) > err = subprocess.call('./sage -hg verify', shell=True, > stdout=subprocess.PIPE, > stderr=subprocess.PIPE) > root_repo_intact = (err == 0) > if root_repo_intact: > P = subprocess.Popen('./sage -hg status', shell=True, > stdout=subprocess.PIPE) > output = P.communicate()[0] > if len(output) > 0: # uncommitted changes > print ("There are uncommitted changes in the " > + "Sage root repository. Aborting.") > sys.exit(2) > > > John, is this still current, i.e., do we still need this (especially > aborting in case there are uncommitted changes)? >
I don't know about "need", but for example uncommitted changes in at least one of the scripts repo or the main Sage repo (or maybe both) causes upgrading to fail in strange ways. So the point of the check is to fail gracefully, not fail very badly. > Note that len(output)>0 doesn't necessarily mean there are changes > that should be committed; any file unknown to Mercurial will show up > there. > > If only "hg status" had an exit status of zero if no changes, something else otherwise. I think that the upgrade process is fraught with peril, and could be cleaned up significantly. Handling uncommitted changes (or committed changes which need to be merged with the new spkg) isn't handled well at all, I think in any repo. -- John -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org