|
|
Rank: Member
Groups: Member
Joined: 4/23/2010 Posts: 11 Points: 33 Location: Calgary
|
I've created the following selector rep "CommonLibs" mount "/lib" path "/" branch "/main" repository "JazzDomain" path "/" branch "/main" checkout "/main"
However, nothing is being pulled into the lib folder from CommonLibs? Is there something wrong with the selector?
|
|
|
Rank: Member
Groups: Member
Joined: 4/23/2010 Posts: 11 Points: 33 Location: Calgary
|
Figured out the problem, just needed to add the lib folder and check it in prior to setting the selector. Otherwise I recived an error when trying to add the lib folder.
|
|
|
Rank: New user
Groups: Member
Joined: 1/10/2008 Posts: 5 Points: 15 Location: Spain
|
Exactly!
In fact this is something we're working on. We'll be releasing a way to 'mount' repositories on 'private' directories, so removing the need to 'add them' inside the parent repo. But not yet there as you found out.
|
|
|
Rank: Member
Groups: Member
Joined: 4/23/2010 Posts: 11 Points: 33 Location: Calgary
|
OK, I have my libs repo worked. It has a number of top level branches with the libraries I use. I've labeled the various versions of libraries. Now I want to use them in my project. My selector is like so:
rep "CommonLibraries" mount "/lib" path "/" lb "CommonLogging2.0.0.0" path "/" lb "Log4Net1.2.10.0" repository "JazzDomain" path "/" smartbranch "/main/CollectionsRefactor"
It pulls my CommonLogging but doesn't pull the Log4Net. There's a bunch more I need to pull, but only the first is ever pulled.
Not sure what to do, right now I'm thinking about creating a new top level branch in my CommonLibrary Repo and merging in the versions of the libs I need for the various projects I'm working on...
Any suggestions?
|
|
|
 Rank: Codice Staff
Groups: Member
Joined: 7/2/2010 Posts: 7 Points: 21
|
Hi, Well, I numbered the line to be able to give a precise explanation. What you are trying to do is loading the revisions labeled in "Log4Net1.2.10.0" and the revisions included in the label "CommonLibraries" for the same items, which is impossible. You can only load a revision for every item. So, you have to decide which revisions do you want to load from a label and which ones to load from the other label. Refer to the user guide documentation.
(1)rep "CommonLibraries" mount "/lib" (2)path "/" (3)lb "CommonLogging2.0.0.0" (4)path "/" (5)lb "Log4Net1.2.10.0" (6) (7) (8)rep "JazzDomain" (9)path "/" (10)smartbranch "/main/CollectionsRefactor"
In Line(2) you are specifying a "/" which is the less restrictive Path. The way selectors work, is by defining the less restrictive path on the bottom of the list. As soon as the selector Top-Down execution start, it will look at Line(2), and saying OK, Line(3) a label that It can download all the revisions labeled with that one in Line(3), then "Here is the conflict", you are instructing the selector again to match from the path "/" in line(4) for the same item. the idea is that the rules of the selector is that the paths should be resolved from the bottom up to the root.
What we are trying to say is, a correct selector could look like this: rep "CommonLibraries" mount "/lib" path "/Subdirectory" lb "Log4Net1.2.10.0" path "/" lb "CommonLogging2.0.0.0"
rep "JazzDomain" path "/" smartbranch "/main/CollectionsRefactor"
BR, Miller
|
|
|
Rank: Member
Groups: Member
Joined: 4/23/2010 Posts: 11 Points: 33 Location: Calgary
|
Still can't get it to work, I've read the documentation, blogs, etc. I must be missing someting...
repository "CommonLibraries" mount "/lib" path "/Log4Net" lb "Log4Net" path "/" lb "CommonLogging"
repository "JazzDomain" path "/" smartbranch "/main/CollectionsRefactor"
Pulls only CommonLogging
repository "CommonLibraries" mount "/lib" path "/Log4Net" lb "Log4Net" path "/CommonLogging" lb "CommonLogging"
repository "JazzDomain" path "/" smartbranch "/main/CollectionsRefactor"
Pulls nothing and my lib folder dissapears
Tried various others with no luck.
|
|
|
 Rank: Codice Staff
