svnsync sync file:///data/svn失敗。。。。。

[root@localhost ~]# /usr/bin/svnsync sync file:///data/SVN/yunwei
svnsync: Destination HEAD (46) is not the last merged revision (45); have you committed to the destination without using svnsync?
出現這樣的情況大概是因爲在進行鏡像同步後,你的庫對外提供了svn檢出服務,造成版本日誌發生變化

[root@localhost ~]# svn propset --revprop -r0 svn:sync-last-merged-rev 46 file:///data/SVN/yunwei/
property 'svn:sync-last-merged-rev' set on repository revision 0

[root@localhost ~]# /usr/bin/svnsync sync file:///data/SVN/yunwei
Transmitting file data .
Committed revision 47.
Copied properties for revision 47.
Transmitting file data .
Committed revision 48.
Copied properties for revision 48.
Transmitting file data .
Committed revision 49.
執行同步;

以下是svn propset的用法介紹

名稱

svn propset — 設置文件、目錄或者修訂版本的屬性PROPNAME爲PROPVAL。

概要

svn propset PROPNAME [PROPVAL | -F VALFILE] PATH...
svn propset PROPNAME --revprop -r REV [PROPVAL | -F VALFILE] [TARGET]

描述

Set PROPNAME to PROPVAL on files, directories, or revisions. The first example creates a versioned, local property change in the working copy, and the second creates an unversioned, remote property change on a repository revision (TARGET determines only which repository to access).

別名

pset, ps

改變

Working copy; repository only if operating on a URL

是否訪問版本庫

只有在對URl操作時會

選項

--file (-F) FILE
--quiet (-q)
--revision (-r) REV
--targets FILENAME
--depth ARG
--revprop
--username USER
--password PASS
--no-auth-cache
--non-interactive
--encoding ENC
--force
--config-dir DIR
--changelist ARG

例子

設置文件的mimetype:
$ svn propset svn:mime-type image/jpeg foo.jpg 
property 'svn:mime-type' set on 'foo.jpg'
On a Unix system, if you want a file to have the executable permission set:
$ svn propset svn:executable ON somescript
property 'svn:executable' set on 'somescript'
或許爲了合作者的利益你有一個內部的屬性設置:
$ svn propset owner sally foo.c
property 'owner' set on 'foo.c'
如果你在特定修訂版本的日誌信息裏有一些錯誤,並且希望修改,可以使用--revprop設置svn:log爲新的日誌信息:
$ svn propset --revprop -r 25 svn:log "Journaled about trip to New York."
property 'svn:log' set on repository revision '25'
Or, if you don't have a working copy, you can provide a URL:
$ svn propset --revprop -r 26 svn:log "Document nap." http://svn.red-bean.com/repos
property 'svn:log' set on repository revision '25'
最後,你可以告訴propset從一個文件得到輸入,你甚至可以使用這個方式來設置一個屬性爲二進制內容:
$ svn propset owner-pic -F sally.jpg moo.c 
property 'owner-pic' set on 'moo.c'



附帶兩個轉載的常見錯誤:
  • svnsync: DAV request failed; it’s possible that the repository’s pre-revprop-cha
    nge hook either failed or is non-existent
    svnsync: At least one property change failed; repository is unchanged
    svnsync: Error setting property ‘sync-lock:
    could not remove a property
    目標服務器未設置
    hook/pre-revprop-change或者目錄權限未更改爲www-data。
  • 中斷同步進程再次同步出現Failed to get lock on destination repos, currently held by ‘wonder:83edc72d-1b3c-4531-815a-b80bf58efe07′ 錯誤。
    : svn propdel svn:sync-lock –revprop -r 0 http://www.onoboss.com/svn/chs

  • 發表評論
    所有評論
    還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
    相關文章