Jsou chvíle, kdy potřebuji mít jistotu, že se nikdo nezavazuje ani konkrétní větvi, ani mému kmeni. Příkladem jsou sestavení vydání a opětovné začlenění. SVN «uzamykání» všech souborů není realistické (velmi dlouho, co je projekt obrovský). Také nevěřím, že uzamčení zabrání někomu ve svěřování nových souborů. Jaký by byl rychlý způsob, jak zajistit, aby do složky nikdo nic nepotvrdil, dokud neudělám to, co dělám? dík

8,615 2 2 zlaté odznaky 28 28 stříbrných odznaků 29 29 bronzových odznaků
zeptal se 8. února 2010 v 20:05
8,032 15 15 zlaté odznaky 64 64 stříbrných odznaků 74 74 bronzových odznaků

Nemůžete vytvořit novou větev pro sestavení vydání. A děláte všechny své budovy atd. na této nové pobočce, na které nikdo jiný nepracuje?

Února 9, v 2010 0: 22

9 odpovědi 9

Pokud vytváříte sestavení vydání, první věc, kterou uděláte, je podívat se na konkrétní revizi.

Nezáleží na tom, jestli se někdo během této doby dopustí něčeho jiného – vaši stavbu to neovlivní.

odpověděl 8. 2010. 20 v 07:XNUMX
59.1k 8 8 zlaté odznaky 82 82 stříbrné odznaky 86 86 bronzové odznaky

Trochu ano. Moje číslo sestavení obsahuje verzi svn. Spuštění mého automatického sestavení vygeneruje spoustu souborů, které je třeba potvrdit. Posledním krokem mého buildu je tedy check-in. Zkoušel jsem jen přidat 1 k číslu revize, ale někdy se během sestavování setkám s problémy a v době, kdy jsem je opravil, někdo něco svěřil do této složky.

Února 8, v 2010 20: 27

Bylo by lepší změnit proces tak, aby nevyžadoval kontrolu generovaných souborů. Soubory, které generujete automaticky, nepatří do kontroly zdroje.

Února 8, v 2010 20: 35

Ano, souhlasím s tím. Je to systém, který jsem zdědil. Máme v plánu to změnit, ale zatím bych chtěl jen rychlý způsob, jak zamknout kufr.

Února 8, v 2010 20: 41

@oefe, nesouhlasím. Přidávání generovaných souborů do úložiště (jako jsou instalační programy MSI nebo EXE) má své výhody. Můžete zaručit, že za X let bude váš sestavení server schopen zkompilovat stejnou verzi vašeho zdrojového kódu, jako byl původně zkompilován (a vydán). je to daleko daleko snazší mít zdrojový kód a MSI/EXE generované zdrojovým kódem na stejném místě. Je zřejmé, že je to ve větvi nebo značce a ne v kufru.

Února 9, v 2010 0: 25

@Davy8 Teoreticky souhlasím. Software se však neustále upgraduje, nové verze kompilátorů, nová runtime (.NET, Java VM), nové knihovny třetích stran atd. Pokud neudržujete stejnou verzi pro všechny tyto, jak můžete zaručit, že budete mít stejné MSI? /EXE jako první vydané? (i když váš zdrojový kód je stále stejný)

Února 9, v 2010 0: 42

S tímto problémem jsme se potýkali při kompilaci našich projektů pro sestavení vydání, kde se vlastnost serveru sestavení (označení projektu CruiseControl.NET) používá jako součást verze sestavení a instalátoru.

Řešení je snadné tam, kde větvete (nebo tagujete) pracovní kopii, např. pro vydání sestavení.

  1. Pokladna čerstvé pracovní kopie kmene (nebo větve).
  2. Sestavte své vydání, aktualizuje soubory a zanechá vaši pracovní kopii v upraveném stavu.
  3. Pokud se vaše sestavení podaří, svn zkopírujte soubor pracovní kopie do vaší nové pobočky nebo značky.
ČTĚTE VÍCE
Proč to zapáchá, když mi běží klimatizace?

Pokud chcete odevzdat svou pracovní kopii bez větvení, pak, jak říkáte, to selže (nebo to bude přinejmenším nespolehlivé), pokud někdo upravil cestu k úložišti.

