From 9c352f5704092f747dd765cb42c7d547ebbb8621 Mon Sep 17 00:00:00 2001 From: Eli Barzilay Date: Mon, 17 May 2010 04:38:43 -0400 Subject: [PATCH] More svn -> git changes. Some mentions of svn/subversion are replaced with git, and some patterns for paths to ignore include ".git*". (Note ".mailmap" not added, might need to.) --- collects/framework/private/frame.rkt | 9 ++---- .../games/paint-by-numbers/all-problems.rkt | 28 ++++++++----------- collects/htdp/master.rkt | 10 +++---- collects/meta/build/make-patch | 8 +++--- collects/meta/dist-specs.rkt | 7 +++-- collects/meta/drdr/render.ss | 4 +-- collects/planet/planet-archives.rkt | 10 +++---- collects/planet/planet.scrbl | 2 +- collects/plot/pre-installer.rkt | 3 +- collects/repo-time-stamp/time-stamp.rkt | 26 ++++++----------- collects/scribblings/raco/plt.scrbl | 11 ++++---- collects/setup/pack.rkt | 8 +++--- collects/setup/unixstyle-install.rkt | 9 +++--- .../benchmarks/common/index-template.html | 2 +- .../racket/benchmarks/common/tabulate.rkt | 2 +- .../racket/benchmarks/rx/index-template.html | 2 +- collects/version/check.rkt | 2 +- collects/web-server/private/configure.rkt | 2 +- src/README | 23 ++++++++------- src/racket/gc/upgrade.rkt | 23 +++++++-------- 20 files changed, 87 insertions(+), 104 deletions(-) diff --git a/collects/framework/private/frame.rkt b/collects/framework/private/frame.rkt index f8d7ab4c2f..46c89c737e 100644 --- a/collects/framework/private/frame.rkt +++ b/collects/framework/private/frame.rkt @@ -2410,14 +2410,11 @@ (define memory-canvases '()) (define show-memory-text? - (or (with-handlers ([exn:fail:filesystem? - (λ (x) #f)]) + (or (with-handlers ([exn:fail:filesystem? (λ (x) #f)]) (directory-exists? (collection-path "repo-time-stamp"))) - (with-handlers ([exn:fail:filesystem? - (λ (x) #f)]) + (with-handlers ([exn:fail:filesystem? (λ (x) #f)]) (let ([fw (collection-path "framework")]) - (or (directory-exists? (build-path fw ".svn")) - (directory-exists? (build-path fw "CVS"))))))) + (directory-exists? (build-path fw 'up 'up ".git")))))) (define bday-click-canvas% (class canvas% diff --git a/collects/games/paint-by-numbers/all-problems.rkt b/collects/games/paint-by-numbers/all-problems.rkt index bd8886b9d1..c63760d161 100644 --- a/collects/games/paint-by-numbers/all-problems.rkt +++ b/collects/games/paint-by-numbers/all-problems.rkt @@ -14,22 +14,18 @@ (define-syntax (mk-units stx) (syntax-case stx () [(_) - (with-syntax ([(unit-names ...) - (let loop ([files - (call-with-input-file - (build-path (collection-path "games" "paint-by-numbers") - "problems" "directory") - read)]) - (cond - [(null? files) null] - [(or (member (car files) '("CVS" ".svn")) - (not (file-exists? (build-path (collection-path "games" "paint-by-numbers") - "problems" (car files))))) - (loop (cdr files))] - [else - (cons (car files) - (loop (cdr files)))]))]) - (syntax (list (include (build-path "problems" unit-names)) ...)))])) + (with-syntax + ([(unit-names ...) + (let ([probdir (collection-path "games" "paint-by-numbers") "problems"]) + (let loop ([files + (call-with-input-file (build-path probdir "directory") + read)]) + (cond + [(null? files) null] + [(not (file-exists? (build-path probdir (car files)))) + (loop (cdr files))] + [else (cons (car files) (loop (cdr files)))])))]) + #'(list (include (build-path "problems" unit-names)) ...))])) (define units (mk-units)) diff --git a/collects/htdp/master.rkt b/collects/htdp/master.rkt index 3badf0e388..0f2720cc9f 100644 --- a/collects/htdp/master.rkt +++ b/collects/htdp/master.rkt @@ -35,12 +35,12 @@ (make-object bitmap% (build-path (collection-path "icons") "trumpet.xbm") 'xbm)) #| - cd ~.../plt/collects/icons + cd ~.../plt/collects/icons cp where/ever/trumpet.xbm . - svn update - svn trumpet.xbm - svn setprop svn:mime-type image/x-xbitmap - svn commit -m "added trumpet image" + git pull + ...make trumpet.xbm... + git commit -m "added trumpet image" + git push |# #| ------------------------------------------------------------------------ diff --git a/collects/meta/build/make-patch b/collects/meta/build/make-patch index ea8bba724d..7be7168f2b 100755 --- a/collects/meta/build/make-patch +++ b/collects/meta/build/make-patch @@ -10,11 +10,11 @@ Instructions: up.) I do this: - cd - svn co http://svn.plt-scheme.org/plt/tags/ patched - cd patched - svn merge -r: http://svn.plt-scheme.org/plt/trunk + cd ...git-repo... + git checkout -b patch patched + git cherry-pick fix-sha1s... ... more merges as needed ... + And at the end don't forget to drop a new tag for the patched result. * Make sure that "collects/version/patchlevel.ss" contains the new patch number, and add comments about this patch, with a list of files that are diff --git a/collects/meta/dist-specs.rkt b/collects/meta/dist-specs.rkt index 8cb32cee90..b94fcc6d87 100644 --- a/collects/meta/dist-specs.rkt +++ b/collects/meta/dist-specs.rkt @@ -149,7 +149,7 @@ compiled-filter := (- (collects: "**/compiled/") src-filter := (src: "") docs-filter := (- (doc: "") ; all docs, (notes: "") ; excluding basic stuff - std-docs) ; and things in svn + std-docs) ; and things in git docsrc-filter := (+ (collects: "setup/scribble.rkt") ; only with doc sources (collects: "**/scribblings/") (srcfile: "*.{scrbl|scribble}") @@ -162,7 +162,7 @@ gui-filter := (- (+ (collects: "**/gui/") (srcfile: "gui.rkt")) (srcfile: "racket/gui/dynamic.rkt")) tools-filter := (+ (collects: "**/tools/") (srcfile: "tools.rkt")) -;; these are in the doc directory, but are comitted in svn and should be +;; these are in the doc directory, but are comitted in git and should be ;; considered like sources std-docs := (doc: "doc-license.txt" "*-std/") @@ -170,7 +170,8 @@ std-docs := (doc: "doc-license.txt" "*-std/") ;; Junk ;; This is removed from the original tree only (*not* from the binary trees) -junk := (+ "CVS/" "[.#]*" "*~" +;; (the first line shouldn't be necessary, but be safe) +junk := (+ ".git*" "/.mailmap" ".svn" "CVS/" "[.#]*" "*~" ;; binary stuff should come from the platform directories "/plt/bin/" "/plt/lib/" "/plt/src/*build*/") diff --git a/collects/meta/drdr/render.ss b/collects/meta/drdr/render.ss index 86a468d383..2e60708629 100644 --- a/collects/meta/drdr/render.ss +++ b/collects/meta/drdr/render.ss @@ -471,7 +471,7 @@ is passed @code{-j} with the number of cores. Each revision also has a fresh home directory and PLaneT cache.} @h1{How long does it take for a build to start after a check-in?} - @p{Only one build runs at a time and when none is running the SVN repository is polled every @,(number->string (current-monitoring-interval-seconds)) seconds.} + @p{Only one build runs at a time and when none is running the git repository is polled every @,(number->string (current-monitoring-interval-seconds)) seconds.} @h1{How is the revision "tested"?} @p{Each file's @code{@,PROP:command-line} property is consulted. If it is the empty string, the file is ignored. If it is a string, then a single @code{~s} is replaced with the file's path, @code{mzscheme} and @code{mzc} with their path (for the current revision), and @code{mred} and @code{mred-text} with @code{mred-text}'s path (for the current revision); then the resulting command-line is executed. @@ -500,7 +500,7 @@ @p{At the most basic level, if the bytes are different. However, there are two subtleties. First, DrDr knows to ignore the result of @code{time}. Second, the standard output and standard error streams are compared independently. The difference display pages present changed lines with a @span[([class "difference"])]{unique background}.} @h1{How is this site organized?} - @p{Each file's test results are displayed on a separate page, with a link to the previous revision on changes. All the files in a directory are collated and indexed recursively. On these pages each column is sortable and each row is clickable. The root of a revision also includes the SVN commit message with links to the test results of the modified files. The top DrDr page displays the summary information for all the tested revisions.} + @p{Each file's test results are displayed on a separate page, with a link to the previous revision on changes. All the files in a directory are collated and indexed recursively. On these pages each column is sortable and each row is clickable. The root of a revision also includes the git commit message with links to the test results of the modified files. The top DrDr page displays the summary information for all the tested revisions.} @h1{What is the difference between @code{Duration (Abs)} and @code{Duration (Sum)}?} @p{@code{Duration (Abs)} is the difference between the earliest start time and the latest end time in the collection.} diff --git a/collects/planet/planet-archives.rkt b/collects/planet/planet-archives.rkt index 248d7b1193..7fe087b37c 100644 --- a/collects/planet/planet-archives.rkt +++ b/collects/planet/planet-archives.rkt @@ -13,11 +13,11 @@ (define (repository-tree) (define (id x) x) (filter-tree-by-pattern - (directory->tree (CACHE-DIR) - (lambda (x) - (not (regexp-match #rx"/(CVS|[.]svn)|[.]git$" - (path->string x)))) - 4) + (directory->tree + (CACHE-DIR) + (lambda (x) + (not (regexp-match? #rx"/(?:[.]git.*|[.]svn|CVS)$" (path->string x)))) + 4) (list id id id string->number string->number))) ;; get-installed-planet-dirs : -> listof (list path[absolute, dir] string string (listof string) nat nat) diff --git a/collects/planet/planet.scrbl b/collects/planet/planet.scrbl index d5123da4b2..23be303338 100644 --- a/collects/planet/planet.scrbl +++ b/collects/planet/planet.scrbl @@ -777,7 +777,7 @@ Make sure that all source files, documentation, etc. that you want to be a part of the package are in a single directory and its subdirectories. Furthermore make sure that nothing else, @italic{e.g.} unneeded backup files, is in that directory (with the exception that -the subdirectories and files CVS or Subversion creates are +the meta-subdirectories and files Git/Subversion/CVS uses are automatically skipped by the packaging tool). @subsubsection{Create Documentation [Optional]} diff --git a/collects/plot/pre-installer.rkt b/collects/plot/pre-installer.rkt index 96db31bd53..6aa7301939 100644 --- a/collects/plot/pre-installer.rkt +++ b/collects/plot/pre-installer.rkt @@ -56,7 +56,6 @@ (unless (directory-exists? native-dir) (make-directory* native-dir)) (parameterize ([current-directory src-dir]) (for ([path (directory-list)]) - (when (and (directory-exists? path) - (not (member (path->string path) '("CVS" ".svn")))) + (when (directory-exists? path) (parameterize ([current-directory path]) (build-library path)))))) diff --git a/collects/repo-time-stamp/time-stamp.rkt b/collects/repo-time-stamp/time-stamp.rkt index dc106ec503..365baafe17 100644 --- a/collects/repo-time-stamp/time-stamp.rkt +++ b/collects/repo-time-stamp/time-stamp.rkt @@ -1,19 +1,9 @@ +#lang racket/base +(require drracket/tool racket/unit framework "stamp.ss") -(module time-stamp mzscheme - (require drscheme/tool - mzlib/unit - framework) - - (require "stamp.ss") - - (provide tool@) - - (require "stamp.ss") - - (define tool@ - (unit - (import drscheme:tool^) - (export drscheme:tool-exports^) - (define (phase1) (void)) - (define (phase2) (void)) - (version:add-spec '-svn stamp)))) +(provide tool@) +(define tool@ + (unit (import drscheme:tool^) (export drscheme:tool-exports^) + (define (phase1) (void)) + (define (phase2) (void)) + (version:add-spec '-- stamp))) diff --git a/collects/scribblings/raco/plt.scrbl b/collects/scribblings/raco/plt.scrbl index f6a5519e67..cbc191e1ed 100644 --- a/collects/scribblings/raco/plt.scrbl +++ b/collects/scribblings/raco/plt.scrbl @@ -300,11 +300,12 @@ making @filepath{.plt} archives.} Old, keywordless variant of @racket[pack-plt] for backward compatibility.} @defproc[(std-filter (p path-string?)) boolean?]{ - Returns @racket[#t] unless @racket[p], after stripping its - directory path and converting to a byte string, matches one of the - following regular expressions: @litchar{^CVS$}, @litchar{^[.]svn$}, - @litchar{^[.]cvsignore}, @litchar{^compiled$}, @litchar{^doc}, - @litchar{~$}, @litchar{^#.*#$}, @litchar{^[.]#}, or @litchar{[.]plt$}.} + Returns @racket[#t] unless @racket[p], after stripping its directory + path and converting to a byte string, matches one of the following + regular expressions: @litchar{^[.]git}, @litchar{^[.]svn$}, + @litchar{^CVS$}, @litchar{^[.]cvsignore}, @litchar{^compiled$}, + @litchar{^doc}, @litchar{~$}, @litchar{^#.*#$}, @litchar{^[.]#}, or + @litchar{[.]plt$}.} @defproc[(mztar (path path-string?) (output output-port?) diff --git a/collects/setup/pack.rkt b/collects/setup/pack.rkt index e2e5849e3c..9ec2614820 100644 --- a/collects/setup/pack.rkt +++ b/collects/setup/pack.rkt @@ -178,10 +178,10 @@ (define (std-filter path) (let-values ([(base name dir?) (split-path path)]) (let ([name (path->bytes name)]) - (not (or (regexp-match #rx#"^(?:CVS|[.]svn|[.]git|[.]cvsignore|compiled|doc)$" - name) - (regexp-match #rx#"~$|^#.*#$|^[.]#" name) - (regexp-match #rx#"[.]plt$" name)))))) + (not (or (regexp-match? #rx#"^(?:[.](?:git.*|svn|cvsignore)|CVS|compiled|doc)$" + name) + (regexp-match? #rx#"~$|^#.*#$|^[.]#" name) + (regexp-match? #rx#"[.]plt$" name)))))) (define (pack-collections output name collections replace? extra-setup-collections [file-filter std-filter] [at-plt-home? #f]) diff --git a/collects/setup/unixstyle-install.rkt b/collects/setup/unixstyle-install.rkt index e6d825bbc1..07016c7d05 100644 --- a/collects/setup/unixstyle-install.rkt +++ b/collects/setup/unixstyle-install.rkt @@ -11,8 +11,8 @@ ;; installation in the given paths (used by the shell installers) ;; (interactive, undo-on-error, create-uninstaller) ;; - `copy': similar to `move', but copies instead of moving -;; - `make-install-copytree': copies some toplevel directories, skips .svn -;; and compiled subdirs, and rewrites config.ss, but no uninstaller (used +;; - `make-install-copytree': copies some toplevel directories, skips ".*" +;; and compiled subdirs, and rewrites "config.ss", but no uninstaller (used ;; by `make install') (requires an additional `origtree' argument) ;; - `make-install-destdir-fix': fixes paths in binaries, laucnhers, and ;; config.ss (used by `make install' to fix a DESTDIR) (requires exactly @@ -414,9 +414,8 @@ (define copytree (move/copy-tree #f)) (define origtree? (equal? "yes" (get-arg))) (current-directory pltdir) - (set! skip-filter ; skip all dot-names, CVS and compiled subdirs - (lambda (p) - (regexp-match #rx"^(?:[.].*|CVS|compiled)$" (basename p)))) + (set! skip-filter ; skip all dot-names and compiled subdirs + (lambda (p) (regexp-match? #rx"^(?:[.].*|compiled)$" (basename p)))) (with-handlers ([exn? (lambda (e) (undo-changes) (raise e))]) (set! yes-to-all? #t) ; non-interactive (copytree "collects" 'collects) diff --git a/collects/tests/racket/benchmarks/common/index-template.html b/collects/tests/racket/benchmarks/common/index-template.html index 6a38565bfa..e9b3d60b42 100644 --- a/collects/tests/racket/benchmarks/common/index-template.html +++ b/collects/tests/racket/benchmarks/common/index-template.html @@ -63,7 +63,7 @@ significant improvements from some compilers.

see Gambit benchmark results.

For further details on the benchmarks here, see the benchmark source and - infrastructure, which is available form the PLT SVN repository:

+ infrastructure, which is available form the PLT git repository:

http://git.racket-lang.org/plt/tree/HEAD:/collects/tests/racket/benchmarks/common/

diff --git a/collects/tests/racket/benchmarks/common/tabulate.rkt b/collects/tests/racket/benchmarks/common/tabulate.rkt index bb9babf32b..1154f42614 100755 --- a/collects/tests/racket/benchmarks/common/tabulate.rkt +++ b/collects/tests/racket/benchmarks/common/tabulate.rkt @@ -34,7 +34,7 @@ exec racket -qu "$0" ${1+"$@"} (once-each [("--graph") "generate graphs instead of tables (unless --multi)" (generate-graph #t)] - [("--links") "benchmark links to SVN" + [("--links") "benchmark links to git" (include-links #t)] [("--multi") name "generate multiple pages for different views of data" (base-link-filename name)] diff --git a/collects/tests/racket/benchmarks/rx/index-template.html b/collects/tests/racket/benchmarks/rx/index-template.html index 279ccaa2e2..5387758d34 100644 --- a/collects/tests/racket/benchmarks/rx/index-template.html +++ b/collects/tests/racket/benchmarks/rx/index-template.html @@ -64,7 +64,7 @@

For further details on the benchmarks here, see the benchmark source and - infrastructure, which is available form the PLT SVN repository:

+ infrastructure, which is available form the PLT git repository:

http://git.racket-lang.org/plt/tree/HEAD:/collects/tests/racket/benchmarks/rx

diff --git a/collects/version/check.rkt b/collects/version/check.rkt index 61d4ea5d6d..7a3c706acf 100644 --- a/collects/version/check.rkt +++ b/collects/version/check.rkt @@ -77,7 +77,7 @@ [stable (getver 'stable)] [recent (getver 'recent)]) (cond - ;; we have the newest version (can be > if we have an svn build) + ;; we have the newest version (can be > if we have a build from git) [(version<=? recent current) 'ok] ;; we're stable, but there's a newer version [(version<=? stable current) `(ok-but ,recent)] diff --git a/collects/web-server/private/configure.rkt b/collects/web-server/private/configure.rkt index b89e28094d..01ed764e67 100644 --- a/collects/web-server/private/configure.rkt +++ b/collects/web-server/private/configure.rkt @@ -777,7 +777,7 @@ (let ([p (build-path from name)]) (cond [(directory-exists? p) - (unless (member (path->string name) '("CVS" ".svn")) ; yuck + (unless (regexp-match? #rx"^(?:[.](?:git.*|svn)|CVS)$" (path->string name)) ; yuck (let ([dest (build-path to name)]) (ensure-directory-shallow dest) (for-each (lambda (x) (ensure* p dest x)) diff --git a/src/README b/src/README index 13121274cf..742395d059 100644 --- a/src/README +++ b/src/README @@ -101,8 +101,8 @@ Quick instructions: Detailed instructions: 0. If you have an old Racket installation in the target directory, - remove it (unless you are using Subversion with an "in-place" - build as described below). + remove it (unless you are using an "in-place" build from a + repository as described below). Also, make sure that you have libraries and header files for Xft and Cairo (v1.23 and up) if you would like support for font @@ -122,15 +122,15 @@ Detailed instructions: It's better to run the build in a directory other than the one containing `configure', especially if you're getting sources via - Subversion. A common way to start a Subversion-based build is: + git. A common way to start a git-based build is: cd [here] mkdir build cd build where "[here]" is the directory containing this `README' file and - the `configure' script. The Subversion repository is configured - to support this convention by ignoring `build' in this directory. + the `configure' script. The git repository is configured to support + this convention by ignoring `build' in this directory. A separate build directory is better in case the Makefile organization changes, or in case the Makefiles lack some @@ -238,18 +238,17 @@ Detailed instructions: clean build directory when changing the --prefix value, because the path gets wired into shared objects. - If you build frequently from the Subversion-based sources, beware - that you may accumulate user- and version-specific information in - your "add-ons" directory, which you can most easily find by - evaluating + If you build frequently from the git-based sources, beware that + you may accumulate user- and version-specific information in your + "add-ons" directory, which you can most easily find by evaluating (find-system-path 'addon-dir) in Racket. In addition, if you configure with --enabled-shared, you may accumlate many unused versions of the dynamic libraries in your installation target. -After an "in-place" install without Subversion, the racket/src directory -is no longer needed, and it can be safely deleted. Build information -is recorded in a "buildinfo" file in the installation. +After an "in-place" install without git, the racket/src directory is +no longer needed, and it can be safely deleted. Build information is +recorded in a "buildinfo" file in the installation. For a build without --prefix (or with --enable-origtree) and without --enable-shared, you can safely move the install tree, because all diff --git a/src/racket/gc/upgrade.rkt b/src/racket/gc/upgrade.rkt index 9246374288..2b58f4c47b 100644 --- a/src/racket/gc/upgrade.rkt +++ b/src/racket/gc/upgrade.rkt @@ -1,7 +1,7 @@ (define old-dir (current-directory)) (define new-dir "~/Desktop/gc6.7") -(define really-svn? #t) +(define really-git? #t) (require mzlib/file mzlib/process) @@ -22,13 +22,14 @@ (fill-table new-dir new) (fill-table old-dir old) -(hash-table-for-each old (lambda (k v) - (let ([b (path->bytes k)]) - (when (or (regexp-match #rx#"CVS" b) - (regexp-match #rx#"[.]svn" b) - (regexp-match #rx#"upgrade[.]ss$" b) - (regexp-match #rx#"gc[.]h$" b)) - (hash-table-remove! old k))))) +(hash-table-for-each + old + (lambda (k v) + (let ([b (path->bytes k)]) + (when (or (regexp-match? #rx#"^(?:^|/)(?:[.](?:git.*|svn)|CVS)(?:/|$)$" b) + (regexp-match? #rx#"upgrade[.]ss$" b) + (regexp-match? #rx#"gc[.]h$" b)) + (hash-table-remove! old k))))) (define (content f n) (with-input-from-file f (lambda () (read-bytes n)))) @@ -66,7 +67,7 @@ (define (go cmd) (printf "CMD: ~a~n" cmd) - (when really-svn? + (when really-git? (system cmd))) (hash-table-for-each new @@ -82,13 +83,13 @@ (go (get-output-string s))) (let ([s (open-output-string)]) - (fprintf s "cd ~a; svn add " (path->string old-dir)) + (fprintf s "cd ~a; git add " (path->string old-dir)) (hash-table-for-each new (lambda (k v) (fprintf s "~a " (path->string k)))) (go (get-output-string s))) (let ([s (open-output-string)]) - (fprintf s "cd ~a; svn remove " (path->string old-dir)) + (fprintf s "cd ~a; git rm " (path->string old-dir)) (hash-table-for-each old (lambda (k v) (fprintf s "~a " (path->string k)))) (go (get-output-string s)))