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. Browser Certificate

Hi all,
I am trying to study certificates in browser.. more specifically root
certificates and installed or current certificates. The actual
requirement is to view the certificates for a current browser session.
I am unable to find out where exactly it is stored, how it is
retrieved for certificate verification while user enters an URL to
access a web page. I believe this happens during "handshaking".
Kindly help me with your knowledge and provide more insight on
"certificates related implementation".

Thanks in advance,

2. Debugg problem source not found

On Tue, May 11, 2010 at 8:33 AM, Mohammad Siddiqui

Um ... you don't have the source?

TreKing - Chicago transit tracking app for Android-powered devices


3. OOT : dream terdetek desire di fb

4. Multi instance of app launch from status bar notification.

5. Errors Building Android Source Code

6. GPS beacon icon does not go away after LocationManager.removeUpdates

7. Accelerometer not working when screen turns off