Solved

git dependencies

Posted on 2013-01-08
7
405 Views
Last Modified: 2013-01-22
In my attempts to make a revision number work with a library of dependencies in my code, I would rather keep a repository of dependencies that my projects link to- so that I get the following:

1- one place to put dependencies
2- all branches link to one current version of dependency.

But now I'd like to have some automatic way to know what dependency was used (like what version of boost was linked to, without copying all the dlls into each branch).

I hope I'm being clear enough.  Any ideas on how to do this automatically, correctly and easily?

Thanks!
Mike
0
Comment
Question by:thready
  • 4
  • 3
7 Comments
 
LVL 1

Author Comment

by:thready
ID: 38756332
i shouldn't say revision number- but node id checksum that git uses...
0
 
LVL 40

Expert Comment

by:evilrix
ID: 38756439
You might want to look at git sub-modules, which allows to you include one project into another. The sub-module is pinned to a specific revision until such time that you update it via the parent, even if the original project of the sub-module has had additional changes.

http://git-scm.com/book/en/Git-Tools-Submodules

I don't know of any other way that git can assist you with revision management.
0
 
LVL 1

Accepted Solution

by:
thready earned 0 total points
ID: 38787436
I found a solution- I realized that if I create a new separate repository, it could always just have a single branch and contain all my external dependencies.  Then, because of the strings in project settings belonging to my code, they "point" and change the git id sufficiently for me to know exactly which versions of external libs were used in all my projects...
0
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 40

Expert Comment

by:evilrix
ID: 38787531
Hey, thready. If that works for you then that's great, but did you check out sub-modules? I suspect you'll find that solves your problem in a more elegant (and possible safer) way.

Let me know if you'd like more info.
0
 
LVL 1

Author Comment

by:thready
ID: 38787549
I did read it quickly but thought it wasn't exactly what I was looking for.  Knowing you and your great input, I'd like to ask the moderators to hold off on accepting my own solution so I can look again at sub-modules.  Very busy though- I might need till Monday!  :)

Cheers evilrix!
0
 
LVL 40

Expert Comment

by:evilrix
ID: 38787627
Don't worry about holding off the closure, we can always change that later if need be. More important, I just wanted to make sure I'd been clear in my suggestion. It may very well be that it won't solve the problem you have but I just wanted to make sure you'd not over looked it :)

Thanks for getting back to me.
0
 
LVL 1

Author Closing Comment

by:thready
ID: 38804765
The reason is explained with my last comment.  Not sure why we need to say it twice when accepting our own answer...
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Article by: SunnyDark
This article's goal is to present you with an easy to use XML wrapper for C++ and also present some interesting techniques that you might use with MS C++. The reason I built this class is to ease the pain of using XML files with C++, since there is…
What is C++ STL?: STL stands for Standard Template Library and is a part of standard C++ libraries. It contains many useful data structures (containers) and algorithms, which can spare you a lot of the time. Today we will look at the STL Vector. …
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now