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

Re: Best practices question

From: Jacob Atzen <jacob_at_jacobatzen.dk>
Date: 2006-09-22 09:13:03 CEST

On Thu, Sep 21, 2006 at 01:37:54PM -0400, Jonathan Wallace wrote:
> No, I hadn't even though I've used them once in the past for incorporating
> 3rd party code into another project. I'm still new to subversion and I
> appreciate you making that point. After rereading the external section of
> the book, does svn 1.4 support external definitions for files now? I didn't
> see anything about it in the release notes or changes file. If so, that
> would seem to resolve my issue.

AFAIK externals works on directories not files.

> It might be easier to give better advice if you supply more details
> >about the directory layout of A and B.
>
>
> Here's an example:
>
> directory_one/
> main.mdb
> version.txt
> reports/
> config/
> main.ico
>
> directory_two/
> main.mdb
> version.txt
> reports/
> config/
> main.ico
>
> All files in directory_one and directory_two are exactly the same. Files
> within their subdirectories, reports/ and config/, are different.
>
> Physically, directory_one and directory_two are equivalent applications with
> just different config files and different report files. Logically, they are
> two separate applications.
>
> My eventual goal is to move the bifurcation from the config/ and report/
> directories and into the application to simplify deployment of the whole
> application and maintenance of the reports. The reports' formats are the
> same between directory_one/report and directory_two/report. The only
> difference is that reports in directory_one connect to one data source and
> reports in directory_two connect to another one.

A couple of suggestions:

- Move the shared data into a subdirectory and import that as external
  from both projects. This is most likely the easier solution if you can
  get it to work. This will allow you to deploy the applications
  separately. Your directory structure would like like:

  /projects
    /shared
      foo.mdb
      ...
    /app1
      /reports
      /config
      /shared (external)
    /app2
      /reports
      ...

- Move the application specific data into a single directory, so you get
  something like:

  /project
    foo.mdb
    /app1
      /config
      /reports
    /app2
      /config
      /reports

  And then make the application recognize which application to use based
  on some configuration (file, database, whatever). This will not easily
  allow you to deploy the applications separately, but will fix the
  issue of duplication of the shared data.

I hope this helps.

-- 
Cheers,
- Jacob Atzen
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Fri Sep 22 09:13:39 2006

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