Modul letöltése a drupal.org-ról gittel, és git submodule-ként kezelése

  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • The spam filter installed on this site is currently unavailable. Per site policy, we are unable to accept new submissions until that problem is resolved. Please try resubmitting the form in a couple of minutes.
Kategória: 
Leírás

Néhány napja harcolok csak a gittel, egy a tuti: igencsak kezdem megkedvelni. Mivel még drupalosok körében is elég képlékeny a workflow, amivel teljes drupal projecteket lehet kezelni, így én is több forrás alapján, nagyjából így csinálom:

A drupal a main repository. Nincsenek külön branchek modul, meg smink, inicializálás után egy szem devel ág, és abba megy a fejlesztés fő vonala. Ha egy részfeladat szépen leírható, (pl user_interface, ahol a wysiwyg-t, filtereket alakítom), akkor lesz egy külön branch neki. Ha az megvan, szépen visszamergelem a devel ágba, és haladok tovább. Ha van már mit mutatni, akkor a devel ág merge a masterbe, és megy ki valami public oldalra, ahol nézegethetik.

Nade pont most vagyok olyan munkában, ahol igencsak bántani kell a modulokat, patchek, próbálkozások etc.
A modulokat alapból letöltöm drush-sal, hozzáadom, majd commitolom az adott ágba.
Egészen addig, amíg a modulba bele nem kell nyúlni. Na ekkor jön képbe a git submodule rendszere.

Ilyenkor törlöm a modult, és submoduleként kezelem tovább. Na ez elég pepecselős mutatvány, sok gépeléssel, úgyhogy ennek kiváltására megalkottam subát! Ő egy git alias, amit a .gitconfig nevű fileba kell elhelyezni imígyen:

[geshifilter-code] [alias] suba = !sh -c 'echo -n \"Biztosan törölhető a $2 könyvtár? (i/n) \" && read answer && [ $answer = \"i\" ] || exit && echo \"\n $2 könyvtár törlése \n \" && rm -rf --preserve-root $2 && echo \"\nIndex törlése\n\" && git commit $2 -m \"Autocommit from suba: remove $2 dir from index\" && echo \"\nSubmodule hozzáadása\n\" && git submodule add -b $1 git://git.drupal.org/project/$0 $2 && echo \"\nSubmodule inicializálása\" && git submodule init && echo \"\nSubmodule commit\n\" && git add .gitmodules && git commit $2 .gitmodules -m \"Autocommit from suba: Add $0 drupal project as submodule tracking remote branch: $1.\"' [/geshifilter-code]

Használata a következő: git suba devel 6.x-2.x sites/all/modules/devel

Az első paraméter a modul neve, a második a drupal branch. Ez elvileg lehet tag is, vagyis ha 6.x.2.3-at írunk be, akkor akár a releaset is leszedhetjük vele, viszont releasebe meg nem turkálunk, úgyhogy jöjjön csak a branch egészében. A 3. paraméter meg a hely, ahová a modulunkat szeretnénk pakolni.
Ezt a drupal főkönyvtárában kell indítani, vagyis a repo főkönyvtárába, mert csak ott lehet submodulet hozzáadni. A 3. paraméterben ne legyen a végén / jel, mert attól az uccsó commit meghal.

Először szépen rákérdez, hogy tuti jót akarunk-e törölni. Ezután törli a könyvtárat, majd commitolja, enélkül ugyanis a git submodule add összeakad, hiszen a git indexében már szerepel a könyvtár. Ezután leszedi a drupal.org-ról a modult, beállítja a local branchet arra, amit a második paraméterként megadtunk, majd elcommitolja. A git add .gitmodules elvileg csak az első alkalommal kell, amikor submodule-t adunk hozzá, de ahogy észrevettem enni nem kér, szóval nincs gond, ha benne marad.

Na, és miután az első ilyen próbálkozásomról kiderült, hogy görcs nélkül tudtam volna törölni vele bármit kérdés nélkül, valamint mindössze 4 napja használom a gitet, léccci kapjátok le a fejemet, ha valami ordenáré hülyeséget írnék!

Hozzászólások

billiga fotbollströjor

You've gotten wonderful thing

You've gotten wonderful thing listed here.

I enjoy this website - its so

I enjoy this website - its so usefull and helpfull.

Maintain the excellent job

Maintain the excellent job and generating the group!

Many thanks really valuable.

