Home Php C# Sql C C++ Javascript Python Java Go Android Git Linux Asp.net Django .net Node.js Ios Xcode Cocoa Iphone Mysql Tomcat Mongodb Bash Objective-c Scala Visual-studio Apache Elasticsearch Jar Eclipse Jquery Ruby-on-rails Ruby Rubygems Android-studio Spring Lua Sqlite Emacs Ubuntu Perl Docker Swift Amazon-web-services Svn Html Ajax Xml Java-ee Maven Intellij-idea Rvm Macos Unix Css Ipad Postgresql Css3 Json Windows-server Vue.js Typescript Oracle Hibernate Internet-explorer Github Tensorflow Laravel Symfony Redis Html5 Google-app-engine Nginx Firefox Sqlalchemy Lucene Erlang Flask Vim Solr Webview Facebook Zend-framework Virtualenv Nosql Ide Twitter Safari Flutter Bundle Phonegap Centos Sphinx Actionscript Tornado Register | Login | Edit Tags | New Questions | 繁体 | 简体


10 questions online user: 20

1
votes
answers
28 views
+10

SVN how to resolve “local add, incoming add upon update” on a *folder*?

Here is my scenario:

Assume we have an SVN repo with the following content: myfolder myfolderfile.txt

Now I create two checkouts of this repo, co1 and co2.

In co1 we modify file.txt. In co2 we:

  • svn delete myfolder
  • svn commit
  • Create a new folder named myfolder
  • svn add myfolder
  • svn commit

Now if I attempt an update in co1 I get a tree conflict:

A  +  C myfolder >   local edit, incoming delete upon update
M  +    myfolderfile.txt

I want to keep myfolder and the modified file, so I resolve the tree conflict:

svn resolve --accept working folder

Now if I try to commit, I get "svn: Directory '/myfolder' is out of date". If I try to resolve this using svn up myfolder, I get a tree conflict again:

A  +  C folder >   local add, incoming add upon update
M  +    myfolderfile.txt

Okay, so we try svn resolve --accept working folder again. But we still can't commit, we get the same message that "svn: Directory '/myfolder' is out of date", if we do svn up myfolder, we get right back to the last tree conflict.

What is the correct procedure to resolve this type of conflict (when we wish to keep myfolder and its changes)?

EDIT: Windows cmd line script to illustrate:

rmdir /S /Q C:svntest 
mkdir C:svntest

cd C:svntest

svnadmin create repo

svn co file:///c:/svntest/repo co1
svn co file:///c:/svntest/repo co2

cd co1
mkdir folder
echo content > folderfile.txt
svn add folder
svn commit folder -m ""

cd C:svntestco2
svn up

cd C:svntestco1
svn del folder
svn commit -m ""
mkdir folder
svn add folder
svn commit -m ""

cd C:svntestco2
echo changed_content > folderfile.txt
svn up
svn resolve --accept working folder
svn commit -m ""

svn up folder
svn resolve --accept working folder
svn commit -m ""

And here is the output of running that script (note the commit failures at the end):

C:>rmdir /S /Q C:svntest  

C:>mkdir C:svntest 

C:>cd C:svntest 

C:svntest>svnadmin create repo 

C:svntest>svn co file:///c:/svntest/repo co1 
Checked out revision 0.

C:svntest>svn co file:///c:/svntest/repo co2 
Checked out revision 0.

C:svntest>cd co1 

C:svntestco1>mkdir folder 

C:svntestco1>echo content  1>folderfile.txt 

C:svntestco1>svn add folder 
A         folder
A         folderfile.txt

C:svntestco1>svn commit folder -m "" 
Adding         folder
Adding         folderfile.txt
Transmitting file data .
Committed revision 1.

C:svntestco1>cd C:svntestco2 

C:svntestco2>svn up 
A    folder
A    folderfile.txt
Updated to revision 1.

C:svntestco2>cd C:svntestco1 

C:svntestco1>svn del folder 
D         folderfile.txt
D         folder

C:svntestco1>svn commit -m "" 
Deleting       folder

Committed revision 2.

C:svntestco1>mkdir folder 

C:svntestco1>svn add folder 
A         folder

C:svntestco1>svn commit -m "" 
Adding         folder

Committed revision 3.

C:svntestco1>cd C:svntestco2 

