PHP.mk документација

SVN функции

Почист и полокален преглед на PHP референцата, со задржана структура од PHP.net и подобра читливост за примери, секции и белешки.

ref.svn.php PHP.net прокси Преводот е вчитан
Оригинал на PHP.net
Патека ref.svn.php Локална патека за оваа страница.
Извор php.net/manual/en Оригиналниот HTML се реупотребува и локално се стилизира.
Режим Прокси + преведен приказ Кодовите, табелите и белешките остануваат читливи во истиот тек.
SVN функции

Референца за `ref.svn.php` со подобрена типографија и навигација.

ref.svn.php

SVN функции

Содржина

  • svn_add — Распоредува додавање на ставка во работна директорија
  • svn_auth_get_parameter — Презема автентикациски параметар
  • svn_auth_set_parameter — Поставува автентикациски параметар
  • svn_blame — Земи го SVN blame за датотека
  • svn_cat — Враќа содржина на датотека во репозиториум
  • svn_checkout — Проверува работна копија од репозиториумот
  • svn_cleanup — Рекурзивно чисти работна директорија, завршувајќи нецелосни операции и отстранувајќи заклучувања
  • svn_client_version — Враќа верзија на SVN клиентските библиотеки
  • svn_commit — Испраќа промени од локалната работна копија до репозиториумот
  • svn_delete — Брише ставки од работна копија или репозиториум
  • svn_diff — Рекурзивно споредува две патеки
  • svn_export — Експортирај ја содржината на SVN директориум
  • svn_fs_abort_txn — Прекинува трансакција
  • svn_fs_apply_text — Создава и враќа стрим што ќе се користи за замена
  • svn_fs_begin_txn2 — Создава нова трансакција
  • svn_fs_change_node_prop — Враќа true ако се е во ред, false инаку
  • svn_fs_check_path — Определува каков вид на ставка живее на патеката во даден репозиториум fsroot
  • svn_fs_contents_changed — Враќа вистина ако содржината е различна, лажно инаку
  • svn_fs_copy — Копира датотека или директориум
  • svn_fs_delete — Брише датотека или директориум
  • svn_fs_dir_entries — Ги наведува записите во директориумот под патеката; враќа хеш од имиња на директориуми до тип на датотека
  • svn_fs_file_contents — Враќа поток за пристап до содржината на датотека од дадена верзија на fs
  • svn_fs_file_length — Враќа должина на датотека од дадена верзија на fs
  • svn_fs_is_dir — Определува дали патеката укажува на директориум
  • svn_fs_is_file — Определува дали патеката укажува на датотека
  • svn_fs_make_dir — Создава нов празен директориум
  • svn_fs_make_file — Создава нова празна датотека
  • svn_fs_node_created_rev — Враќа ревизија во која е создадена патеката под fsroot
  • svn_fs_node_prop — Враќа вредност на својство за јазол
  • svn_fs_props_changed — Враќа вистина ако својствата се различни, лажно инаку
  • svn_fs_revision_prop — Презема вредност на именувано својство
  • svn_fs_revision_root — Добива рачка на специфична верзија на коренот на репозиториумот
  • svn_fs_txn_root — Создава и враќа корен на трансакција
  • svn_fs_youngest_rev — Враќа број на најмладата ревизија во датотечниот систем
  • svn_import — Увезува неверзионирана патека во репозиториум
  • svn_log — Враќа пораки од дневникот за запишување на URL на репозиториум
  • svn_ls — Враќа список на содржини на директориумот во URL на складиштето, опционално на број на ревизија
  • svn_mkdir — Создава директориум во работна копија или складиште
  • svn_repos_create — Создава ново складиште на subversion на патеката
  • svn_repos_fs — Добива рачка на датотечниот систем за складиште
  • svn_repos_fs_begin_txn_for_commit — Создава нова трансакција
  • svn_repos_fs_commit_txn — Врши трансакција и враќа нова ревизија
  • svn_repos_hotcopy — Прави hot-copy на складиштето на repospath; копирајте го на destpath
  • svn_repos_open — Отвора заеднички заклучување на складиште
  • svn_repos_recover — Извршува процедури за обновување на складиштето лоцирано на патеката
  • svn_revert — Враќа промени на работната копија
  • svn_status — Враќа статус на датотеки и директориуми на работната копија
  • svn_update — Ажурира работна копија

Белешки од корисници 6 белешки

bohwaz
пред 13 години
This extension also gives you access to an object API that is currently not documented anywhere. It uses the Svn, SvnWc, SvnWcSchedule and SvnNode classes. So you can't redeclare those names.

Here are some basics on how to use it:

