[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

RE: upgrading source code in local repository

From: Brecht Ameije <bam_at_abm.be>
Date: Fri, 29 Jul 2011 19:17:36 +0200

On Fri, Jul 29, 2011 at 15:53, Andy Levy <andy.levy_at_gmail.com> wrote:

>On Fri, Jul 29, 2011 at 04:19, Brecht Ameije <bam_at_abm.be> wrote:
>> Hi,
>>
>> I'm using svn about one year now, but this issue is something that
>> keeps bothering me.
>>
>> I'm working on a project with embedded devices running busybox.
>> As I'm making some changes to the busybox source code (tweaking some
>> hard coded parameters rather than changing actual code), I'm keeping
>> the busybox sources in my local svn repo.
>> I started off with busybox 1.16.1
>>
>> Now I want to upgrade to the latest busybox 1.18.5
>> What I want to do is get the 1.18.5 code with the tweaks that I made to
>> the 1.16.1 code.
>>
>> I can only think of the following way to do it:
>> 1] diff original 1.16.1 code (without my changes) and new 1.18.5 code
>> 2] patch my 1.16.1-tweaked working copy with the patch created above
>> 3] solve any conflicts by hand
>> 4] commit the new 1.18.5-tweaked code.
>>
>> The problem with this, is that the second step can delete/create files
>> outside of svn (without using the "svn add"/"svn rm" commands).
>> Because a difference between the 1.16.1 and 1.18.5 version includes a
>> lot of file name changes (Kbuild and Config.in became Kbuild.src and
>> Config.src, these files exist in almost every dir), this leads to a lot
>> of manual fixing...
>>
> Would there be another way to upgrade the code to the new version?
>
>You have what's referred to as a Vendor Branch, and it's discussed in
>the book. http://svnbook.red-bean.com/nightly/en/svn.advanced.vendorbr.html

Andy, thanks for your reply.

I read the referred page in the book, indeed: the script svn_load_dirs.pl is
exactly what I need. It implements the steps that I did by hand.

But when I try it, I doesn't work as flawless as I thought it would:
It dumps a list with all added/deleted files and gives each of them a
number.
Than you have to manually connect the correct numbers to say which ones
are actually renamed files. A very tedious job, as there are +100 different
files and the lists aren't even sorted alphabetically :(
So I copied the lists to a spreadsheat, to combine the numbers correctly
and then fed them to the script.
But after each number pair entered, the list is regenerated! So my
spreadsheet
becomes a bit more complex.
I'm not even giving up when it seems that there were 2 folder renames in the
list, which invalidated my spreadsheet again, so I took them out to do those
manually afterwards.

Here I am now:
- start the svn_load_dirs.pl script
- copy the generated list to my spreadsheet, run a macro to generate number
pairs
- feed the numbers to the script
- manually mark the renamed folders
- tell the script I'm finished connecting the renamed files
Now the script is preparing to commit or whatever it's doing, and exits with
the following error:

[...snipping a lot of 'svn stat'-like output...]
D archival/lzo1x_1.c
D archival/lzo1x_c.c
D archival/lzo1x_d.c
D scripts/individual
D shell/msh_unused.c
D TODO_config_nommu
D archival/liblzo.h
D libbb/error_msg.c
D libbb/mtab_file.c
D runit/runit_lib.c
D scripts/defconfig
D libbb/sha1.c
D shell/bbsh.c
Running /usr/bin/svn add -N --targets
/tmp/svn_load_dirs_W1GIx88wmF/targets.00001
/usr/bin/svn_load_dirs.pl: /usr/bin/svn add -N --targets
/tmp/svn_load_dirs_W1GIx88wmF/targets.00001 failed with this output:
svn: warning: 'TODO_unicode@' not found
svn: warning: 'include/ar.h@' not found
svn: warning: 'libbb/utmp.c@' not found
svn: warning: 'init/reboot.h@' not found
[...snipping a lot of not found files...]
svn: warning: 'archival/libarchive/lzo1x_c.c@' not found
svn: warning: 'archival/libarchive/lzo1x_d.c@' not found
svn: 'archival/libarchive/unxz' is not a working copy
svn: Can't open file 'archival/libarchive/unxz/.svn/entries': No such file
or directory
Press return to quit and clean up svn working directory:
Cleaning up /tmp/svn_load_dirs_W1GIx88wmF
        (in cleanup) cannot chdir to
/tmp/svn_load_dirs_W1GIx88wmF/my_import_wc from
/tmp/svn_load_dirs_W1GIx88wmF: No such file or directory, aborting. at
/usr/bin/svn_load_dirs.pl line 2056

The 'not found' files, are actually the files that are added in the new
vendor version.
The 'no such file or dir' is in one of the two renamed folders
('archival/libarchive') that I marked for renaming...
Seem like the script is looking for them in my working copy, but they don't
exist (yet).

Any ideas what could be the issue here?

Thanks.
Received on 2011-07-29 19:16:58 CEST

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.