C:svntestco2>echo changed_content  1>folderfile.txt 

C:svntestco2>svn up 
C folder
At revision 3.
Summary of conflicts:
  Tree conflicts: 1

C:svntestco2>svn resolve --accept working folder 
Resolved conflicted state of 'folder'

C:svntestco2>svn commit -m "" 
Adding         folder
svn: Commit failed (details follow):
svn: Directory '/folder' is out of date

C:svntestco2>svn up folder 
   C folder
At revision 3.
Summary of conflicts:
  Tree conflicts: 1

C:svntestco2>svn resolve --accept working folder 
Resolved conflicted state of 'folder'

C:svntestco2>svn commit -m "" 
Adding         folder
svn: Commit failed (details follow):
svn: Directory '/folder' is out of date
沙发
+10

我無法重現你提到的內容。這是我嘗試過的。

test@test:/tmp$ cd /tmp/ 
test@test:/tmp$ svn co http://localhost:8080/svn/stackoverflow so --username=admin
A    so/trunk
A    so/branches
A    so/tags
Checked out revision 1.
test@test:/tmp$ cd so/trunk/ 
test@test:/tmp/so/trunk$ mkdir x 
test@test:/tmp/so/trunk$ ls /tmp > x/test.txt 
test@test:/tmp/so/trunk$ svn add x/ 
A         x
A         x/test.txt
test@test:/tmp/so/trunk$ svn ci -m "test"
Adding         trunk/x
Adding         trunk/x/test.txt
Transmitting file data .
Committed revision 2.
test@test:/tmp/so/trunk$ cd /tmp/ 
test@test:/tmp$ svn co http://localhost:8080/svn/stackoverflow so1 --username=admin 
A    so1/trunk
A    so1/trunk/x
A    so1/trunk/x/test.txt
A    so1/branches
A    so1/tags
Checked out revision 2.
test@test:/tmp$ cd /tmp/so1/trunk/ 
test@test:/tmp/so1/trunk$ svn remove x 
D         x/test.txt
D         x
test@test:/tmp/so1/trunk$ svn ci -m "" 
Deleting       trunk/x

Committed revision 3.
test@test:/tmp/so1/trunk$ mkdir x 
test@test:/tmp/so1/trunk$ cp ../../so/trunk/x/test.txt x 
test@test:/tmp/so1/trunk$ ll /tmp > x/test.txt 
test@test:/tmp/so1/trunk$ svn add x/ 
A         x
A         x/test.txt
test@test:/tmp/so1/trunk$ svn ci -m ""
Adding         trunk/x
Adding         trunk/x/test.txt
Transmitting file data .
Committed revision 4.
test@test:/tmp$ cd so/trunk/
test@test:/tmp/so/trunk$ svn up
D    x
A    x
A    x/test.txt
Updated to revision 4.
test@test:/tmp/so/trunk$ 

顯然我嘗試了你做過的同樣的方法,並沒有再遇到任何問題。您使用的是什麼版本的svn?

