Domanda

I would like to use SVN externals to share code files between different projects. I need to ask you a question concerning that feature, but let do it by explaining the situation.

  1. I created two projects (directories) on the SVN: 'A' and 'B'.
  2. 'A' contains files to be shared among other projects and one of them is named 'shared.txt'.
  3. The 'shared.txt' is linked to 'B' (using the svn:externals property of 'B').
  4. Apart from that, the 'B' contains other source code files (a full project).

Now the question. I checked out some older revision of 'B' to find out which revision of the 'shared.txt' I would get with it. And unfortunately, no matter which historic revision of 'B' i downloaded from my test repository, I always got the latest version of the 'shared.txt' with it.

Let's imagine that I want to download project 'B' from before several months. During these months the 'shared.txt' underwent many changes. But I want to download a complete project as it used to be several months ago, together with externals as they were at that specific time.

Is that possible without manual looking for an appropriate revision of each single external? I know I can associate specific versions of externals to my test project 'B', but this is no solution. I guess that if I do that, I will never have access to up-to-date externals, even when I check out the latest revision of 'B'. Am I right or wrong?

Thank you for your help (sorry if my question has already been asked, but I could not find any similar one).

È stato utile?

Soluzione

Yes, this form of question was asked some time ago here (smth. like "When svn up -r {DATE} in superrepo URL, use this date for externals update, if they are HEAD-linked"), it still haven't good answer

Discovered anwser was "You have to cd into all externals WC /directory-externals/ and svn up -r {DATE} for getting synced state". I haven't answer for file-repo

Alternative solution

More actions in process of development, less action with time-back

  • Always define externals with PEG-revision
  • Monitor commits (thus - changing top-revision) into external
  • After external-commit perform changing of external definition with additional commit (maybe it can be scripted in post-commit hook for repo-external)

FR for ASF "recursive processing of subrepos for {DATE} operations in master repo" will be useful

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top