Задать вопрос

Тел: +7 965 3737 888

468

Просмотров

1

Ответов

Update All Apps to Latest Revision

<p>This snippet is based on <a href="http://foothold.ru/knowledge/detail/update-all-apps-to-latest-revision.html" title="#844">#844</a> and <a href="http://foothold.ru/knowledge/detail/update-all-apps-to-latest-revision-2.html" title="#892">#892</a>  and updates all apps in the current directory using hg, svn, git or bzr. Including subdirectories not under version control (subfolders to keep your stuff organized).</p>
<p>For example:</p>
python/lib/
    django-trunk/
    django-0.96/
    pydelicious/
    (...)
    django-apps/
        django-tagging/
        django-pagination/
        django-registration/
        django-threadedcomments/
        django-mptt/
    (...)

<p>The script will iterate through all of your apps (in the current dir and also recursively in subdirs NOT under version control) and update them to the latest version.</p>
<p>To run, simply execute:</p>
python update_apps.py

<p>in the desired parent folder.</p>
<p>Just in case it could be useful: In my case I'm using MAC OS X. I have a folder full of miscellaneous scripts under my HOMEDIR, with this content:</p>
/Users/Dedaluz/bin/update_apps.py
/Users/Dedaluz/bin/update_apps  (this is a bash script)

<p>The update_apps script contains simply:</p>
#!/bin/bash
python /Users/Dedaluz/bin/update_apps.py

<p>Then I put this folder in my path, so in my /HOMEDIR/.bash_profile I add this line</p>
export PATH=$PATH:$HOME/bin

<p>And I just can update from any parent folder just going there and typing: update_apps</p>

Вопрос полезен? Да0/Нет0
file_3333.py(1.4Кб)
None

Ответы (1):

Ответdedaluz:30.07.2008
Ответ полезен? Да0/Нет0

I think it could be useful to make it accept parameters like:

update_apps ..
update apps ./some-dir/