export REPOPATH=/tmp/svntest
test@test:/tmp/co2/trunk$ rm -rf $REPOPATH
test@test:/tmp/co2/trunk$ mkdir $REPOPATH
test@test:/tmp/co2/trunk$ svnadmin create $REPOPATH/repo
test@test:/tmp/co2/trunk$ svn co file:///$REPOPATH/repo co1
svn: Repository UUID '2d803eb8-2030-4dd3-bb6f-34ab07c74813' doesn't match expected UUID '82764ae8-6410-4565-933f-9a420cb60013'
test@test:/tmp/co2/trunk$ svn co file:///$REPOPATH/repo co2
svn: Repository UUID '2d803eb8-2030-4dd3-bb6f-34ab07c74813' doesn't match expected UUID '82764ae8-6410-4565-933f-9a420cb60013'
test@test:/tmp/co2/trunk$ 
test@test:/tmp/co2/trunk$ cd $REPOPATH/co1
bash: cd: /tmp/svntest/co1: No such file or directory
test@test:/tmp/co2/trunk$ mkdir folder
mkdir: cannot create directory `folder': File exists
test@test:/tmp/co2/trunk$ echo content > folder/file.txt
test@test:/tmp/co2/trunk$ svn add folder
svn: warning: 'folder' is already under version control
test@test:/tmp/co2/trunk$ svn commit folder -m ""
test@test:/tmp/co2/trunk$ 
test@test:/tmp/co2/trunk$ cd $REPOPATH/co2
bash: cd: /tmp/svntest/co2: No such file or directory
test@test:/tmp/co2/trunk$ svn up
At revision 10.
test@test:/tmp/co2/trunk$ 
test@test:/tmp/co2/trunk$ cd $REPOPATH/co1
bash: cd: /tmp/svntest/co1: No such file or directory
test@test:/tmp/co2/trunk$ svn del folder
svn: Use --force to override this restriction
svn: 'folder/file.txt' is not under version control
test@test:/tmp/co2/trunk$ svn commit -m ""
test@test:/tmp/co2/trunk$ mkdir folder
mkdir: cannot create directory `folder': File exists
test@test:/tmp/co2/trunk$ svn add folder
svn: warning: 'folder' is already under version control
test@test:/tmp/co2/trunk$ svn commit -m ""
test@test:/tmp/co2/trunk$ 
test@test:/tmp/co2/trunk$ cd $REPOPATH/co2
bash: cd: /tmp/svntest/co2: No such file or directory
test@test:/tmp/co2/trunk$ echo changed_content > folderfile.txt
test@test:/tmp/co2/trunk$ svn up
At revision 10.
test@test:/tmp/co2/trunk$ svn --version
svn, version 1.6.6 (r40053)
   compiled Dec 12 2009, 05:04:54

Copyright (C) 2000-2009 CollabNet.
Subversion is open source software, see http://subversion.tigris.org/
This product includes software developed by CollabNet (http://www.Collab.Net/).

The following repository access (RA) modules are available:

* ra_neon : Module for accessing a repository via WebDAV protocol using Neon.
  - handles 'http' scheme
  - handles 'https' scheme
* ra_svn : Module for accessing a repository using the svn network protocol.
  - with Cyrus SASL authentication
  - handles 'svn' scheme
* ra_local : Module for accessing a repository on local disk.
  - handles 'file' scheme
板凳
0

在這種特殊情況下,我認為您必須手動重新應用本地更改。也就是說,創建一個補丁文件(svn diff> mine.patch,或在其他地方復製文件),還原您的更改或使用他們的解析,然後應用補丁(或複製文件)。在應用更改之前,您可能需要在重新創建的文件夾中復製文件的基礎。

就像zellus所說,這是顛覆的黑暗面,這是當前實現無法處理的。然後,刪除文件夾並添加一個相同名稱的文件夾聽起來不太合適。你期望顛覆做什麼?如果文件沒有在文件夾中重新創建怎麼辦?如果它的內容不同怎麼辦?

通過不刪除要保留的文件夾來嘗試完全避免這種情況:)

25
votes
answers
10 views
+10

How to fix Subversion lock error

How do you fix the Subversion/Subclipse error "Attempted to lock an already-locked dir"?

Googling shows people routinely encounter this error, and the only solution I've seen posted is to run Subclipse's Team->Cleanup command. Unfortunately, I get this error when I run the Team->Cleanup command. Are there any other options?

+100

我通過這樣做解決了這個問題:

  1. 右鍵點擊你的項目。

  2. 點擊團隊

  3. 單擊“刷新/清除”

+40

老問題,但上述解決方案都不適合我。什麼工作是關閉eclipse,然後使用Tortoise,右鍵單擊Windows資源管理器中的項目,然後選擇'TortoiseSVN' - > '清理',然後只使用默認的複選項(清理工作副本狀態,包括外部),然後點擊確定。

這清理了文件夾,然後我能夠更新並提交文件為正常。

這對我們有用。很好的答案。當您在一小段時間內提交太多單個文件時,會發生這種情況。 - Mindsect Team於2017年2月28日21:55

+30

使用SVN 1.8,刪除鎖定文件沒有幫助(鎖定文件不存在)。

刷新/清理也沒有解決。

解決了什麼:

  1)備份你的目錄,只需要... 2)團隊......斷開連接。選擇刪除.svn文件3)再次添加到SVN。  

注意:在我的情況下,錯誤是由於初始提交期間網絡連接丟失造成的。

最近,從命令行執行“snv cleanup / path / to / my / project”救了我--Cedric Simon於2017年4月3日15:43