Groups: Member
Joined: 7/2/2010 Posts: 7 Points: 21
|
Hi, OK, I assume that you have a folder called lib in repo. "JazzDomain",, because that is your mounting point as you indicated in : repository "CommonLibraries" mount "/lib"
Miller
|
|
|
Rank: Member
Groups: Member
Joined: 4/23/2010 Posts: 11 Points: 33 Location: Calgary
|
Yes, it's there.
Everything works when I want to pull from a single branch/label, but when I try to pull from more is when it starts to fall apart. CommonLibratires is a repo of all the libraries we use. It has multiple top level brances for the individual frameworks. We then label the versions of the frameworks.
On our developement projects, we want to pull the frameworks/versions we need for the project.
So in the selector example, Jazz is the project, it has a folder called lib. Now I need to pull the libraries we need; we used to do this in SVN with externals. So in my lib, I've created the various subfolders for the libraries: log4net, nhibernate, etc. using the selector I want to pull my "externals" using the labels of the verion of the libs I need. It just seems to choke when I pull from more than one label.
|
|
|
Rank: Member
Groups: Member
Joined: 4/23/2010 Posts: 11 Points: 33 Location: Calgary
|
Well, I've found out some issues with the dissapearing lib folder:
repository "CommonLibraries" mount "/lib" path "/Log4net" branch "/Log4Net" lb "Log4Net1.2.10.0"
repository "JazzDomain" path "/" smartbranch "/main/CollectionsRefactor"
and the lib folder dissappears
repository "CommonLibraries" mount "/lib/" path "/Log4net" branch "/Log4Net" lb "Log4Net1.2.10.0"
repository "JazzDomain" path "/" smartbranch "/main/CollectionsRefactor"
if I use:
repository "CommonLibraries" mount "/lib/Log4net" path "/" branch "/Log4Net" lb "Log4Net1.2.10.0"
repository "JazzDomain" path "/" smartbranch "/main/CollectionsRefactor"
Then the folders are there and the expected files are there.
And my folders are there, Nothing is in the \lib\Log4net folder... But this is only good if I have all the libs in one branch... not really what I want, as I would need to maintain a lib branch for each project in my CommonLibraries repo.
|
|
|
 Rank: Codice Staff
Groups: Member
Joined: 7/2/2010 Posts: 7 Points: 21
|
Hi again Darin, We didn’t forget about you. We've been reviewing your case in more detail. The last selector that you sent
repository "CommonLibraries" mount "/lib/Log4net" path "/" branch "/Log4Net" lb "Log4Net1.2.10.0"
repository "JazzDomain" path "/" smartbranch "/main/CollectionsRefactor"
is achieving the result that you want, but it's limited to one library since you can only specify one repository rule for a given repository (the same rep name can't appear more than once). The ideal way to achieve what you want is to have separate repositories for each library, so you can have a selector like:
repository "Log4Net" mount "/lib/Log4net" path "/" lb "Log4Net1.2.10.0"
repository "Antlr" mount "/lib/Antlr" path "/" lb "Antlr0.96"
repository "JazzDomain" path "/" smartbranch "/main/CollectionsRefactor"
Assuming that you created your top level branches for libraries with a base on changeset 0 (this is an important point), you can simply create a repository for each library and replicate the library branch to that rep. This way you don't need to re-import all your libraries and set the labels and so on. If this is feasible for you, you can automate it pretty quickly from the command line using the "cm mkrep" and "cm replicate" commands. I hope it helps.
Br, Miller
|
|
|
|
Guest
|
YAFPro Theme Created by Jaben Cargman (Tiny Gecko)Powered by YAF 1.9.3 RC2 |
YAF © 2003-2008, Yet Another Forum.NETThis page was generated in 0.146 seconds.