[Users] path expansion in git/darcs/hg repositories

Roland Haas roland.haas at physics.gatech.edu
Mon Jun 7 12:51:32 CDT 2010


Hello all,

So my feature request is to have functionality similar to the URL 
expansion done for svn either in the REPO_PATH variable or in the git 
URL. The later might be more consistent with with svn but requires some 
extra logic in the form of way to mark where the actual repository URL 
ends and where the directory-within-repository part start.

We have a thorn SoundSpeed that computes the speed of sound and which 
lives in its own git repository:

Scotch/Soundspeed/.git

I would like to be able to do say

!TARGET   = $ARR
!TYPE     = git
!URL      = git://someurl/Scotch/SoundSpeed
!AUTH_URL = rhaas3 at someotherurl/Scotch/SoundSpeed
!REPO_PATH= ../$2
!CHECKOUT =
Scotch/SoundSpeed

and

!TARGET   = $ARR
!TYPE     = git
!URL      = git://someurl/PersonalCode
!AUTH_URL = rhaas3 at someotherurl/PersonalCode
!REPO_PATH= Cactus/Hydro/$1/experimental/$2
!CHECKOUT =
Scotch/SoundSpeed

Or if everything was to be encoded in the URL part the way it is done 
for subversion:

!URL      = git://someurl/PersonalCode/.git/Cactus/Hydro/$1/experimental/$2
!CHECKOUT =
Scotch/SoundSpeed

where '.git/' serves as a marker to separate the actual URL of the 
repository from the path in the repository.



Currently neither of this is possible. Patterning after the McLachlan 
entry, an entry in the thornlist might look like:

!TARGET   = $ARR
!TYPE     = git
!URL      = git://someurl/Scotch/SoundSpeed
!AUTH_URL = rhaas3 at someotherurl/Scotch/SoundSpeed
!REPO_PATH= .
!CHECKOUT =
Scotch/SoundSpeed

This does not work. I get

[rhaas3 at phys44230 tmp]$ ls -l Cactus1/arrangements/Scotch/
total 0
lrwxrwxrwx 1 rhaas3 phys-numrel 46 Jun  7 13:31 SoundSpeed -> 
../../git-repos/SoundSpeed/./Scotch/SoundSpeed

Fiddling around with !REPO_PATH by adding '..' does not help either 
(would work if the repository structure was Scotch/.git) because of the 
Scotch part of the !CHECKOUT line. Using the $2 syntax I would try

!REPO_PATH = ../$2

which does not work either

[rhaas3 at phys44230 tmp]$ ls -l Cactus2/arrangements/Scotch/
total 0
lrwxrwxrwx 1 rhaas3 phys-numrel 37 Jun  7 13:34 SoundSpeed -> 
../../git-repos/SoundSpeed/SoundSpeed

since GetComponents only checks for the presence of $2 and then 
overwrites the whole path by the second part of !CHECKOUT.

This is due to line (for rev 630) 905 in handle_git overwriting the 
whole of $repo_path with $2.

Yours,
Roland

-- 
My email is as private as my paper mail. I therefore support encrypting
and signing email messages. Get my PGP key from http://keys.gnupg.net.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: OpenPGP digital signature
Url : http://lists.einsteintoolkit.org/pipermail/users/attachments/20100607/0194755b/attachment.bin 


More information about the Users mailing list