Re: Is there some keyword providing the local path within the working copy?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: Is there some keyword providing the local path within the working copy?

Johan Corveleyn-3
On Thu, Jan 25, 2018 at 4:55 PM, Thorsten Schöning
<[hidden email]> wrote:

> Hi all,
>
> I'm distributing software directly using SVN and the working copy
> contians a configuration file which needs to contain some absolute
> path to a special dir in that working copy. The goal is to not need to
> commit that path of course, but automatically generate it during a
> checkout/update. I had a look at the new custom kewords in SVN 1.8[1]
> already, but didn't find any local working copy related path.
>
> So, is there such a local working copy path available and I only
> didn't find it yet?
>
> If not, any plans to provide such a path I didn't find yet? I was not
> even able to find discussion in that direction, but doubt I'm the
> first one with such question.
>
> Thanks!
>
> [1]: http://svnbook.red-bean.com/en/1.8/svn.advanced.props.special.keywords.html

Yes, you're the first one asking for this, AFAIK :-).

But I don't understand what you're trying to do. You want to include
the WC-root-relative path to *another dir* inside some config file,
while you're checking out or updating that config file? That's weird.
The keywords in SVN are only able to include information that's
directly related to the file in question, not information about
another file or dir.

But regardless, this sounds to me more like something you should solve
with a build script or somesuch ...

--
Johan
Reply | Threaded
Open this post in threaded view
|

Re: Is there some keyword providing the local path within the working copy?

Balogh Péter-2


On 2018-01-25 20:40, Johan Corveleyn wrote:

> On Thu, Jan 25, 2018 at 4:55 PM, Thorsten Schöning
> <[hidden email]> wrote:
>> Hi all,
>>
>> I'm distributing software directly using SVN and the working copy
>> contians a configuration file which needs to contain some absolute
>> path to a special dir in that working copy. The goal is to not need to
>> commit that path of course, but automatically generate it during a
>> checkout/update. I had a look at the new custom kewords in SVN 1.8[1]
>> already, but didn't find any local working copy related path.
>>
>> So, is there such a local working copy path available and I only
>> didn't find it yet?
>>
>> If not, any plans to provide such a path I didn't find yet? I was not
>> even able to find discussion in that direction, but doubt I'm the
>> first one with such question.
>>
>> Thanks!
>>
>> [1]: http://svnbook.red-bean.com/en/1.8/svn.advanced.props.special.keywords.html
> Yes, you're the first one asking for this, AFAIK :-).
>
> But I don't understand what you're trying to do. You want to include
> the WC-root-relative path to *another dir* inside some config file,
> while you're checking out or updating that config file? That's weird.
> The keywords in SVN are only able to include information that's
> directly related to the file in question, not information about
> another file or dir.
>
> But regardless, this sounds to me more like something you should solve
> with a build script or somesuch ...
>
Hi

I think this use case is similar to ours, the way we solved it, was
adding a config file one directory above the svn root folder, that's not
tracked
If subversion supported post checkout / update command execution in the
client side, or if a tracked file could be excluded from commit changes
on the client side, much better solutions could be implemented in our
case as well
One alternative that we've considered was generating the config file
when the application starts, and ignoring it by name, but we have not
implemented this

I hope this helps

Best regards,
Peter
Reply | Threaded
Open this post in threaded view
|

Re: Is there some keyword providing the local path within the working copy?

Branko Čibej
In reply to this post by Johan Corveleyn-3
On 26.01.2018 08:50, Thorsten Schöning wrote:

> Guten Tag Johan Corveleyn,
> am Donnerstag, 25. Januar 2018 um 20:40 schrieben Sie:
>
>> But I don't understand what you're trying to do. You want to include
>> the WC-root-relative path to *another dir* inside some config file,
>> while you're checking out or updating that config file? That's weird.
> One use case is simply providing e.g. systemd service files in a dir
> structure like the following, while working around some limitations of
> systemd[1]:
>
>> /[...]/someProject
>>    .svn
>>          [...]
>>    config
>>          appConfig.xml
>>          upstart.conf
>>          systemd.service
>>    startTheApp.sh
> The problem is that "systemd.service" needs the absolute path to
> "startTheApp.sh" in it's file and that path is unknown on commit time,
> because of very generic tags, but known during checkouts and updates.

You have to tell systemd about the location of its config file anyway.
Changing 'svn checkout' to 'svn checkout && install.sh' is surely the
sane way to do this. You have to 'svn update && restart service' too.


> The problem with a build script generating some unversioned file is
> that each user needs to do it for each working copy and each update
> chaning something on the file "systemd.service".

Each user has to check out the working copy, too. There's always some
step that needs to be done first.


-- Brane