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. Waiting for Debugger on Release Version.

Hello,

The problem is that my app gets block on my Nexus One phone with a
dialog
Waiting for de{*filter*} to attach.  Force close. when I don't have the
usb cable connected to the phone and running the de{*filter*}.

I have the debug flag set to false in the androidmanifest.xml file.
But the app(os) still appears to be looking for
the de{*filter*}.

I also pulled DevTools from the 2.1 emulator and loaded it on the
phone but the Development settings tab
errors out on the phone and it causes a Force Close condition in the
devtools app.

Does any one have any advice on how to get the phone to stop looking
for the de{*filter*} for my app?

I can solve the problem by renaming the app and recompiling. But who
wants to change the app name
just to go to the release version.

Thanks for any help.

Is there a version of DevTools that will work on Android 2.1 on the
Nexus one phone.

--

2. EMMA code coverage

Hi,

I read various lists and blogs regarding setting up EMMA to obtain
code coverage. I am TA-ing a software engineering class and it would
great to have the students measure code coverage. Unfortunately, it
seems EMMA is still in early development and there are still a few
problems setting it up.

I have a few questions:

Is there any alternative to EMMA?

Getting EMMA to work requires recompiling the SDK. Is it still the
case in 1.6?

The problem is that most of the students in the course will use
Windows and compiling Android on Windows is not supported.
If there is an easier way to get an EMMA enabled image, I would be
grateful if someone can post an updated tutorial for 1.6.

Alternatively, would it be possible to also link an EMMA enabled SDK
to the Android download page for Linux, Mac OS X and Windows?

Thanks,

Cristi

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

3. how to load XML files dynamically

4. Basic Emma code coverage tutorial needed

5. ContentProvider's DB file access right problem when its android:multiprocess=true

6. removing item from ListView

7. OOT | vynil itu apa ya?