Způsob, jak to vyřešit, by bylo použít kontrolu autorizace svn, přidat uživatele sestavení serveru do svn a mít různé authz soubory pro úložiště.

  1. Nahraďte authz souborem poskytujícím přístup pro zápis pro uživatele sestavení serveru a přístup pro čtení pro všechny ostatní uživatele.
  2. Proveďte stavbu jako obvykle.
  3. Nahraďte authz souborem poskytujícím normální přístup pro všechny uživatele.

Všimněte si, že autorizace svn umožňuje ovládání na základě cesty, takže toto můžete omezit pouze na kmen (nebo kdekoli), abyste snížili dopad na uživatele.

Dalším způsobem použití podobného přístupu (stejný pracovní postup) by bylo nahrazení háčku před potvrzením a kontrola uživatele; odmítnutí odevzdání (s příslušnou chybovou zprávou), pokud odevzdání neprováděl uživatel vašeho sestavení serveru. Opět, v případě potřeby by to mohlo být založeno na cestě (s trochou práce s regulárním výrazem navíc).

odpověděl 9. 2010. 0 v 11:XNUMX
16.7k 12 12 zlaté odznaky 68 68 stříbrné odznaky 84 84 bronzové odznaky

Zajímavá otázka. Zní to, jako by váš vývojový pracovní postup mohl udělat nějaké změny, protože se setkáváte s tímto problémem. Zejména u tak velkého projektu byste měli zvážit pracovní postup, který je více kontrolovaný, takže změny ve vývoji nepřicházejí ve stejnou dobu a ve stejné větvi jako sestavení verze, která probíhá. Zmínili jste například reintegrační sloučení – jistě můžete koordinovat projekt tak, aby se reintegrační sloučení neprobíhalo současně s sestavením vydání. A vývojáři by se neměli přímo zavazovat k větvi, na které se provádí sestavení vydání.

  • Komunikujte efektivně s vývojáři.
    • Oznamte, co se chystáte udělat.
    • Vývojáři by měli alespoň vědět, že by se neměli zavázat k větvi, na které probíhá sestavení vydání.
    • Vývojáři by měli vědět, že integrace by se neměla provádět na větvi, na které probíhá sestavení vydání.

    odpověděl 8. 2010. 23 v 41:XNUMX
    Craig McQueen Craig McQueen
    42.3k 30 30 zlaté odznaky 132 132 stříbrné odznaky 181 181 bronzové odznaky

    Nejprve zkusíme provést tyto operace na konkrétních revizích, nikoli na hlavě.

    Pokud revize není možná, navrhoval bych, abyste označili revizi, kterou chcete sestavit nebo cokoli jiného, ​​a pracovali s ní. To samozřejmě nebude fungovat pro sloučení, protože to maří účel.

    Ale abych se dostal k jádru vaší otázky, nejrychlejší způsob, který mě napadá, je zabránit příchozím informacím zastavit samotný server. Nejsem však odborník na SVN, několik let jsem spravoval box.

    odpověděl 8. 2010. 20 v 17:XNUMX
    25.2k 35 35 zlaté odznaky 107 107 stříbrné odznaky 144 144 bronzové odznaky

    V závislosti na tom, jak velký přístup k serveru máte, odešlete oznámení, že se do určité doby nikdo nesmí zavázat.

    Pokud to nemůžete udělat, pak checkout/checkin pomocí file:// nebo file+ssh:// pro sestavení vydání a během této doby vypněte proces serveru SVN. (ať už je to apache nebo svnserver), poté jej restartujte, jakmile je sestavení dokončeno.

    Nezapomeňte to také přepracovat, aby nevyžadovalo zamykání repo co nejdříve. (Uvědomuji si, že je to jen dočasná věc, kterou jsi zdědil)

    odpověděl 9. 2010. 0 v 21:XNUMX
    62.6k 98 98 zlaté odznaky 306 306 stříbrné odznaky 500 500 bronzové odznaky

    Správný způsob je podle mého skromného názoru.

    1. Zamkněte kufr
    2. vytvořit značku
    3. uvolněte zámek na kufru
    4. exportovat značku
    5. vytvořit kód
    6. pokud je sestavení úspěšné, uzamkněte označenou verzi (jinak ji odstraňte)

    Takhle to dělám a mám skript pro tagovací část

    #!/bin/bash # # Copyleft # # # Use with caution # # # # This script expects 2 variables in the environment to be set : USERNAME & PASSWORD # These are needed to access our Subversion server. # # # This script tags the code of each project @ HEAD # Later version will be more sofisticated to allow tagging at a specified REVISION (it should already be the case but . ) # # This script must be saved un iso-8858-1 with UNIX LF # ############################################################################################################################################## # for debugging set -x set -v # The Current verion of the tagging script is BASEDIR=$(dirname $0) export BASE_SVN_URL=https://my-svn-server/svn/repository/ export ROOT_DIR=../.. export VERSION="v0000.01" export REVISION=HEAD export TAG_NAME=TC_05 for PRJ in MODULE_1 MODULE_2 MODULE_3 do svn lock --username $ --password $ --no-auth-cache --non-interactive --trust-server-cert --force $ 

    The build of my code is located in another script. Long scripts are cool but tend to raise issue when failing early in the process, leaving systems in an unknown state. The script provided has not yet been fully tested nor has been extensively used on our system to guarantee they are error free.

    BUT I would recommend to seldom use svn locking.

    At the very end before the release it is a mean to ensure no last minute mistake is not putting your release at jeopardy . but good communication should allow you to use almost the same code but specifying a commit number

    Join Date: Sep 2006
    Is your car trunk secure?

    We’re all told by the police and insurance companies to lock our belongings in our cars trunk.

    Which is fine in my case, since I must have my ignition key in the ignition, and the switch either turned to On or Acc.
    Plus my back seat doesn’t fold forward, so my car’s trunk is tough to get into.

    However I got a phone call from another board member (mntbearhug) last night.
    It looks like someone watched her doing the right thing and locking her school laptop computer into her trunk while she was going to a movie.

    So they broke through a window, popped the trunk with the interior switch. And stole her computer.

    It would appear that her cars interior trunk latch still pops the trunk without the key

    Good thing that she didn’t bring her camera, or we’d all suffer from it

    Anyways it got me thinking. We should probably be more careful.

    If you have one of those interior trunk switches that will allow anyone to open your trunk without a key you might want to either disable it or change it to something a little more secure.
    Or at least lock your glove box, if it’s inside

    Most sedans with a folding back seat can be locked in the closed position as well, so please use this feature.

    Plus if you can take the time to hide your valuables before you get to your destination.
    So no one can watch you storing them away.

    I’d really hate to see anyone else loose something valuable

    Join Date: Aug 2007
    Location: Emmett, Idaho
    not going to the city for awhile.

    Thanks Stu for posting this. and Thanks for lending your shoulder and taking my mind off the incident of last night.

    After talking last night about the switch I checked my moms car and it doesn’t have the feature that Stu mentions either. I did talk with an auto body shop though and there is a way of disconnecting the inside latch, thus only being able to use a key to open the trunk.

    The sad part about the whole thing is, my computer is only thing they took. Before going to movie I put my laptop (I came straight from work) in my trunk and walked into the theatre with my son to only come out to find my window busted and the my trunk open. Nothing else was taken. I had cd’s, my radio, my phone, and alot of camping stuff in my trunk.. they took nothing except my computer.. sigh.

    Anyway. this is a crazy world we live in these days and nothing seems to be safe anymore. I know I wont be going shopping or parking in a public area for awhile, nor will I be keeping anything in my car.

    Thanks again Stu for posting this and making people aware that this can happen.

    Join Date: Feb 2008
    Location: Toronto

    sorry to hear about your loss Kim
    i don’t think having the release inside the car is the problem, just gotta be careful that when you need to put expensive stuff in the trunk, do it before you leave and not after you arrive.

    Join Date: Sep 2006
    Original Poster

    QuoteOriginally posted by mtnbearhug Quote

    Thanks Stu for posting this. and Thanks for lending your shoulder and taking my mind off the incident of last night.

    Any time Kim, and I’m sorry that I didn’t recognize your voice right away.

    Site Supporter

    Join Date: Apr 2007
    Location: Idaho,USA

    Oh Kim that sucks:-(. Did you have it passworded?
    Friggin’ losers grrrrrrrrrrr.
    What goes around comes around, their life sucks already if that’s the crap they do, here’s hoping it gets worse.

    Sorry to hear about this Kim. I hope you had stuff backed up.
    Gary
    Veteran Member

    Join Date: Jan 2008
    Location: Munich, Alps, Germany

    Quote

    Is your car trunk secure?

    Well, I carry the body of my dead wife in my trunk and so far it worked for me: nothing got ever stolen since

    Join Date: Jan 2008
    Location: Munich, Alps, Germany

    ok, less sarcastic now.

    car trunks aren’t considered to be any safer than anything. The idea to lock one’s belongings into is to hide stuff from a thief’s eyes.

    So, parking and then putting stuff into the trunk is about the worst thing one can do (Sorry for you, mtnbearhug). I always have a harsh word with my girl friend if she is doing it (no wife and yes, she is still alive ).

    Now, there are countries where thiefs will assume that a closed trunk is only closed to hide stuff from their eyes (Italy and others). In those countries, you better leave your trunk (and car) open and hide your stuff elsewhere in some creative manner. I think, this is not required in Idaho, though

    @mtnbearhug: I feel really sad for you.
    Because the thief seems to have the habit to watch people attending events, there is a certain chance police will catch him sooner or later.

    Join Date: May 2007
    Location: Edmonton Alberta, Canada

    That sucks Kim. Sorry for the loss. Unfortunately locks are for honest people. Scum like this will always find a way. It’s a constant concern when carrying my camera gear and laptop which is always with me on the road. The gear inside is worth more than the van I drive!

    Join Date: Jan 2007
    Location: Newcastle Australia

    Very sorry to hear that, Kim. Nothing seems to be given respect these days.
    Set me to thinking about my car, it seems everything that Stu spells out as a fault , applies to my car.
    I need to do some serious rethinking.
    Once again, am very sorry about your mishap, Hope you at least enjoyed the movie.

    Join Date: Feb 2008
    Location: Sydney, Australia

    Sorry to hear about your misfortune, Kim.

    Does the school keep a list of the serial numbers? It might be worth checking to local pawn shop cause you can guarentee they’ve sold it fast. Less of course the police have already done that

    Site Supporter

    Join Date: Jan 2007
    Location: Toronto

    QuoteOriginally posted by little laker Quote

    We’re all told by the police and insurance companies to lock our belongings in our cars trunk.

    Which is fine in my case, since I must have my ignition key in the ignition, and the switch either turned to On or Acc.
    Plus my back seat doesn’t fold forward, so my car’s trunk is tough to get into.

    However I got a phone call from another board member (mntbearhug) last night.
    It looks like someone watched her doing the right thing and locking her school laptop computer into her trunk while she was going to a movie.

    So they broke through a window, popped the trunk with the interior switch. And stole her computer.

    It would appear that her cars interior trunk latch still pops the trunk without the key

    Good thing that she didn’t bring her camera, or we’d all suffer from it

    Anyways it got me thinking. We should probably be more careful.

    If you have one of those interior trunk switches that will allow anyone to open your trunk without a key you might want to either disable it or change it to something a little more secure.
    Or at least lock your glove box, if it’s inside

    Most sedans with a folding back seat can be locked in the closed position as well, so please use this feature.

    Plus if you can take the time to hide your valuables before you get to your destination.
    So no one can watch you storing them away.

    I’d really hate to see anyone else loose something valuable

    You are correct, most trunks are no more secure than the car interior. The reason most insurers say to lock things in the trunk is that they are out of sight, and unless someone sees you putting valuables in the trunk, there is no visible reason to break into the car.

    Having said that, if I were to be travelling where I was sure nothing was safe, I would do 2 things. First get a hard case (pellican or other) that can be locked, and second, get a good cable lock and put it through the case handle, and around part of the trunk structure (even the hinge arm would do)

    This way, the thief needs to spend too much time trying to steal the case.

    The same goes for hotels, lock it to the bed frame.

    You have to remember, most break-ins are because the thief a) knows what’s there, and b) once in, it’s a quick grab.

    BTW I used to have a big argument with my insurer, when I owned a convertable. to claim theft you had to prove forced entry, therefore lock the car and top up. To me, that cost the insurer a lot of money because it is really easy to open any convertible (with a knife) and the replacement tops cost a lot more than the stolen goods. My view was leavve nothing in the car and leave it TOP DOWN for all to see.