Gnus development mailing list
 help / color / mirror / Atom feed
* Re: 'cvs log' for Gnus CVS doesn't work
       [not found] ` <m37jeltb62.fsf@quimbies.gnus.org>
@ 2005-08-22 20:19   ` Simon Josefsson
  0 siblings, 0 replies; only message in thread
From: Simon Josefsson @ 2005-08-22 20:19 UTC (permalink / raw)
  Cc: ding

[-- Attachment #1: Type: text/plain, Size: 21825 bytes --]

I'm Cc:ing ding to possibly reach CVS master... this is about 'cvs
log' not working because of a corrupt gnus-uu.el in repository, and
how to salvage the broken *,v file.

Lars Magne Ingebrigtsen <larsi@gnus.org> writes:

> Simon Josefsson <jas@extundo.com> writes:
>
>> I think the problem is data corruption.  Is there a spurious \x9 byte
>> in the gnus-uu.el file?  Could you manually remove it?
>
> I've tried looking at the file to find out what's wrong, but I've
> been unsuccessful.
>
> I've included it below -- do you see what's wrong?

I had to build my own CVS binary that printed more debug information,
but eventually I found the problems...

The file is corrupt.  The detailed patches for 21 revisions are lost:
2.29-2.45, which is the end of the 2.x branch, and then renamed to
3.x, where 3.1-3.5 are missing.  Below I fixed the end points so *,v
file is possible parse.  FYI, this revision refer to code in about
1997 or something like that.

Further, the patch for revision 1.2 is corrupt too, but I was able to
salvage it from the (corrupt!) 1.1.1.1 patch.

The patch for 1.1.1.1 was also corrupt.  I removed the leading
offending part, but it appears as if a substantial part of the patch
is missing.

Finally, the entire 1.1 entry was duplicated, and there was a dummy
1.1.1.1 entry.

Please apply the following patch to gnus-uu.el,v in the CVS
repository.  I'm attaching a complete gnus-uu.el replacement too.  I
checked that there hasn't been any commits to that file since you sent
me the gnus-uu.el,v file.

I really hope that no other file is broken, and that 'cvs log' will
finally work now.

--- orig,v	2005-08-22 22:04:00.606366568 +0200
+++ gnus-uu.el,v	2005-08-22 22:07:07.819905784 +0200
@@ -6657,45 +6657,6 @@
 @
 text
 @d273 31
-a303 32
-(gnus-define-keys 
- (gnus-uu-mark-map "P" gnus-summary-mark-map)
- "p" gnus-summary-mark-as-processable
- "u" gnus-summary-unmark-as-processable
- "U" gnus-summary-unmark-all-processable
- "v" gnus-uu-mark-over
- "s" gnus-uu-mark-series
- "r" gnus-uu-mark-region
- "R" gnus-uu-mark-by-regexp
- "t" gnus-uu-mark-thread
- "T" gnus-uu-unmark-thread
- "a" gnus-uu-mark-all
- "b" gnus-uu-mark-buffer
- "S" gnus-uu-mark-sparse
- "k" gnus-summary-kill-process-mark
- "y" gnus-summary-yank-process-mark
- "w" gnus-summary-save-process-mark)
-
-(gnus-define-keys 
- (gnus-uu-extract-map "X" gnus-summary-mode-map)
- ;;"x" gnus-uu-extract-any
- ;;"m" gnus-uu-extract-mime
- "u" gnus-uu-decode-uu
- "U" gnus-uu-decode-uu-and-save
- "s" gnus-uu-decode-unshar
- "S" gnus-uu-decode-unshar-and-save
- "o" gnus-uu-decode-save
- "O" gnus-uu-decode-save
- "b" gnus-uu-decode-binhex
- "B" gnus-uu-decode-binhex
- "p" gnus-uu-decode-postscript
-
-	    (beginning-of-line)
-	    (setq beg (point))
-	    (end-of-line)
-	    (if (not (= length (- (point) beg)))
-		(insert (make-string (- length (- (point) beg)) ? ))))
-	  (forward-line 1))))))
 @
 
 
