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. How to access and deal with a website using a standalone app?

Hi, I am new to android and new also for mobile in general.
I have question as a developer,Can I develop an app to login to a
particular website?
and retrieve the messages,the friend list and doing other stuff that
available on that website
with using a standalone app.. and how..!:)
thank you in advance


2. LGPL on Android


I have a question regarding the licensing. LGPL, as I understand it,
requires an Application to use "at run time a copy of the Library
already present on the user's computer system" and to provide
Installation instructions that enable the end user to choose a
modified version of the Library. But if I bundle a library (such as
libgdx) with my application, there is no way the user can upgrade this
library without recompiling my whole application. The only way to
comply with LGPL is to provide (as open source) an thin interface
layer that will work as a Service or as an Activity, which will answer
some custom Intent.

For a JNI shared lib, there is a potential to allow chosing an
alternative location of the .so file. But libgdx has, if I understand
correctly, important Java interfaces that cannot be easily wrapped in
terms of Service or Activity. Please correct me if my argument is

Alex Cohn


3. Error in the market: "Upload a valid APK."

4. Background processes

5. Adding iconified rows to existing ArrayAdapter

6. Hello,everybody,the good shoping place,the new year approaching, click in. Let's facelift bar! ===== HTTP:// ====

7. Anyone has processed an image with opencv library?