Many thanks really valuable. Will certainly share site with my buddies.

Cool website you've got in

Cool website you've got in here.

billiga fotbollströjor

fc-kt. read68. yc775.

I like this site - its so

I like this site - its so usefull and helpfull.

Thanks regarding providing

Thanks regarding providing these types of well put together knowledge.

Wow cuz this is great job!

Wow cuz this is great job! Congrats and keep it up.

I love checking your web

I love checking your web site. Regards!

Incredible....this is a

Incredible....this is a invaluable webpage.

showhorsegallery.

sfcus. maplelost.

stayhere. inu. feenel.

gemlikemlak. inu.

snowgoer. zingplay.

We stumbled over here by a

We stumbled over here by a different web page and thought I might as well check things out.
I like what I see so i am just following you. Look forward
to looking at your web page again.

Also visit my website - tn board of pharmacy

Thanks a ton! It is

Thanks a ton! It is definitely an superb web site!

You're a really practical

You're a really practical internet site; couldn't make it without ya!

I enjoy looking through your

I enjoy looking through your site. Regards!

billiga fotbollströjor

fujiapuerbbs.

tellanews. ynmy.

Outstanding story there. What

Outstanding story there. What happened after? Good luck!

Visit my website - cvs pharmacy application

Hello Dear, are you in fact

Hello Dear, are you in fact visiting this site
daily, if so afterward you will absolutely get
nice knowledge.

my web page target pharmacy rewards

Many thanks very practical.

Many thanks very practical. Will share site with my pals.

Thanks really handy. Will

Thanks really handy. Will certainly share website with my good friends.

Exceptionally individual

Exceptionally individual pleasant website. Tremendous info offered on couple of clicks.

Great website you have here.

Great website you have here.

fotbollströjor billige

siracusacasevacanza.

svclassifieds.

I was recommended this web

I was recommended this web site by my cousin. I'm not sure whether
this post is written by him as nobody else know such detailed about my difficulty.
You're incredible! Thanks!

Take a look at my blog: what is prednisolone used for

I benefit from looking at

I benefit from looking at your websites. Kudos!

You've astonishing thing in

You've astonishing thing in this case.

Howdy, neat webpage you have

Howdy, neat webpage you have got here.

say thanks to a lot for your

say thanks to a lot for your site it helps a great deal.

Thanks, this site is

Thanks, this site is extremely practical.

You've wonderful knowlwdge in

You've wonderful knowlwdge in this case.

Heya are using Wordpress for

Heya are using Wordpress for your site platform? I'm new to the blog world but
I'm trying to get started and set up my own. Do you require any
coding expertise to make your own blog? Any help would be
really appreciated!

Also visit my webpage: canadian pharmacy

Surprisingly individual

Surprisingly individual friendly site. Immense details readily available on couple of gos to.

You have got incredible stuff

You have got incredible stuff these.

Thanks intended for providing

Thanks intended for providing this kind of superior subject material.

Fantastic web site you've

Fantastic web site you've here.

fotbollströjor barn

bf4sf. artdaejeon.

It is perfect time to make

It is perfect time to make some plans for the future and it's time to be
happy. I've read this post and if I could I wish to suggest you some interesting things or suggestions.
Perhaps you can write next articles referring to this article.

I wish to read more things about it!

Feel free to visit my web-site; canadian pharmacy

I love this website - its so

I love this website - its so usefull and helpfull.

Hozzászólás

A mező tartalma nem nyilvános.
  • Internal paths in double quotes, written as "internal:node/99", for example, are replaced with the appropriate absolute URL or relative path.
  • Engedélyezett HTML elemek: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <del> <img>
  • A webcímek és email címek automatikusan linkekké alakulnak.
  • A sorokat és bekezdéseket a rendszer automatikusan felismeri.
  • Engedélyezett HTML elemek: <a> <blockquote> <br> <cite> <code> <dd> <del> <div> <dl> <dt> <em> <li> <ol> <p> <span> <strong> <ul>
  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>, <bash>, <c>, <cpp>, <drupal5>, <drupal6>, <java>, <javascript>, <mysql>, <php>, <python>, <ruby>, <sql>. The supported tag styles are: <foo>, [foo].
  • Minden email cím át lesz alakítva ember által olvasható módon, vagy (ha a JavaScript engedélyezett) ki lesz cserélve kattintható, de biztonságos hivatkozásra.