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 
easily?


--~--~---------~--~----~------------~-------~--~----~

-~----------~----~----~----~------~----~------~--~---



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.

g


#!/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 george.jahad.andr...@blackbirdsystems.net

(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))
        (begin
                                        ; 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 
x)))))

                                        ; Update the filename with the current 
directory
          (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)
          (newline)
          (loop (read-line))))))

--~--~---------~--~----~------------~-------~--~----~

-~----------~----~----~----~------~----~------~--~---


Sponsored Links


Other Threads

1. Variable size App Widget

Is there a way to allow the user to choose the size of the App Widget
when he places it on his Home screen?  I tried creating 2
<receiver> ... </receiver> sections in the manifest for 2 different
sizes, but only the first shows up.

Thanks

-- 

2. App Widget disappears on reboot

I have an App Widget which I place on my home screen.  It seems to
work fine, but when I reboot the phone, it is not only gone from the
home page, but is missing from the App Widget list, so I cannot add it
again.  Does anyone have any idea what might be going on here?

Thanks.

-- 

3. library byte code (in)compatibility if added as an external jar

4. [WTA] Rekomen Widget / Apps buat Desire Z

5. Video conference pakai gtab

6. tutup SIM card DHD ternyata pengaruh ke sinyal

7. What麓s the name of this UI Widget?