Could not save the tree

If you are having a problem using Fortress, post a message here.

Moderator: SourceGear

Post Reply
lb
Posts: 3
Joined: Mon Nov 19, 2007 5:25 am

Could not save the tree

Post by lb » Mon Nov 19, 2007 6:03 am

When I try, with an empty repository, to put some files into Fortress VCS, I get a "Could not save the tree" message, and the files do not make it into VCS.

(e.g. my files being in E:\fpr\one.dsn & E:\fpr\two.dsn, with no fpr folder currently in the version control)

I have no problems choosing the repository or setting the working folder (in this case E: ). Adding the files does not seem to cause any errors. Both the files (E:\fpr\one.dsn & E:\fpr\two.dsn) and the folder ($/FPR) are added into the "watched path" box.

I can highlight my two files and the folder which contains them and click on "commit selected operations..." and not see any obvious problems.
In the "commit box", the three items have a tick, I can browse to the bugs list and select the appropriate bug, giving me the appropriate comment, with the bug number. I can untick the "mark completed box".

However, when I click "OK", I see the process progressing up to 100%, but then I then get a SourceGear Fortress window appearing with the message "Could not save the tree".

I have tried with different designs in different folders, using the auto-commit, but always get the same message.

How do I resolve this problem?


I am using SourceGear Fortress v1.0.1 .

lbauer
Posts: 9736
Joined: Tue Dec 16, 2003 1:25 pm
Location: SourceGear

Post by lbauer » Mon Nov 19, 2007 8:29 am

Check your Fortress log for errors. The source control log for Fortress is called sgvault.log and is in %windir%/temp/sgvault on the Fortress Server machine. Are there any errors logged?
Linda Bauer
SourceGear
Technical Support Manager

lb
Posts: 3
Joined: Mon Nov 19, 2007 5:25 am

Could not save the tree (continued)

Post by lb » Mon Nov 19, 2007 9:45 am

I hope that the following information contained in the sgvault.log file is of assistance in diagnoising the fault:


----19/11/2007 15:15:57 LB--HB-LAPTOP(1.2.3.4)--SSL Enabled Login
----19/11/2007 15:17:58 LB--HB-LAPTOP(1.2.3.4)--SSL Enabled System.Data.SqlClient.SqlException: Violation of PRIMARY KEY constraint 'pk_tbltreerevisionfolders'. Cannot insert duplicate key in object 'dbo.tbltreerevisionfolders'.
The statement has been terminated.
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)
at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe)
at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
at VaultServiceSQL.VaultSqlSCC.SaveCurrentTreeFolders(VaultSqlConn conn, Int32 nRepID, Int64 nTxID, Int64 nLastTxID, Boolean bSaveAsDelta, String strXml) at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)
at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe)
at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
at VaultServiceSQL.VaultSqlSCC.SaveCurrentTreeFolders(VaultSqlConn conn, Int32 nRepID, Int64 nTxID, Int64 nLastTxID, Boolean bSaveAsDelta, String strXml)
----19/11/2007 15:17:58 LB--HB-LAPTOP(1.2.3.4)--SSL Enabled Could not save folder skeleton: Error in the application.
----19/11/2007 15:17:58 LB--HB-LAPTOP(1.2.3.4)--SSL Enabled (85376b48-f9ea-45a8-8b50-923165a5331a) EndTx (Revision - 0) returned: FailSaveSourceTree
----19/11/2007 15:17:58 LB--HB-LAPTOP(1.2.3.4)--SSL Enabled (85376b48-f9ea-45a8-8b50-923165a5331a) AddFolder: $/RES returned: FailSaveSourceTree
----19/11/2007 15:17:58 LB--HB-LAPTOP(1.2.3.4)--SSL Enabled (85376b48-f9ea-45a8-8b50-923165a5331a) AddFolder: $/RES/RSP returned: FailSaveSourceTree
----19/11/2007 15:17:58 LB--HB-LAPTOP(1.2.3.4)--SSL Enabled (85376b48-f9ea-45a8-8b50-923165a5331a) AddFolder: $/RES/RSP/orcad returned: FailSaveSourceTree
----19/11/2007 15:17:58 LB--HB-LAPTOP(1.2.3.4)--SSL Enabled (85376b48-f9ea-45a8-8b50-923165a5331a) AddFolder: $/RES/RSP/orcad/RSP5004 returned: FailSaveSourceTree
----19/11/2007 15:17:58 LB--HB-LAPTOP(1.2.3.4)--SSL Enabled (85376b48-f9ea-45a8-8b50-923165a5331a) AddFile: $/RES/RSP/orcad/RSP5004/RSP-5004A1.DSN returned: FailSaveSourceTree

lbauer
Posts: 9736
Joined: Tue Dec 16, 2003 1:25 pm
Location: SourceGear

Post by lbauer » Mon Nov 19, 2007 12:04 pm

Run the following queries and report the results (how many rows returned in each one) and the repid involved. You will send that to support at sourcegear.com ATTN Linda.

First, to get the repository IDs, run the following in Query Analyzer on your SQL server:

Code: Select all

SELECT repid, name FROM sgvault.dbo.tblrepositories
Then run each of the following individually, replacing '(id)' with one of the repository IDs from the previous query.

Code: Select all

select * from sgvault.dbo.tblcurrenttreerevisionfolders where repid = (id)

Code: Select all

SELECT * FROM sgvault.dbo.tblrepositories r WHERE r.repid = (id)

Code: Select all

select * from sgvault.dbo.tbltreerevisionfolders x inner join sgvault.dbo.tblrepositories r on r.currenttxid = x.txid where r.repid = (id)
Linda Bauer
SourceGear
Technical Support Manager

Post Reply