how to apply output of repo diff

by Sean McNeil » Sat, 14 Feb 2009 19:03:03 GMT

Sponsored Links
 I want to provide a difference of my repo and apply it to a clean copy. 
How is this done? The repo command doesn't appear to support an apply 
command. Is this a planned feature, is there another means to do this 



how to apply output of repo diff

by George Jahad » Fri, 06 Mar 2009 16:56:37 GMT


Hey Sean:

Here's a guile script that acts as a filter for repo diff output.

Yeh, I know, I should have written it in python.


#!/usr/bin/guile \
--debug -e main -s

; Fix the repo diff output so that it can be used with patch like so:
;    repo diff | fixRepo.scm | patch -p1 -R
; comments/questions to

(define proj-marker "project ")
(define current-directory "")
(define file-marker "--- a/")

(use-modules (ice-9 rdelim))
(define (main args)
  (let loop ((x (read-line)))
    (if (not (eof-object? x))
                                        ; Get the current directory
          (if (>= (string-length x) (string-length proj-marker))
              (if (string=? proj-marker
                            (substring x 0 (string-length proj-marker)))
                  (set! current-directory
                        (substring x (string-length proj-marker) (string-length 

                                        ; Update the filename with the current 
          (if (>= (string-length x) (string-length file-marker))
              (if (string=? file-marker
                            (substring x 0 (string-length file-marker)))
                  (set! x (string-append file-marker current-directory
                                         (substring x (string-length 
file-marker) (string-length x))))))
          (display x)
          (loop (read-line))))))



Sponsored Links

Other Threads

1. httpclient -> http.client

what is the equivalence for a HttpMethod
(org.apache.commons.httpclient.HttpMethod) in android sdk?
Thanks for your help.


2. The cell line color of GridView

I'm trying to set the cell line color of GridView.
But I can't find the option from reference of GridView.
Is there any ideas to specify the cell line color of GridView?
Thank you.

3. Frame by frame animation issue

4. Download Webpage

5. Uploading an image in a multipart message - sample code

6. startActivity from subclass - strange problem

7. How do we get the hardware id?