+30

與“幻影鎖”相同的問題後,唯一的解決方案是:

1)斷開項目Eclipse-> Team->斷開連接(選擇刪除.svn文件夾的選項)

2)比“重新連接”Eclipse-> Team-> SVN->共享項目。忽略關於更好地結賬的警告。在此之後一切正常。

清理和重啟不是解決方案,掃描鎖也沒有顯示任何內容。

這可以解決Eclipse中的問題。 - user2652379 18年7月18日4:03

上週我遇到了同樣的問題,找不到任何解決方案:( - matt b 09年2月2日15:43

我剛剛更新了我的回答以反映你的。 - VonC 09年2月3日14:20

刪除.markers文件幫助我解決了這個問題。謝謝 - ksr81 2011年2月5日23:00

我不需要WTP所以我刪除了.project文件中對WTP的所有引用。 - 保羅2011年2月5日23:02

+20

svn help unlock

找完所有的鎖櫃 - 大多數情況下不需要鎖

是的,驗證做了伎倆。 - n002213f 2010年5月4日7:40

也為我工作 - Shervin Asgari 2010年5月31日12:40

+20

我遇到了同樣的問題。我通過右擊項目---> Team ---->解決了這個問題。刷新/清理

+1。為那些IBM用戶添加其他搜索項。這個解決方案適用於IBM Rational Application Developer(RAD)7.5.5(7.5.5.1),當然,它基於eclipse 3.4.x. - Scott Heaberlin 2011年6月8日15:16

+1它也適合我:) - Reuben 2011年8月11日在5:14

真棒。工作就像一個魅力。謝謝...... :) - Gokul Nath KP 2014年5月14日9:00

+10

我們有同樣的重複問題。這是一場災難。如果由於沒有現有鎖定而清理和解鎖沒有幫助,你能做什麼?

  1. 搜索目錄結構中隱藏的 .svn 文件夾。它包含一個 wc.db 文件,它是一個sql lite文件。
  2. 使用sql客戶端打開它,例如DBeaver。通過選擇 wc.db 文件將dqlaver連接添加到dbeaver。
  3. 打開WC_LOCK表。您可以看到包含幻像鎖定錯誤窗口中提到的URL的一行或多行。
  4. 從表中刪除這些行。
  5. 嘗試從repo更新項目。
  6. 如果在1個項目(外部)中使用多個repo,則在更新期間可能會出現另一個幻像鎖定。在這種情況下,使用該文件夾重複該過程。

請考慮編輯您的問題以添加一些縮進,使您的步驟進入正確的列表。 - JJJ 3月11日0:59

+1這解決了我的特殊問題,非常感謝你。 - fretje 2010年1月4日17:56

8楼
0
+50

我嘗試遞歸刪除所有 lock 文件,但這只是導致錯誤“Path is not a working copy”。我最終不得不做Team-> Disconnect,然後Team-> Share。在重新連接時,它抱怨它刪除了現有的 .svn 文件。現在它似乎正在發揮作用。

嘿,如果你改變你的答案“刪除.settings / org.eclipse.wst.common.component”,我會選擇你的答案作為解決方案。你很親密 - larf311 09年2月3日14:10

0

我花了幾個小時尋找解決方案來解決我在IBM RAD收到的“試圖鎖定已經鎖定的目錄”的錯誤。最後,我猜想在RAD控制台中鍵入:

unlock< directory path>

和... volia我最終可以同步我的文件! !

現在你應該:) - larf311 09年6月30日17:40

感謝聲譽! - 邁克爾·蘭姆09年8月11日18:14

0

我們沒有外部SVN服務器。我在使用Windows 7 Enterprise的PC上工作,我使用Eclipse subversion插件作為SVN客戶端。在我的情況下出現的問題是由於網絡問題迫使我重新啟動PC而導致文件花費很長時間。

重啟後我開始收到此錯誤:XXX文件已經鎖定。< / p>

解決方案是安裝(TortoiseSVN),右鍵單擊SVN項目文件夾 - &gt; TortoiseSVN - &gt; 清理。

我希望這篇文章對某人有所幫助。

0

轉到以下元數據目錄

您的工作區&gt; projectname&gt; .metadata

