?
Solved

git dependencies

Posted on 2013-01-08
7
Medium Priority
?
433 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Written by John Humphreys C++ Threading and the POSIX Library This article will cover the basic information that you need to know in order to make use of the POSIX threading library available for C and C++ on UNIX and most Linux systems.   [s…
  Included as part of the C++ Standard Template Library (STL) is a collection of generic containers. Each of these containers serves a different purpose and has different pros and cons. It is often difficult to decide which container to use and …
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
Suggested Courses
Course of the Month15 days, 6 hours left to enroll

743 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