How can I get source for certain yade version

Asked by Alexander Eulitz [Eugen] on 2013-09-17

Hi,
how can I get source files of a certain yade version?
There is [1] where I can get tagged versions, but what's with e.g.:
Yade 3+3463+44~precise1

Thanks for your help.

---

[1] https://github.com/yade/trunk/tags

Question information

Language:
English Edit question
Status:
Solved
For:
Yade Edit question
Assignee:
No assignee Edit question
Solved by:
Anton Gladky
Solved:
2013-09-18
Last query:
2013-09-18
Last reply:
2013-09-17
Best Anton Gladky (gladky-anton) said : #1

Using git you can create a new branch from any commit:

git checkout -b c—Értain_version f7214260

where "f7214260" - hash code of the commit.

Anton

2013/9/17 Alexander Eulitz [Eugen] <email address hidden>:
> New question #235867 on Yade:
> https://answers.launchpad.net/yade/+question/235867
>
> Hi,
> how can I get source files of a certain yade version?
> There is [1] where I can get tagged versions, but what's with e.g.:
> Yade 3+3463+44~precise1
>
> Thanks for your help.
>
> ---
>
> [1] https://github.com/yade/trunk/tags
>
> --
> You received this question notification because you are a member of
> yade-users, which is an answer contact for Yade.
>
> _______________________________________________
> Mailing list: https://launchpad.net/~yade-users
> Post to : <email address hidden>
> Unsubscribe : https://launchpad.net/~yade-users
> More help : https://help.launchpad.net/ListHelp

Ok, thank you a lot Anton.

I downloaded the trunk some time ago using the "git clone https://github.com/yade/trunk.git" command.
If I open a terminal and navigate to that folder,
typing "git checkout -b version_you_want_to_get f721426" in console switches to a new branch called "version_you_want_to_get".
I can see changes to the current local version in terminal now. But I don't think that any file is downloaded.

According to [1] git pull should "update" files now. But this doesn't work for me.

I tried all this things without using a github account.

The next question is:
How can I get the corresponding hash code of a commit. For example for yade version
Yade 3+3463+44~precise1
according to [2] I can list all the past commits. But there is no entry for the yade version:
git log --pretty=format:"%h - %an, %ar : %s"

----
[1]http://stackoverflow.com/questions/2294313/how-to-download-a-branch-with-git
 answer #10
[2]http://git-scm.com/book/ch2-3.html

Anton Gladky (gladky-anton) said : #3

2013/9/17 Alexander Eulitz [Eugen] <email address hidden>:
> Question #235867 on Yade changed:
> I downloaded the trunk some time ago using the "git clone https://github.com/yade/trunk.git" command.
> If I open a terminal and navigate to that folder,
> typing "git checkout -b version_you_want_to_get f721426" in console switches to a new branch called "version_you_want_to_get".
> I can see changes to the current local version in terminal now. But I don't think that any file is downloaded.

I do not clearly understand, what you mean. After "checkout" command
you will be in the state,
according to commit f721426.

> According to [1] git pull should "update" files now. But this doesn't
> work for me.
>
> I tried all this things without using a github account.

???

> The next question is:
> How can I get the corresponding hash code of a commit. For example for yade version
> Yade 3+3463+44~precise1
> according to [2] I can list all the past commits. But there is no entry for the yade version:
> git log --pretty=format:"%h - %an, %ar : %s"

3463 means a "bzr-version" of the trunk [1]. This number is used only
for yade-daily version.
You can find the commit-message on bzr-branch and then search for a
corresponding
git-hash-commit. Not straightforward, but your task is really specific.

[1] https://code.launchpad.net/~yade-pkg/yade/git-trunk

Anton

I followed [1] again. This time I used my login information of github.
After I completed all 6 steps of the setup, I did

git checkout -b YadeServerVersion01_bzr3463 4878508afa3a7ab96554228461d8139b2f444efe

A new branch called YadeServerVersion01_bzr3463 is created now.
But I'm not sure if the files are really in the state of March 2013 as they are suppposed to be.
I simply deleted the INSTALL file in the trunk folder and did
git checkout again
This gives:
D INSTALL
But why is this change not discarded as it is not part of the bzr3463?

Thank you again,
Alex

---
[1] https://www.yade-dem.org/wiki/Yade_on_github

Anton Gladky (gladky-anton) said : #5

2013/9/17 Alexander Eulitz [Eugen] <email address hidden>:
> A new branch called YadeServerVersion01_bzr3463 is created now.
> But I'm not sure if the files are really in the state of March 2013 as they are suppposed to be.

for example:

git log

> I simply deleted the INSTALL file in the trunk folder and did
> git checkout again
> This gives:
> D INSTALL

Right, because you deleted it.

> But why is this change not discarded as it is not part of the bzr3463?

Because you modified already the branch after "bzr3463" by removing the file.
It will not be discarded.

Anton

Ok. I think I got it.
(I added a hint on the wiki page about that in case somebody else got the same problem)

https://yade-dem.org/wiki/Yade_on_github#Using_branches_on_GitHub

Thanks Anton Gladky, that solved my question.