@@ -9649,7 +9610,69 @@
 	       (gnus-uu-reginize-string (gnus-summary-subject-string))
 	       (if only-unread "[- ]" "."))))
 
-      (ifor occurred
+      (if reg-subject
+	  (progn
+
+; Collect all subjects matching reg-subject.
+
+	    (let ((case-fold-search t))
+	      (goto-char 1)
+	      (while (re-search-forward reg-subject nil t)
+		(progn
+		  (goto-char (match-beginning 0))
+		  (setq list-of-subjects 
+			(cons (cons (gnus-summary-subject-string)
+				    (gnus-summary-article-number))
+			      list-of-subjects))
+		  (forward-line 1))))
+a680 27
+; Expand all numbers in all the subjects: (hi9 -> hi0009, etc).
+
+	    (setq list-of-subjects 
+		  (gnus-uu-expand-numbers list-of-subjects
+					  (not do-not-translate)))
+
+; Sort the subjects.
+
+	    (setq list-of-subjects (sort list-of-subjects 'gnus-uu-string<))
+
+; Get the article numbers from the sorted list of subjects.
+
+	    (while list-of-subjects 
+	      (setq art-num (cdr (car list-of-subjects)))
+	      (if mark-articles (gnus-summary-mark-as-read art-num ?#))
+	      (setq list-of-numbers (cons art-num list-of-numbers))
+	      (setq list-of-subjects (cdr list-of-subjects)))
+
+	    (setq list-of-numbers (nreverse list-of-numbers))))
+
+      list-of-numbers)))
+
+; Takes a list of strings and "expands" all numbers in all the
+; strings.  That is, this function makes all numbers equal length by
+; prepending lots of zeroes before each number. This is to ease later
+; sorting to find out what sequence the articles are supposed to be
+; decoded in. Returns the list of expanded strings.
+d682 5
+d717 23
+a739 25
+;; gnus-uu-grab-article
+;
+; This is the general multi-article treatment function.  It takes a
+; list of articles to be grabbed and a function to apply to each
+; article. 
+;
+; The function to be called should take two parameters.  The first
+; parameter is the article buffer. The function should leave the
+; result, if any, in this buffer. Most treatment functions will just
+; generate files...
+;
+; The second parameter is the state of the list of articles, and can
+; have four values: `first', `middle', `last' and `first-and-last'.
+;
+; The function should return a list. The list may contain the
+; following symbols:
+; `error' if an error occurred
 ; `begin' if the beginning of an encoded file has been received
 ;   If the list returned contains a `begin', the first element of
 ;   the list *must* be a string with the file name of the decoded
@@ -10670,42 +10693,7 @@
 @
 @
 text
-@@
-(defun toggle-any-variable ()
-  "This function ask what variable the user wants to toggle."
-  (interactive)
-  (let (rep)
-    (message "(a)sync, (q)uery, (p)ask, (k)ill CR, (i)nteract, (u)nmark, (c)orrect, (m)eta")
-    (setq rep (read-char))
-    (if (= rep ?a)
-	(gnus-uu-toggle-asynchronous))
-    (if (= rep ?q)
-	(gnus-uu-toggle-query))
-    (if (= rep ?p)
-	(gnus-uu-toggle-always-ask))
-    (if (= rep ?k)
-	(gnus-uu-toggle-kill-carriage-return))
-    (if (= rep ?u)
-	(gnus-uu-toggle-unmark-undecoded))
-    (if (= rep ?c)
-	(gnus-uu-toggle-correct-stripped-uucode))
-    (if (= rep ?m)
-	(gnus-uu-toggle-view-with-metamail))
-    (if (= rep ?i)
-	(gnus-uu-toggle-interactive-view))))
-
-
-;; Misc interactive functions
-
-(defun gnus-uu-decode-and-show-in-buffer ()
-  "Uudecodes the current article and displays the result in a buffer.
-Might be useful if someone has, for instance, some text uuencoded in
-their sigs. (Stranger things have happened.)"
-  (interactive)
-  (gnus-uu-initialize)
-  (let ((uu-buffer (get-buffer-create gnus-uu-output-buffer-name))
-	file-name)
-d349 15
+@d349 15
 a363 204
       (and 
        (gnus-summary-select-article)
@@ -11960,372 +11948,3 @@
 ; Posts the article and all of the encoded file.
 @
 
-
-1.1
-log
-@Initial revision
-@
-text
-@d1 2
-a2 3
-;;; gnus-uu.el --- extract, view or save (uu)encoded files from gnus
-
-;; Copyright (C) 1985, 1986, 1987, 1993, 1994 Free Software Foundation, Inc.
-d189 2
-a190 338
-  "gnus-uu is a package for uudecoding and viewing articles.
-
-
-Keymap overview:
-
-By default, all gnus-uu keystrokes begin with `C-c C-v'. 
-
-There four decoding commands categories:
-All commands for viewing are `C-c C-v C-LETTER'.
-All commands for saving are `C-c C-v LETTER'.
-All commands for marked viewing are `C-c C-v C-M-LETTER'.
-All commands for marked saving are `C-c C-v M-LETTER'.
-
-\\<gnus-summary-mode-map>\\[gnus-uu-decode-and-view]\tDecode and view articles
-\\[gnus-uu-decode-and-save]\tDecode and save articles
-\\[gnus-uu-shar-and-view]\tUnshar and view articles
-\\[gnus-uu-shar-and-save]\tUnshar and save articles
-\\[gnus-uu-multi-decode-and-view]\tChoose a decoding method, decode and view articles
-\\[gnus-uu-multi-decode-and-save]\tChoose a decoding method, decode and save articles
-
-\\[gnus-uu-threaded-multi-decode-and-view]\tDecode a thread and view
-\\[gnus-uu-threaded-multi-decode-and-save]\tDecode a thread and save
-
-\\[gnus-uu-decode-and-show-in-buffer]\tDecode the current article and view the result in a buffer
-\\[gnus-uu-edit-begin-line]\tEdit the 'begin' line of an uuencoded article
-
-\\[gnus-uu-decode-and-save-all-unread-articles]\tDecode and save all unread articles
-\\[gnus-uu-decode-and-save-all-articles]\tDecode and save all articles
-\\[gnus-uu-decode-and-view-all-unread-articles]\tDecode and view all unread articles
-\\[gnus-uu-decode-and-view-all-articles]\tDecode and view all articles
-\\[gnus-uu-decode-and-view-all-marked-files]\tDecode and view all files that have had some articles marked
-\\[gnus-uu-decode-and-save-all-marked-files]\tDecode and save all files that have had some articles marked
-
-\\[gnus-uu-digest-and-forward]\tDigest and forward a series of articles
-\\[gnus-uu-marked-digest-and-forward]\tDigest and forward all marked articles
-
-\\[gnus-uu-mark-by-regexp]\tMark articles for decoding by regexp
-\\[gnus-uu-mark-thread]\tMark articles in this thread
-\\[gnus-uu-mark-region]\tMark articles all articles between point and mark
-\\[gnus-uu-marked-decode-and-view]\tDecode and view marked articles
-\\[gnus-uu-marked-decode-and-save]\tDecode and save marked articles
-\\[gnus-uu-marked-shar-and-view]\tUnshar and view marked articles
-\\[gnus-uu-marked-shar-and-save]\tUnshar and save marked articles
-\\[gnus-uu-marked-multi-decode-and-view]\tChoose decoding method, decode and view marked articles
-\\[gnus-uu-marked-multi-decode-and-save]\tChoose decoding method, decode and save marked articles
-
-\\[gnus-uu-marked-universal-argument]\tPerform any opration on all marked articles
-
-\\[gnus-uu-toggle-asynchronous]\tToggle asynchronous viewing mode
-\\[gnus-uu-toggle-query]\tToggle whether to ask before viewing a file
-\\[gnus-uu-toggle-always-ask]\tToggle whether to ask to save a file after viewing
-\\[gnus-uu-toggle-kill-carriage-return]\tToggle whether to strip trailing carriage returns
-\\[gnus-uu-toggle-interactive-view]\tToggle whether to use interactive viewing mode
-\\[gnus-uu-toggle-correct-stripped-articles]\tToggle whether to 'correct' articles
-\\[gnus-uu-toggle-view-with-metamail]\tToggle whether to use metamail for viewing 
-\\[gnus-uu-toggle-any-variable]\tToggle any of the things above
-
-\\[gnus-uu-post-news]\tPost an uuencoded article
-
-Function description:
-
-`gnus-uu-decode-and-view' will try to find all articles in the same
-series, uudecode them and view the resulting file(s).
-
-gnus-uu guesses what articles are in the series according to the
-following simplish rule: The subjects must be (nearly) identical,
-except for the last two numbers of the line. (Spaces are largely
-ignored, however.)
-
-For example: If you choose a subject called 
-  \"cat.gif (2/3)\"
-gnus-uu will find all the articles that matches
-  \"^cat.gif ([0-9]+/[0-9]+).*$\".  
-
-Subjects that are nonstandard, like 
-  \"cat.gif (2/3) Part 6 of a series\", 
-will not be properly recognized by any of the automatic viewing
-commands, and you have to mark the articles manually with '#'.
-
-`gnus-uu-decode-and-save' will do the same as
-`gnus-uu-decode-and-view', except that it will not display the
-resulting file, but save it instead.
-
-`gnus-uu-shar-and-view' and `gnus-uu-shar-and-save' are the \"shar\"
-equivalents to the uudecode functions. Instead of feeding the articles
-to uudecode, they are run through /bin/sh. Most shar files can be
-viewed and/or saved with the normal uudecode commands, which is much
-safer, as no foreign code is run.
-
-Instead of having windows popping up automatically, it can be handy to
-view files interactivly, especially when viewing archives. Use
-`gnus-uu-toggle-interactive-mode' to toggle interactive mode.
-
-`gnus-uu-mark-article' marks an article for later
-decoding/unsharing/saving/viewing. The files will be decoded in the
-sequence they were marked. To decode the files after you've marked the
-articles you are interested in, type the corresponding key strokes as
-the normal decoding commands, but put a `M-' in the last
-keystroke. For instance, to perform a standard uudecode and view, you
-would type `C-c C-v C-v'. To perform a marked uudecode and view, say
-`C-v C-v M-C-v'. All the other view and save commands are handled the
-same way; marked uudecode and save is then `C-c C-v M-v'.
-
-`gnus-uu-unmark-article' will remove the mark from a previosly marked
-article.
-
-`gnus-uu-unmark-all-articles' will remove the mark from all marked
-articles.
-
-`gnus-uu-mark-by-regexp' will prompt for a regular expression and mark
-all articles matching that regular expression.
-
-`gnus-uu-mark-thread' will mark all articles downward in the current
-thread.
-
-`gnus-uu-marked-universal-argument' will perform any operation on all
-marked articles. 
-
-There's an additional way to reach the decoding functions to make
-future expansions easier: `gnus-uu-multi-decode-and-view' and the
-corresponding save, marked view and marked save functions. You will be
-prompted for a decoding method, like uudecode, shar, binhex or plain
-save. Note that methods like binhex and save doesn't have view modes;
-even if you issue a view command (`C-c C-v C-m' and \"binhex\"),
-gnus-uu will just save the resulting binhex file.
-
-`gnus-uu-decode-and-show-in-buffer' will decode the current article
-and display the results in an emacs buffer. This might be useful if
-there's jsut some text in the current article that has been uuencoded
-by some perverse poster.
-
-`gnus-uu-decode-and-save-all-articles' looks at all the articles in
-the current newsgroup and tries to uudecode everything it can
-find. The user will be prompted for a directory where the resulting
-files (if any) will be
-saved. `gnus-uu-decode-and-save-unread-articles' does only checks
-unread articles. 
-
-`gnus-uu-decode-and-view-all-articles' does the same as the function
-above, only viewing files instead of saving them. 
-
-`gnus-uu-edit-begin-line' lets you edit the begin line of an uuencoded
-file in the current article. Useful to change a corrupted begin line.
-
-
-When using the view commands, `gnus-uu-decode-and-view' for instance,
-gnus-uu will (normally, see below) try to view the file according to
-the rules given in `gnus-uu-default-view-rules' and
-`gnus-uu-user-view-rules'. If it recognizes the file, it will display
-it immediately. If the file is some sort of archive, gnus-uu will
-attempt to unpack the archive and see if any of the files in the
-archive can be viewed. For instance, if you have a gzipped tar file
-\"pics.tar.gz\" containing the files \"pic1.jpg\" and \"pic2.gif\",
-gnus-uu will uncompress and detar the main file, and then view the two
-pictures. This unpacking process is recursive, so if the archive
-contains archives of archives, it'll all be unpacked.
-
-If the view command doesn't recognise the file type, or can't view it
-because you don't have the viewer, or can't view *any* of the files in
-the archive, the user will be asked if she wishes to have the file
-saved somewhere. Note that if the decoded file is an archive, and
-gnus-uu manages to view some of the files in the archive, it won't
-tell the user that there were some files that were unviewable. Try
-interactive view for a different approach.
-
-
-Note that gnus-uu adds a function to `gnus-exit-group-hook' to clear
-the list of marked articles and check for any generated files that
-might have escaped deletion if the user typed `C-g' during viewing.
-
-
-`gnus-uu-toggle-asynchronous' toggles the `gnus-uu-asynchronous'
-variable.
-
-`gnus-uu-toggle-query' toggles the `gnus-uu-ask-before-view'
-variable.
-
-`gnus-uu-toggle-always-ask' toggles the `gnus-uu-view-and-save'
-variable.
-
-`gnus-uu-toggle-kill-carriage-return' toggles the
-`gnus-uu-kill-carriage-return' variable.
-
-`gnus-uu-toggle-interactive-view' toggles interactive mode. If it is
-turned on, gnus-uu won't view files immediately, but will give you a
-buffer with the default commands and files and let you edit the
-commands and execute them at leisure.
-
-`gnus-uu-toggle-correct-stripped-articles' toggles whether to check
-and correct uuencoded articles that may have had trailing spaces
-stripped by mailers.
-
-`gnus-uu-toggle-view-with-metamail' toggles whether to skip the
-gnus-uu viewing methods and just guess at an content-type based on the
-file name suffix and feed it to metamail.
-
-`gnus-uu-toggle-any-variable' is an interface to the toggle commands
-listed above.
-
-
-Customization
-
-   Rule Variables
-
-   gnus-uu uses \"rule\" variables to decide how to view a file. All
-   these variables are of the form
-  
-      (list '(regexp1 command2)
-            '(regexp2 command2)
-            ...)
-
-   `gnus-uu-user-view-rules'
-     This variable is consulted first when viewing files. If you wish
-     to use, for instance, sox to convert an .au sound file, you could
-     say something like:
-
-       (setq gnus-uu-user-view-rules
-         (list '(\"\\\\.au$\" \"sox %s -t .aiff > /dev/audio\")))
-
-   `gnus-uu-user-view-rules-end'
-     This variable is consulted if gnus-uu couldn't make any matches
-     from the user and default view rules.
-
-   `gnus-uu-user-interactive-view-rules'
-     This is the variable used instead of `gnus-uu-user-view-rules'
-     when in interactive mode.
-
-   `gnus-uu-user-interactive-view-rules-end'
-     This variable is used instead of `gnus-uu-user-view-rules-end'
-     when in interactive mode.
-
-   `gnus-uu-user-archive-rules`
-     This variable can be used to say what comamnds should be used to
-     unpack archives.
-
-   
-   Other Variables
-
-   `gnus-uu-ignore-files-by-name'
-     Files with name matching this regular expression won't be viewed.
-
-   `gnus-uu-ignore-files-by-type'
-     Files with a MIME type matching this variable won't be viewed.
-     Note that gnus-uu tries to guess what type the file is based on
-     the name. gnus-uu is not a MIME package, so this is slightly
-     kludgy.
-
-   `gnus-uu-tmp-dir'
-     Where gnus-uu does its work.
-
-   `gnus-uu-do-not-unpack-archives'
-     Non-nil means that gnus-uu won't peek inside archives looking for
-     files to dispay.
-
-   `gnus-uu-view-and-save'
-     Non-nil means that the user will always be asked to save a file
-     after viewing it.
-
-   `gnus-uu-asynchronous' 
-     Non-nil means that files will be viewed asynchronously.  This can
-     be useful if you're viewing long .mod files, for instance, which
-     often takes several minutes. Note, however, that since gnus-uu
-     doesn't ask, and if you are viewing an archive with lots of
-     viewable files, you'll get them all up more or less at once,
-     which can be confusing, to say the least. To get gnus-uu to ask
-     you before viewing a file, set the `gnus-uu-ask-before-view' 
-     variable.
-
-   `gnus-uu-ask-before-view'
-     Non-nil means that gnus-uu will ask you before viewing each file
-
-   `gnus-uu-ignore-default-view-rules'
-     Non-nil means that gnus-uu will ignore the default viewing rules.
-
-   `gnus-uu-ignore-default-archive-rules'
-     Non-nil means that gnus-uu will ignore the default archive
-     unpacking commands.
-
-   `gnus-uu-kill-carriage-return'
-     Non-nil means that gnus-uu will strip all carriage returns from
-     articles.
-
-   `gnus-uu-unmark-articles-not-decoded'
-     Non-nil means that gnus-uu will mark articles that were
-     unsuccessfully decoded as unread.
-
-   `gnus-uu-output-window-height'
-     This variable says how tall the output buffer window is to be
-     when using interactive view mode.
-
-   `gnus-uu-correct-stripped-uucode'
-     Non-nil means that gnus-uu will *try* to fix uuencoded files that
-     have had traling spaces deleted.
-
-   `gnus-uu-use-interactive-view'
-     Non-nil means that gnus-uu will use interactive viewing mode.
-
-   `gnus-uu-view-with-metamail'
-     Non-nil means that gnus-uu will ignore the viewing commands
-     defined by the rule variables and just fudge a MIME content type
-     based on the file name. The result will be fed to metamail for
-     viewing.
-
-   `gnus-uu-save-in-digest'
-     Non-nil means that gnus-uu, when asked to save without decoding,
-     will save in digests.  If this variable is nil, gnus-uu will just
-     save everything in a file without any embellishments. The
-     digesting almost conforms to RFC1153 - no easy way to specify any
-     meaningful volume and issue numbers were found, so I simply
-     dropped them.
-
-   `gnus-uu-post-include-before-composing'
-     Non-nil means that gnus-uu will ask for a file to encode before
-     you compose the article.  If this variable is t, you can either
-     include an encoded file with \\<gnus-uu-post-reply-mode-map>\\[gnus-uu-post-insert-binary-in-article] or have one included for you when you 
-     post the article.
-
-   `gnus-uu-post-length'
-     Maximum length of an article.  The encoded file will be split
-     into how many articles it takes to post the entire file.
-
-   `gnus-uu-post-threaded'
-     Non-nil means that gnus-uu will post the encoded file in a
-     thread.  This may not be smart, as no other decoder I have seen
-     are able to follow threads when collecting uuencoded
-     articles. (Well, I have seen one package that does that -
-     gnus-uu, but somehow, I don't think that counts...) Default is
-     nil.
-
-   `gnus-uu-post-separate-description'
-     Non-nil means that the description will be posted in a separate
-     article.  The first article will typically be numbered (0/x). If
-     this variable is nil, the description the user enters will be
-     included at the beginning of the first article, which will be
-     numbered (1/x). Default is t.
-"
-  (interactive)
-  )
-d1371 1
-a1371 1
-	      (format "%s %s [0-9]+ [0-9]+[\n\r]"
-d1384 1
-a1384 1
-		  (forward-line -1)
-d1536 2
-a1537 1
-	    (gnus-request-article article gnus-newsgroup-name)
-@
-
-
-1.1.1.1
-log
-@
-@
-text
-@@

[-- Attachment #2: gnus-uu.el,v --]
[-- Type: application/octet-stream, Size: 316909 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-08-22 20:19 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <ilu1x502voq.fsf@latte.josefsson.org>
     [not found] ` <m37jeltb62.fsf@quimbies.gnus.org>
2005-08-22 20:19   ` 'cvs log' for Gnus CVS doesn't work Simon Josefsson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).