Solved

git dependencies

Posted on 2013-01-08
7
414 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
Active Directory Webinar

We all know we need to protect and secure our privileges, but where to start? Join Experts Exchange and ManageEngine on Tuesday, April 11, 2017 10:00 AM PDT to learn how to track and secure privileged users in Active Directory.

 
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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

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…
This article will show you some of the more useful Standard Template Library (STL) algorithms through the use of working examples.  You will learn about how these algorithms fit into the STL architecture, how they work with STL containers, and why t…
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…

830 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