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

[PROPOSAL] Issue 823 - svn checkout a single file

From: Madan U Sreenivasan <madan_at_collab.net>
Date: 2006-04-25 08:59:44 CEST

Hi,

    Pl. find attached my proposal for fixing Issue 823. I have also
attached this proposal to the issue
(http://subversion.tigris.org/nonav/issues/showattachment.cgi/559/823.proposal.txt).
Am writing here, as per Sussman's suggestion.

    Again, as I said in the issue : I understand the possibilities of
solving issue 823, without the wc format changes that are proposed in the
attached document. However, I wanted to highlight the idea, to get a
discussion going. We could optimize the changes as we discuss here.

    This is a relatively simple proposal, and I would like all of you to
participate. Thanks all in advance!

Regards,
Madan.

                         Proposal to achieve checkout
                             of a single-file.

What is this document about:
----------------------------

The changes required in the working copy's .svn/entries to achieve
checkout of single files
(http://subversion.tigris.org/issues/show_bug.cgi?id=823).

Scope:
------

Achieve the following:

 - Checkout single file from a repository (implicitly, allow further
   svn operations on that file)

 - Checkout such single files from multiple repositories into the same
   directory (implicitly, allow further svn operations on those files)

 - Design such a way that the problems related to non-recursive
   checkouts (http://subversion.tigris.org/issues/show_bug.cgi?id=695)
   would be easier to handle.

Analysis:
---------

The following are the types of directories, that are possible once we
allow the above requirements to happen.

1) Pure working copies: Directories are working copies of a repository
   folder.

2) Directory with one singularly checked out file: These are not
   considered pure working copies (because the parent folder is NOT
   version controlled). The directory contains a .svn folder and wc
   administrative files, but do not contain information about the
   parent directory of the checked-out file (that is, there is no
   `this_dir' entry in the .svn/entries file).

3) Directory with multiple singularly checked out files: These
   directories are not considered pure working copies (because this
   folder itself is NOT version controlled). The directory contains a
   .svn folder and wc administrative files, but does not contain
   information about the parent directory of the checked-out file
   (that is, there is no `this_dir' entry in the .svn/entries file).

   However, the .svn area should be able to understand the repository
   information pertaining to each singulary checked-out file. That is
   there could be multiple singularly-checked-out files in the
   directory, each belonging to different repositories.

   (2) is only a specialized case of (3).

4) A combination of pure working copy and one or more
   singularly-checked-out files: This is basically a pure working copy,
   corresponding to a particular repository (and the directory itself
   is version-controlled - that is has a 'this_dir' entry in the
   .svn/entries file). But this working copy could also have singularly
   checked-out files from other repositories.

NOTE : The possibility of having one or more singularly checked-out
files, means that non-recursive checkouts could be easier to handle in
future.

Proposed Changes to the .svn/entries file:
------------------------------------------

The following attributes should be made optionally available for entries
of `kind=file'

   - url : This enables the singularly checked-out file to be tracked
     against its repository of origin.

   - repos : This enables the singularly checked-out file to be
     tracked against its repository of origin.

In addition, we also require the following optional attribute for
entries of `kind=file'

   - type : This is optional, and currently only the following value
     can be held here...

     `singular' - which implies that the entry corresponds to a
                  singularly checked-out file, and that the entry
                  itself is complete (with url and repos attributes)
                  enough to be associated with a file in a repository.

     If `type=singular' is absent, it means that this entry is
     dependant on the `this-dir' entry for completeness.

How requirements are met:
-------------------------

This section illustrates how the 4 points presented in `Analysis'
section are achieved.

For convenience, lets call an entry with `kind=file' and
`type=singular', as a `singular_file' entry. This entry must have the
`url' and `repos' attributes too.

(1) Can be achieved by having a .svn/entries file with one `this_dir'
    entry, and no `singular-file' entry.

(2) Can be achieved by having a .svn/entries file with no `this_dir'
    entry, and exactly one `singular-file' entry.

(3) Can be achieved by having a .svn/entries file with no `this_dir'
    entry, and one or more `singular-file' entries.

(4) Can be achieved by having a .svn/entries file with one `this_dir'
    entry, and one or more `singular-file' entries. The `this_dir'
    entry corresponds to the first `svn co' ed directory. Subsequent
    checkouts of complete dirs into the same working copy directory,
    would be rejected with the message: `svn: 'wc' is already a
    working copy for a different URL'.

NOTE : libsvn_wc should be modified to look for the repos/url
attributes in `singular-file' entries, before looking for the
`this_dir' entries.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Apr 26 07:06:44 2006

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

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