在這個metada目錄中,會有一個鎖定文件。刪除此鎖定文件。

重新啟動eclipse並重建項目。它對我有用!

這沒有幫助......我們有一個項目,每次從源代碼管理中檢出它。 - ThorbjørnRavnAndersen 09年10月27日13:48

0

Subversion支持名為“Cleanup”的命令; 它用於釋放項目上的鎖定

111
votes
answers
17 views
+10

Browsing an SVN Repository

I'm trying to browse an SVN repository without having to check it out:

  • Is it possible to do this locally (on Unix)?
  • Is this possible with ssh access?
up vote 23 down vote accepted favorite
沙发
+230
+50

使用svnlook

用於檢查Subversion存儲庫的不同方面的命令行實用程序。它不會對存儲庫進行任何更改 - 它只是用於“偷看”。svnlook通常由存儲庫掛鉤使用,但存儲庫管理員可能會發現它對診斷有用。

由於svnlook通過直接存儲庫訪問(因此只能在保存存儲庫的機器上使用),它引用具有路徑而不是URL的存儲庫。

如果未指定修訂或事務,則svnlook默認為存儲庫的最新(最新)修訂版本...

svnlook tree seems to do the trick, with the -N argument for when you only want to see one level – Casebash Oct 8 '09 at 2:28

+730

svn ls工作。例如

svn ls http://my.svnserver.com/trunk/foo

在命令行上嘗試:

svn ls http://svn.apache.org/repos/asf/spamassassin/trunk

If you want to see file dates and sizes use the -v option e.g.: svn ls -v http://my.svnserver.com/trunk/foo – Pierz May 25 '16 at 17:15

Can you do svn ls on a repository? I tried and it didn't work – Casebash Oct 9 '09 at 10:06

Yes. Subversion can connect over several protocols file:// http:// https:// svn://. But you may have a version that does not have support for all protocols compiled in, or a required library cannot be found. For example, libneon is required for http/https and it requires openssl for https. So If you're missing those you'll have a problem with those protocols. Did you try the exact command I posted above against the Apache repository? If that failed (it works for me) you should probably tell us the error message you're getting. – z5h Oct 9 '09 at 14:47

I agree - svn ls works fine for me - there is no need to check out the workspace to do that. I am not sure though if any other functionality is required when you say "browse" a repository. – Critical Skill Oct 8 '09 at 3:31

I guess it depends on the meaning of "browse". If you simply want to look at the directories and file names, svn ls will suffice. Try the command I posted above. – z5h Oct 8 '09 at 3:11

+80

根據您所使用的平台,您還可以使用:

我發現一個非常適合用電的終端,但是當你想看到某些東西或者通過目錄挖掘時,可視版本會更有價值。

Useful. I will consider checking those out if I need to do more browsing in the future – Casebash Oct 8 '09 at 2:30

+70

根據您擁有的訪問類型,其中一個選項可能不錯:

svn look(如上所述)和svn info(也在svn書中:google for it)是兩個很好的命令行選項。如果您已登錄,它們可以在本地計算機上運行,但它們也可以通過網絡遠程工作。

如果svn存儲庫與公共Web服務器一起運行,您可以使用瀏覽器瀏覽它,例如your.svn.server.com/your/svn/path。

許多svn管理員還安裝了ViewVC(http://www.viewvc.org/)。您可以嘗試瀏覽your.svn.server.com/viewvc以查看是否有任何結果。

編輯讓評論者改變主意;)

91
votes
answers
17 views
+10

Revert a svn folder to a previous revision

To revert a particular folder in SVN to its previous state I currently use the following:

svn rm folder
svn commit -m 'removed folder to revert to previous version'
svn co http://pathto/repo/folder@268
cd folder
rm -rf .svn //recursively if many folders
svn add folder
svn commit -am 'reverted to the previous version'

Seems too much trouble for what should be a fairly common use case. I must be doing it wrong. How else can you do it?

up vote 89 down vote accepted favorite
沙发
+890
+50

為什麼不用svn merge

假設您要從當前的HEAD(上次提交的)版本恢復到修訂版268:

cd folder
svn up
svn merge -r HEAD:268 .

然後手動解決所有衝突(如果沒有本地更改則應該沒有任何內容)和:

svn commit -m "- reverted to revision 268"

