On one box, "sage -hg diff" found that I had modified SAGE_ROOT, so I undid that. But it still complains about uncommitted changes, even though "sage -hg diff" finds nothing. On the second box, "sage -hg diff" finds nothing, yet the upgrade attempt fails for uncommitted changes.
Any suggestions would be much appreciated. I am a relative sage and hg neophyte, so don't make any assumptions about my knowledge or what troubleshooting I may have already done.
Thanks,
--
Kevin Horton
Ottawa, Canada
I am not a sage developer. I have never knowing used mercurial queues.
I tried moving that untracked file aside, but I still got the same result when I tried to upgrade sage.
% whoami
kwh
% ls -l /usr/local/sage-4.7/local/bin/.hg/
ls: /usr/local/sage-4.7/local/bin/.hg/: No such file or directory
Note: sage is installed in /Users/kwh/apps/sage
ls -l /Users/kwh/apps/sage/local/bin/.hg
total 128
-rw-r--r-- 1 kwh staff 57 5 Mar 08:21 00changelog.i
drwxr-xr-x 2 kwh staff 68 5 Mar 08:21 attic
-rw-r--r-- 1 kwh staff 8 19 Jul 17:12 branch
-rw-r--r-- 1 kwh staff 95 5 Mar 08:21 branch.cache
-rw-r--r-- 1 kwh staff 95 19 Jul 17:12 branchheads.cache
-rw-r--r-- 1 kwh staff 2808 23 Aug 08:15 dirstate
-rw-r--r-- 1 kwh staff 52 5 Mar 08:21 hgrc
-rw-r--r-- 1 kwh staff 5 5 Mar 08:21 last-message.txt
drwxr-xr-x 4 kwh staff 136 5 Mar 08:21 patches
-rw-r--r-- 1 kwh staff 23 5 Mar 08:21 requires
drwxr-xr-x 9 kwh staff 306 19 Jul 17:12 store
-rw-r--r-- 1 kwh staff 19981 5 Mar 08:21 tags.cache
-rw-r--r-- 1 kwh staff 7 19 Jul 17:12 undo.branch
-rw-r--r-- 1 kwh staff 66 19 Jul 17:12 undo.desc
-rw-r--r-- 1 kwh staff 2808 19 Jul 17:12 undo.dirstate
Is there a log file somewhere that might provide more info on why sage refuses to upgrade?
In the future, it could be useful if sage would provide specific details on which uncommitted changes caused the upgrade to abort.
Dear Maarten,
I have a hard time believing it could be repository corruption, as I have the same symptoms on two sage installations - one on OS X and one on Linux. I have been using sage -upgrade for quite some time, and it has always worked well until the upgrade from 4.7 to 4.7.1.
I gave up on the upgrades this morning, and downloaded the binary installer for OS X on that machine and have a source installation churning away on the Linux machine.
Thanks for your help.
Best regards,
If this is true, then #10594 needs work!
On 25 Aug., 16:51, Jeroen Demeyer <jdem...@cage.ugent.be> wrote:
> On 2011-08-25 14:40, leif wrote:
>
> > What I can definitely say is that Sage 4.7.1.rc2's hg cannot handle
> > Sage 4.7.2.alpha2's root repo, which *will* break upgrading...
>
> If this is true, then #10594 needs work!
According to deps, it /should/^TM work
Is this a new check in sage 4.7? If so, this almost certainly explains why I had this abort on my OS X machine, as I have certainly snooped about in the sage stuff with the Finder, which would litter it with .DS_Store files. These files would not be known to Mercurial, and could trigger this abort. That wouldn't have been an issue on my Linux box though.
I suggest that the check for uncommitted changes should be revised to allow .DS_Store files that are not known to Mercurial on OS X. Perhaps it should allow any unknown files on any platform.
I suggest that the check for uncommitted changes should be revised to allow .DS_Store files that are not known to Mercurial on OS X. Perhaps it should allow any unknown files on any platform.
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)?
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.
It would certainly be useful if sage would tell the user exactly what the "uncommitted changes" were, and if there was a way to force sage to upgrade anyway, if the user was convinced that these changes were not relevant. As it is now, it just aborts, for no known reason, and there is no way to force it to continue.
On 26 Aug., 04:35, John H Palmieri <jhpalm...@gmail.com> wrote:
> On Thursday, August 25, 2011 6:08:54 PM UTC-7, leif wrote:
> > 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.
Well, uncommitted changes are committed upon root repo
(re)installation anyway. (Same for scripts and the library IIRC;
extcode for sure.)
We should just ignore lines starting with "? " there, and IMHO only
issue a warning if other changes remain; or prompt the user whether to
commit or continue, or exit, unless a to-be-implemented "force" option
was given.
On 26 Aug., 07:51, Keshav Kini <kesha...@gmail.com> wrote:
> If by rebuilds you mean the forced reinstallation of a package version
> that's already installed, I don't see what the problem is.
I meant e.g. installing new spkg foo by
* copying it to spkg/standard/
* applying necessary patches for the new foo spkg to the Sage library
(and committing them)
* running 'env SAGE_UPGRADING=yes make' to (re)build it and also all
dependent packages, which includes the Sage library
(Note that there are situations where reinstalling / rebuilding the
Sage library will fail badly -- eventually quite late -- without
having some necessary patches applied, therefore "inconvenient", also
preventing automatic testing. In addition, packages in turn depending
on the Sage library won't get rebuilt in the first place in that
case.)
> The procedure I
> outlined will do nothing in that case. Nothing will be pulled, so no new
> heads will be created.
In fact there nothing should get pulled from the unmodified Sage
library repo, which contradicts your statement that we'll always end
up with "clean" / well-defined repos, ignoring or discarding all
changes previously made by a user.
If pulling from the "vanilla" repo *did* create a new branch (making
it the current head / tip), this would break the above procedure. (In
a "real" upgrade, the new Sage library -- and *perhaps* the other
repos -- will [currently] almost always have a different tip than the
previous one, such that pulling from that new repo should indeed
create a new branch and make it the new tip. So the problem IMHO
mainly reduces to having to always touch all repos upon new releases,
which we planned to *not* longer do IIRC, cf. discussion on sage-
release a while ago. Left-around untracked files may be another
problem; see below.)
Applying the patches to the Sage library in advance, then spkg-disting
that (and putting it into spkg/standard/) is also inconvenient just
because of the size of the Sage library spkg (>50 MB). I'd have to
create and provide such modified Sage library spkgs for each and every
new devel release, for IMHO no good reason. (And at least the patchbot
will be unable to do this by it/him/herself for a while I guess, even
when it/he/she -- hopefully soon -- supports tickets with spkgs,
although this is perhaps another story.)
> `hg update -c` may fail but I don't see how that's
> inconvenient. If it doesn't fail it will simply update to the head, which is
> hardly an inconveniece. Or am I missing something?
'hg update -c' apparently ignores new files (not yet added, nor
explicitly ignored). It only fails if there are outstanding changes to
already tracked files.
> I guess by "where" you mean where the file containing the message about what
> cleanup needs to be done manually after an upgrade should go. I just meant
> that each spkg should append something to, say, $SAGE_ROOT/final_messages ,
> and then sage-upgrade itself should cat and delete that file at the end of
> the whole process.
Yep. Although I wouldn't delete such logs after printing them at the
end. (However, they *should* end up in install.log anyway.)
> Join us in #sagemath on irc.freenode.net
I prefer irc.* over chat.* since the former conforms to good old
conventions. irc://irc.freenode.net is more explicit, but irc://chat.freenode.net
would also be ok. :-)
-leif