-
-
Notifications
You must be signed in to change notification settings - Fork 452
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Put more files under revision control. #9433
Comments
comment:1
I'm marking this as "needs review", but consider this patch experimental. |
comment:2
A little explanation: this patch creates a directory "other-scripts" in SAGE_ROOT/local/bin. This new directory contains a brief README.txt and also subdirectories "root" and "spkg". "root" contains the text files from SAGE_ROOT. The only one with any changes is README.txt which explains how these files are under revision control. Similarly, "spkg" contains various text files from SAGE_ROOT/spkg, and the only one with any changes is README.txt. |
comment:3
This probably needs to be rebased. When people are ready to look at it, let me know and I'll see what I can do. |
rebased against 4.5.alpha4 + #9456 |
comment:4
Attachment: trac_9433-scripts.2.patch.gz New approach, after a discussion on sage-devel: create a new repo at the top level tracking the appropriate files. I'm attaching a new version of the patch for the scripts repo. Someone -- the release manager, I guess -- also needs to create the top level repo, because I don't know how to do this in such a way that it can be posted on a ticket. Here are the instructions:
(I don't know if we really need these last two files, but this is probably not the ticket for making such decisions.) Finally, do
When you run "sage -sdist ..." it should add a tag for the new version of Sage. This does not create a new spkg for the files in SAGE_ROOT, since those files have to be in place when you unpack the sage tar file. But it creates the repository so that people can post patches to the trac server, etc. |
comment:5
Looking with my eyes, this looks good. I don't have time to test right now. The test would be to take a clean Sage, do the above, then do "sage -sdist ..." and make sure that in the sdist the above is all still there. |
main repo: add "hg_root" command to Sage |
comment:6
Attachment: trac_9433-sage-repo.patch.gz Replying to @williamstein:
This works for me, but other people should definitely look at it carefully. |
comment:7
This probably needs work: how will it work with "sage -upgrade"? |
This comment has been minimized.
This comment has been minimized.
comment:8
Here's a new version of the patch for the scripts repo. I think this should deal with upgrading: the script "sage-upgrade" now runs "sage --hg branch" from SAGE_ROOT, and if this fails, it assumes that there is no Mercurial repository and creates it. |
This comment has been minimized.
This comment has been minimized.
comment:11
New version, rebased against #9609. |
new version, using "hg clone". apply to scripts repo. |
Attachment: trac_9433-scripts.3.patch.gz new version, using "hg clone". apply to scripts repo. |
comment:13
Attachment: trac_9433-scripts.patch.gz Note that if you use "hg clone ..." to copy the repo, you have to do it earlier in the process: it apparently needs to be done with an empty directory, so in sage-sdist it is now done right after creating $TMP. |
comment:15
If I
The new 4.5.99 builds successfully from source and passes the long doctests. But |
Author: John Palmieri |
comment:16
I also noticed
|
comment:17
Replying to @qed777:
Right, I didn't do this right. In the new patch, the root repo is not modified at all by sage-make_devel_packages; instead, sage-sdist clones it, tags it, and commits the new tag, while sage-bdist just clones it.
The missing ipython directory was an oversight. I think I've fixed it. The missing sage-README-osx.txt was intentional: this should only be included for binary distributions on OS X, and its presence there is taken care of by sage-bdist:
Perhaps we can close #6938 if this gets merged?
This was intentional. Before this, the file sage-python was stored in the scripts repo and then unpacked to the top level. I'm not sure why this was done, but I wanted to keep the end result as close as possible to what it was before. |
comment:143
John (and/or Volker), do you have time to work on this in the coming week / 2 weeks? If yes, I would like to merge this in sage-4.7.alpha0. This ticket might require some more work to get it right, so it would be nice to know whether you have time. Otherwise we can postpone this to a later Sage release. |
comment:144
I'm around and am in favor of merging it asap. |
comment:145
I have a fix to this problem which I am testing right now. It looks good so far, and I'll post it later if it continues to look good. (The fix is as follows: the script |
comment:146
Okay, I have two options; which is better? In
The first of these adds a redundant commit message to the log file if the relevant files are changed. The second discards all changes, including any other ones that the user may have made. I don't know Mercurial well enough, but perhaps there is a better third choice? |
comment:147
I'm in favor of the following third option:
So if you had any uncommitted changes before updating, you'll end up with two commit messages. The more individual commits the better. The only drawback is that if you had made modifications to the root repository that you want to keep and you are not using patch queues, then you now have to extract your changes as a patch from the repository and apply that patch. I think thats acceptable since, I think, most developers use patch queues and I don't expect too frequent edits to the root repository. If that doesn't convince you, I'd prefer option number 1 as my second choice :-) |
comment:148
Here is a new version of the scripts patch. The only change is in |
This comment has been minimized.
This comment has been minimized.
comment:149
Oh, also, I created some versions for testing upgrades:
The first of these is just 4.6.2.rc0 with the patches from this ticket applied. In each of the other ones, one or two files have been modified, as indicated. It's also worth testing by updating to the "X0" version, for example, then modifying a file tracked by the root repo (like README.txt) without committing the change, and then trying to update to "X1". The update should abort. |
comment:150
I made a few minor cosmetic changes in the patch, and right now, the upgrade paths I mentioned use the old version, not the new one. I'll have them updated in a few minutes. |
comment:151
Okay, everything's updated now. |
comment:152
I made new testing releases:
Upgrading sage-4.7.alpha0 -> sage-4.7.alpha1 succeeded this time. |
comment:153
I've tried the update and it works beautifully. I think there is still one problem: If the user has no .hgrc (like many non-developers trying to upgrade), then mercurial will fail to commit with
So whenever we commit to the root repo, we should specify a username explicitly. For example,
|
patch for scripts repo |
Attachment: trac_9433-scripts.v9.patch.gz The file $SAGE_ROOT/spkg/root-spkg-install |
comment:154
Attachment: root-spkg-install.v4.gz Replying to @vbraun:
I wouldn't have spotted this. Good catch. I have new patches which add "-u ..." to various commit commands: in sage-update and in root-spkg-install. I haven't bothered with sage-sdist or sage-make_devel_packages, since these are done by the release manager who had better have a .hgrc file. (Besides, there are already other "hg commit" commands in those scripts.) I've also updated my versions (4.6.2.X0 etc.) for testing upgrades with these changes. |
This comment has been minimized.
This comment has been minimized.
comment:155
I'm happy with it now. I tested upgrades without |
comment:156
Agreed! This will get merged in sage-4.7.alpha0. I still expect breakage here and there, but that's what alpha versions are for. |
Merged: sage-4.7.alpha0 |
Put the text files in
$SAGE_ROOT
, and also the text files in spkg, under revision control. (See the discussion at the end of #9351.)Here are the instructions:
$SAGE_ROOT/.hgignore
(note that this is a new file)$SAGE_ROOT/spkg/root-spkg-install
(note that this is a new file)$SAGE_ROOT/spkg/install
$SAGE_ROOT/spkg/standard/deps
Then from $SAGE_ROOT, run the attached script attachment: 9433_hg_script.sh to create the Mercurial repository.
Testing: see http://sage.math.washington.edu/home/release/sage-4.7.alpha0/
CC: @williamstein @dandrake @kcrisman @nexttime
Component: distribution
Author: John Palmieri
Reviewer: Leif Leonhardy, Volker Braun, Jeroen Demeyer
Merged: sage-4.7.alpha0
Issue created by migration from https://trac.sagemath.org/ticket/9433
The text was updated successfully, but these errors were encountered: