Foss lect 8 1 11.txt: Difference between revisions
No edit summary |
No edit summary |
||
| (7 intermediate revisions by 2 users not shown) | |||
| Line 14: | Line 14: | ||
power of distributed development. | power of distributed development. | ||
Linux kernel is maintained with git. | There are two types of Version Control Systems. | ||
Centralized Version Control System. e.g. CVS | |||
Distributed Version Control System. e.g. git, bazzar | |||
Linux kernel is maintained with git. Git is Distributed Version Control System. | |||
In distributed version control system, we can work remote place by just cloning the code from server. We do not depend on the server every time. That is any one in the world can contribute to your code, even if there is no Internet connection (except at time of cloning and submission). This is principal of FOSS development. Git is designed to be fast for merging codes from developer's. | |||
In centralized version control system, we need to have Internet connection every time, when you want contribute. This is main disadvantage of it. | |||
What do we want from git? | What do we want from git? | ||
| Line 34: | Line 42: | ||
In git you cannot recover an older version unless it is branched out. If the reversion is done | In git you cannot recover an older version unless it is branched out. If the reversion is done | ||
on the trunk, the new stuff is lost. No version numbers in git. | on the trunk, the new stuff is lost. No version numbers in git. | ||
For practicing the remote git repository go to [https://github.com/ git hub] you can create and play with the remote git repository. | |||
You have to create the account there. You can go through the help documents on that site also for any problem. | |||
Upstream/downstream concept: A developer who fixes a bug in a software obtained from the community | Upstream/downstream concept: A developer who fixes a bug in a software obtained from the community | ||
| Line 41: | Line 52: | ||
Bug-tracking system: on every project website. | Bug-tracking system: on every project website. | ||
Code Browsing tips by Abhijit Sir: | Code Browsing tips by Abhijit Sir: | ||
* READIT (Go through the README file). | |||
* Use tools like cscope and ctags. | |||
* Read and understand the data structure. | |||
* Find the mainline. | |||
* 30-50% is error checking code. Ignore it for initial study. | |||
* Many header files in large C code, often nested. | |||
* C is being used in object oriented programming, with functions pointers heavily used. | |||
* What you cant find with an automated tool, might be in a library. Try to avoid reading those internals. Go for library documentation. Or it may be in a different language. | |||
* Keep writing notes and draw diagrams of data structures. | |||
Code Browsing tools: | |||
*cscope | |||
*ctags | |||
*doxygen | |||
After installing cscope and ctags. Go to directory in which source code is. | |||
$ctags *.c *.h | |||
Then actual code browsing can be done using cscope. | |||
$scope | |||
Then we can enter for e.g. function which we want to find, in which file it is? after entering function name, press enter. | |||
Cscope will list the names of files in which it has found that function. We can go through that file by pressing enter on that file name. | |||
Hyphenation Session by Shravan: | Hyphenation Session by Shravan: | ||
| Line 59: | Line 83: | ||
---- | ---- | ||
'''Commands to be used for Git''' | |||
git commit -a: where a indicates all | |||
git log | |||
git init | |||
git add | |||
git diff | |||
git branch | |||
git checkout branch | |||
git whatchanged | |||
eg: git whatchanged since="may 2010" | |||
git status: Shows the log messages | |||
git clone | |||
~~Homework for the week~~ | ~~Homework for the week~~ | ||
| Line 72: | Line 125: | ||
Thursday 1730 Revolution OS Film Screening; Seminar Hall. | Thursday 1730 Revolution OS Film Screening; Seminar Hall. | ||
== References == | |||
* [http://live.gnome.org/DistributedSCM GNOME projects evaluation of distributed source code management systems for migration from svn] | |||
* [http://techbase.kde.org/Projects/MovetoGit KDE project's plan to move to git] | |||