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

Re: How to make projects with externals usable after the repository has been relocated?

From: Robert Ioiart <rioiart_at_gmail.com>
Date: 2007-01-16 10:35:36 CET

Hi I have a small issue with the script you sent. I don't have any
experience with python so I sent you the line with which I called the script
and what response I got.

I suppose that it has something to do with escaping characters. How should I
have called the script in the example bellow.

D:\repository porting>python cldmpReplace.py dump
file:///tmav351x.tmav.ww011.siemens.net/did94044/IIP_CDS/Projects/PC_Tools/grADI/SVN_REPOSITORYsvn://tma0008s

Traceback (most recent call last):
  File "cldmpReplace.py", line 317, in <module>
    main()
  File "cldmpReplace.py", line 110, in main
    linesOutput = processSection(linesQueue, lineNum, stringOld, stringNew)
  File "cldmpReplace.py", line 189, in processSection
    linesProps = processPropLines(linesProps, lineNum, stringOld, stringNew)
  File "cldmpReplace.py", line 226, in processPropLines
    linesProps[valueByteCountLineIndex] = "V " + "%s\n" % valueByteCountNew
UnboundLocalError: local variable 'valueByteCountLineIndex' referenced
before assignment

Thanks in advance.

Regards,
Robert.

On 1/12/07, Robert Ioiart <rioiart@gmail.com> wrote:
>
> Thanks Chris,
>
> I'll try out the script the first thing Monday morning at work and let you
> know if there are any issues with your script.
>
> Regards, Robert.
>
> On 1/12/07, Watson, Chris <cwatson@ptc.com> wrote:
> >
> > sed unfortunately doesn't deal with the long line lengths that an dump
> > file has + of course you need to deal with the dump file elements that
> > encode data length. We ended up putting a script together in python to do
> > this - see attached. It chugged through about 20 repositories for me
> > without any problems, but no support/warranty is supplied or offered.
> >
> > Basic Process:
> > Generate Dump File
> > Run replace script for each different replacement
> > Load Dump File into fresh repo
> >
> > Chris
> >
> > ------------------------------
> > *From:* Robert Ioiart [mailto:rioiart@gmail.com]
> > *Sent:* 12 January 2007 14:27
> > *To:* users@subversion.tigris.org
> > *Subject:* How to make projects with externals usable after the
> > repository has been relocated?
> >
> >
> > I made some external definition for a directory in my repository
> > pointing to another project(a release) in the
> > same repository. Then I dumped the repository and moved it to another
> > machine. The checkout on the new
> > repostitory failed because the external definition still pointed to the
> > URL in the old repository,
> > which did not exist any more.
> >
> > This means, that after moving a repository with external defintions,
> > projects with external definitions are unusable.
> >
> > Question:
> > Is there a way to define external definitions "relatively" (within the
> > same repository of course)?
> > OR
> > Is it possible to modify the external definitions in the svn-dump,
> > before loading it into a new location? I tried replacing the paths with sed
> > but I get the following error when loading the newly applied file:
> >
> > - the command I used to replace the path:
> > *sed
> > 's/file:\/\/\/\\tmav351x.tmav.ww011.siemens.net\/did94044\/IIP_CDS\/Projects\/PC_Tools\/grADI\/SVN_REPOSITORY\//svn:\/\/tma0008s\//g'
> > input > output*
> > where *input* is the repository dump
> >
> > -the error I get when running the command: *svnadmin load NEWPATH <
> > output*
> > ...
> > <<< Started new transaction, based on original revision 200
> > * editing path : test ... done.
> >
> > ------- Committed revision 200 >>>
> > <<< Started new transaction, based on original revision 201
> > * editing path : test ...svnadmin: Dumpstream data appears to be
> > malformed
> >
> > ==================
> > the thing is that I tried this approach with a small test repository
> > with two projects, one project having an external set to the other project ;
> > dumping the repository, replacing the path, loading it in a new repository.
> > This small repo works, but with the 500 MB dump file it does not.
> >
> > Could someone please help me with this, I find it really frustrating?
> >
> > Maybe someone has a pre or post commit hook to check the external path,
> > or something in this direction.
> >
> > Bottom line:
> > How to make projects with externals usable after the repository has been
> > relocated?
> >
> > Thanks and regards,
> > Robert.
> >
> >
> >
>
Received on Tue Jan 16 10:36:00 2007

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.