Hi David, On Thu, Dec 31, 2009 at 3:42 AM, Dr. David Kirkby <david.kir...@onetel.net> wrote: > How can I produce a patch for Sage, if my Sage will not run on my machine?
If you don't have hg installed on your system, you can use the command diff instead. For example, say the following content is saved to a file called "myfile.txt": <myfile-content> This sentense has a some typ0s. </myfile-content> Next, you fix typos in the file to get the new file "mynewfile.txt": <mynewfile-content> This sentence has a some typos. </mynewfile-content> You have to make sure that you first create a copy of "myfile.txt" and rename it as "mynewfile.txt" before doing any editing. You can now produce a diff file between myfile.txt and mynewfile.txt: diff -Naur myfile.txt mynewfile.txt > mydiff.patch which produces the following diff content: $ cat mydiff.patch --- myfile.txt 2009-12-30 08:50:54.462302935 -0800 +++ mynewfile.txt 2009-12-30 08:51:15.389961721 -0800 @@ -1 +1 @@ -This sentense has a some typ0s. +This sentence has a some typos. When you compile Sage from source, Mercurial should also be built and installed during the build process. If the mercurial spkg is successfully installed, it should be in SAGE_ROOT/local/bin/hg In that case, make an alias to hg such as the following: alias 'hg'='/path/to/SAGE_ROOT/local/bin/hg' If you're trying to edit the Sage library, i.e. SAGE_ROOT/dev/sage/, then cd to SAGE_ROOT/dev/sage, edit the necessary file(s). Afterwards, do "hg status" to see which files have changed. To see the actual new content, do "hg diff"; be careful here because the output of "hg diff" is sent to standard output by default so you might see a bunch of stuff flash through your terminal screen. However, you should be able to redirect the output of "hg diff" to a file and review your changes. You can review your changes by looking at the diff output. When you're certain that you've made all necessary changes, do "hg commit" to commit your changes. To produce a patch, do $ hg export tip > mychanges.patch The basic steps are more or less similar if you're trying to edit a file in an spkg. In any case, you need to make sure that the directory you're editing from has a Mercurial repository. The command "hg status" should not report any errors if your current directory is under revision control. -- Regards Minh Van Nguyen -- 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