要恢復單個更改(例如,在修訂版666中進行):

cd folder
svn merge -c -666 .

要還原本地更改(尚未提交):

cd folder
svn revert -R .

謝謝你,Jacek完全拯救了我的火腿。 - Josef Salyer 2013年5月1日18:06

我認為上面的svn提交行中有一個缺失的-m。即它應該是svn commit -m“ - 恢復到修訂版268”。我無法編輯,因為它不到我限制的6個字符! - Jonny 6月24日在7:32

+10

您可以使用svn merge此任務,請參閱http://svnbook.red-bean.com/en/1.1/ch04s04.html#svn-ch-4-sect-4.2以獲取示例

+10

為什麼不使用'svn merge'?這就是為什麼:“然後手動解決任何衝突[..]”

如果我知道修訂版268中的“文件夾”包含我想要繼續使用的一致數據,為什麼會自動創建一個包含可能不一致的數據的合併,以便稍後手動刪除這些更改。它容易出錯並且違背了我的配置管理工具的目的。

即我更喜歡原始要求中的配方並略有改進。如果使用'svn export'來獲取舊版本,則不必刪除.svn文件:

svn rm folder
svn commit -m 'removed folder to revert to previous version' .
svn export -r 268 http://pathto/repo/folder
svn add folder
svn commit -m 'reverted to the previous version' folder

您將還原一個文件夾...不再需要此文件夾中的任何未提交的更改,因此在使用合併之前,您可以使用還原。然後就不會有任何衝突...... - Tobias 2015年11月25日16:07

0

你也可以用