<?php
$svn = new Svn;
$log = $svn->log('https://svn.example/trunk/', Svn::HEAD);
?>

Basically you can use all functions documented here by replacing the svn_ prefix with $svn-> object. Same for constants, most can be used directly from the objects.

If you're interested, make sure to check the extension source code to find out more.
ј.сатерфилд на gmail.com
пред 13 години
The PHP SVN library functions as of 1.02 that are not listed in this documentation and their signatures

array svn_info(string path [, bool recurse = true [, int revision = -1]])

resource svn_copy(string log, string src_path, string destination_path [, bool working_copy = true [, int revision = -1]])

mixed svn_move(string src_path, string dst_path [, bool force = false])

mixed svn_proplist(string path [, bool recurse = false, [int revision]])

mixed svn_propget(string path, string property_name [, bool recurse = false [, int revision]])

bool svn_lock(string comment, mixed targets [, bool steal_lock = false])

bool svn_unlock(mixed targets [, bool break_lock= false])

resource svn_switch(string path, string url [, bool working_copy = true])

You can also use the new Svn() object for these $svn->lock()

In general any function should work just like the svn command line version.  For instance svn_info can be used against a remote url or a local path and svn_copy can also be used for local or remote operations.
пјер.бомадиер на rhapso.fr
пред 18 години
[Editorial note: These constants are defined by the Subversion library itself and may change without notice (although things tend to be quite stable).]

For information, here are the numeric values I got for the constants :

Working copy status constants : 
    * svn_wc_status_none => 1
    * svn_wc_status_unversioned => 2
    * svn_wc_status_normal => 3
    * svn_wc_status_added => 4
    * svn_wc_status_missing => 5
    * svn_wc_status_deleted => 6
    * svn_wc_status_replaced => 7
    * svn_wc_status_modified => 8
    * svn_wc_status_merged => 9
    * svn_wc_status_conflicted => 10
    * svn_wc_status_ignored => 11
    * svn_wc_status_obstructed => 12
    * svn_wc_status_external => 13
    * svn_wc_status_incomplete => 14

Node type constants :
    * svn_node_none => 0
    * svn_node_file => 1
    * svn_node_dir => 2
    * svn_node_unknown => 3
крис.лоренс на ljg.com
пред 15 години
I also submitted this as a bug (since its about missing documentation).

This documentation does not mention the "svn_delete" command, but it was added in version 0.4.  You can check the release notes here:
http://pecl.php.net/package/svn/0.4

Also, you could look at the contents of the current source code (svn-0.5.1/svn.c).

But what you really need to know is that the svn_delete command works correctly with this prototype:
svn_delete(string path [, bool force = true])

It returns true on success and false on failure.
Питер ван Гинкел
пред 18 години
The Subversion functions work quite well for me, after some searching. I needed some time though to find out how they all worked together, but this is a basic example of svn_fs_is_file:

<?php

# Get a handle to the on-disk repository. Note that this
# is NOT a checked out project, but the actual svn repository!

$repos_handle = svn_repos_open('/var/lib/svn');
$fs_handle = svn_repos_fs($repos_handle);

# Now we need to open a revision because that's what the
# svn_fs_* methods need. You'll probably want the latest
# revision and we have a helper method for that.

$youngest_rev = svn_fs_youngest_rev($fs_handle);
$fs_rev_handle = svn_fs_revision_root($fs_handle, $youngest_rev);

# Now we can actually start doing stuff, for example the
# svn_fs_is_file call:

print_r(svn_fs_is_file($fs_rev_handle, '/a-file.txt'));

?>

There is one important thing to note about this all. You cannot let the handles expire while doing any calls to svn_fs_*. When implementing a helper class, I cached the first and third handle, but not the second one. PHP crashes hard when you do this. Keep references to all handles you get while you're calling the svn_fs_* methods.
tbrendstrup
пред 18 години
"[Editorial note: These constants are defined by the Subversion library itself and may change without notice (although things tend to be quite stable).]"

The subversion developers have a policy not to change stuff like this without changing the major version number, so these should be valid at least until subversion 2.0.0 is released. (more values might be added, but the existing ones won't change).
Навигација

Прелистувај сродни теми и функции.

На оваа страница

Автоматски outline од активната документација.

Насловите ќе се појават тука по вчитување.

Попрегледно читање

Примерите, changelog табелите и user notes се визуелно издвоени за да не се губат во долгата содржина.

Брз совет Користи го outline-от Скокни директно на главните секции од активната страница.
Извор Оригиналниот линк останува достапен Кога ти треба целосен upstream context, отвори го PHP.net во нов tab.