svn revert folder/*

這將恢復所有文件 folder

來自'svn help revert':...這個子命令不會還原已經提交的更改... - Rich von Lehe 12年12月13日在21:58

0
votes
answers
13 views
+10

List of files changed since a certain date using SVN

What kind of SVN command can I run that will get me a list of files changed since a certain date?

Right now I have it as

svn log <url> -r {2010-11-01}:{2011-05-04} > log.txt

That almost work, but it only shows the revisions and comments but not the files list.

110
votes
answers
12 views
+10

How do I delete a wrongly tagged directory in SVN?

I have a project Foo which I errantly created the wrong tag for. It should've read 'rMMDDYYYY' but I tagged it 'YYYYMMDD' instead. I realized my mistake after having commited my change. I now want to remove the YYYYMMDD folder under the tags directory and leave the rMMDDYYYY folder instead. i.e.

before: foo/ foo/trunk/ foo/branches/ foo/tags/ foo/tags/YYYYMMDD/ foo/tags/rMMDDYYYY

after: foo/ foo/trunk/ foo/branches/ foo/tags/ foo/tags/rMMDDYYYY

Any idea how I can do this please? Thanks in advance!

up vote 51 down vote accepted favorite
沙发
+510
+50

如果要刪除目錄,請使用以下svn rm命令:

svn rm foo/tags/YYYYMMDD
+400
svn delete http://example.com/svn/tags/tag-to-delete -m "Tag no longer needed"

是最好的方法。另見這裡

+140

只需刪除您不想要的標記,然後使用相同的名稱或不同的名稱重新創建。如果你有tortoisesvn就像從repo瀏覽器中刪除目錄一樣簡單。然後創建一個新標籤。

Thanks Shikar but TortoiseSVN isn't really an option for me as I'm on a Mac. I'll keep it in mind that if I when next I'm on a Windoze (sic!) machine ;) – freakwincy Jan 20 '10 at 9:03

+50

我假設您不能只刪除並重新添加目錄(可能是因為工作副本已更改),或者您可能已經這樣做了。所以你至少有兩個選擇:

  1. 查看已標記的修訂版本,將其從存儲庫中刪除,然後將其重新添加到所需位置。
  2. 使用svn mv命令:http//svnbook.red-bean.com/en/1.0/re18.html

請注意,在subversion中創建標記實際上並不復製文件; 它只是創建指向文件的目錄條目(參見“廉價副本”:http//svnbook.red-bean.com/en/1.0/ch04s02.html),因此您不必擔心膨脹您的存儲庫。

Subversion Book(http://svnbook.red-bean.com)是一個非常清晰和完整的參考書。如果你還沒有讀過它,你可能會發現它是豐富的信息。

祝好運!

Funny, I came across a very similar problem yesterday: needed to move https://path/to/dir -> https://path/to/my/dir and solved it with "svn mv" to a temp dir, svn mkdir https://path/to/my and finally a "svn mv" to the new structure. Don't know that I'd have been able to do that so quickly if I hadn't come across your question first ... so thank you! – Adam Liss Jan 20 '10 at 12:10

Thanks Adam. Didn't realize I could just do an svn mv. That would've be the ideal solution but for the fact that the directory I'd have have moved it to already exists. Still, its good to know. Guess I need to brush up a litttle more on the Subversion Book. – freakwincy Jan 20 '10 at 8:57

0
votes
answers
20 views
+10

How to undo a merge (without commit)?

I just did an svn merge to merge changes from the trunk to a branch:

$ svn merge -r328:HEAD file:///home/user/svn/repos/proj/trunk .
--- Merging r388 through r500 into '.':
A    foo
A    bar
   C baz1
   C baz2
U    duh
[...]

But there were too many conflicts, so I'd like to undo that.

One way to do that is to commit and then merge back. But I can't commit because of the conflicts. What's the best way to undo in that case?

0
votes
answers
15 views
+10

How do I back up a remote SVN repository

I am currently moving my SVN server from my home server to my remote server so I can access it more easily from other locations. My remote server is not backed up so I want to regularly back it up to my home server.

Remote server is Windows 2003 server. Home server is Windows Home Server.

What is the best way to do this? can I get my home server to get a dump of the remote server every night? Bandwidth isn't a huge consideration but if I could just copy any new checkins to an SVN server on my home server that would be fine.

Any suggestions welcome.

0
votes
answers
9 views
+10

How do you include/exclude a certain type of files under Subversion?

I'm getting confused with the include/exclude jargon, and my actual SVN client doesn't seem to have (or I've been unable to find it easily) a simple option to add or remove a certain type of files for version control.

Let's say for example I've added the entire Visual Studio folder, with its solutions, projects, debug files, etc., but I only want to version the actual source files. What would be the simplest way to do that?

0
votes
answers
36 views
+10

本地git存儲庫到bitbucket存儲庫

-1

我正在從svn回購到bitbucket回購遷移過程。本地git存儲庫到bitbucket存儲庫

在這一刻,我有所有svn回購當地git回購。我可以在本地git回購中顯示所有svn回購歷史記錄的提交和用戶日誌。

在下一步嘗試一些小時後到當地的git回購上傳到遠程到位桶回購與命令

git push -u origin master 

,沒有與用戶不匹配錯誤。

Please ensure that the commit contains the correct Committer EMail 

這是強制性的前 推動創建所有commiters用戶作爲到位桶回購的用戶,所有用戶都連接到JIRA。

這是一個巨大的svn回購有舊commiters,現在不在公司工作,他們不是jira用戶,我應該如何處理? 謝謝。

+0

我有一種感覺[this thread](https://stackoverflow.com/questions/28425670/git-error-expected-committer-email-but-found-karanxyz-com/28425852?noredirect=1#comment45194115_28425852)可能是相關的,儘管解決方案並非真正可用。你是否能夠查看bitbucket日誌並追查那裏的問題? –

+0

問題已解決,啓用了標記** **另一個提交檢查器** ** bitbucket repo的** settings/hooks **菜單。 – LennyBaxter

沙发
0
0

提交者用戶未與bitbucket用戶或jira鏈接。這是由電子郵件格式引起的主要不正確。

要檢查提交者的電子郵件,您可以使用git log -1(或git log如果有多個提交者),提交將與格式如下顯示:

Author: user <[email protected]> 
Date: Tue Sep 26 02:58:34 2017 +0000 

Commit message 

如果您遷移SVN通過git svn clone與git,如上所述,提交者的電子郵件地址通常不能正確導入。

您可以更改提交者電子郵件的所有提交如下:

git filter-branch --commit-filter ' 
     if [ "$GIT_AUTHOR_EMAIL" = "current email" ]; 
     then 
       GIT_AUTHOR_EMAIL="new email"; 
       git commit-tree "[email protected]"; 
     else 
       git commit-tree "[email protected]"; 
     fi' HEAD 

這將需要幾分鐘的時間在更換電子郵件地址,提交歷史。之後,你可以再次推。