Red Gate forums :: View topic - Linking database to perforce fails
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
SQL Source Control 3
SQL Source Control 3 forum

Linking database to perforce fails

Search in SQL Source Control 3 forum
Post new topic   Reply to topic
Jump to:  
Author Message
S.engel



Joined: 24 Aug 2012
Posts: 2

PostPosted: Fri Aug 24, 2012 2:15 pm    Post subject: Linking database to perforce fails Reply with quote

I am able to link database to the evulation SVN. However it is not possible to link databases to perforce.
I have created my own config file SFP.xml
Code:

<HooksConfig version="1" type="HooksConfig">
  <!-- The name of the config file that will be displayed in the SQL Source Control user interface -->
  <Name>SFP</Name>
  <Commands type="Commands" version="2">
    <element>
      <key type="string">GetLatest</key>
      <!-- Updates the local working folder with latest version in source control. -->
      <!-- Valid macros: ($ScriptsFolder) ($Message) -->
      <value version="1" type="GenericHookCommand">
        <CommandLine>P4 -s sync "($ScriptsFolder)..."</CommandLine>
        <Verify>exitCode == 0</Verify>
      </value>
    </element>
    <element>
      <key type="string">Add</key>
      <!-- Adds new files to the local working copy. Changes can then be committed to source control using the Commit command. -->
      <!-- Valid macros: ($ScriptsFolder) ($Message) ($Files) ($Folders) -->
      <value version="1" type="GenericHookCommand">
        <CommandLine>P4 -s add -t binary ($Files)</CommandLine>
        <Verify>exitCode == 0</Verify>
      </value>
    </element>
    <element>
      <key type="string">Edit</key>
      <!-- Makes the local working copy of the file(s) available for editing. Changes can then be committed to source control using the Commit command. -->
      <!-- Valid macros: ($ScriptsFolder) ($Message) ($Files) ($Folders) -->
      <value version="1" type="GenericHookCommand">
        <CommandLine>P4 -s edit ($Files)</CommandLine>
        <Verify>exitCode == 0</Verify>
      </value>
    </element>
    <element>
      <key type="string">Delete</key>
      <!-- Deletes the file(s) from the local working copy. Changes can then be committed to source control using the Commit command. -->
      <!-- Valid macros: ($ScriptsFolder) ($Message) ($Files) ($Folders) -->
      <value version="1" type="GenericHookCommand">
        <CommandLine>P4 -s delete ($Files) ($Folders)</CommandLine>
        <Verify>exitCode == 0</Verify>
      </value>
    </element>
    <element>
      <key type="string">Commit</key>
      <!-- Commits all changes in the local working folder to source control. -->
      <!-- Valid macros: ($ScriptsFolder) ($Message) -->
      <value version="1" type="GenericHookCommand">
        <CommandLine>P4 -s submit -d "($Message)" "($ScriptsFolder)..."</CommandLine>
        <Verify>exitCode == 0</Verify>
      </value>
    </element>
    <element>
      <key type="string">Revert</key>
      <!-- Undoes changes if an error occurs during a commit -->
      <!-- Valid macros: ($ScriptsFolder) -->
      <value version="1" type="GenericHookCommand">
        <CommandLine>P4 -s revert "($ScriptsFolder)..."</CommandLine>
        <Verify>exitCode == 0</Verify>
      </value>
    </element>
  </Commands>
</HooksConfig>


I can see new created folder for all the objects in the workfile-folder but they are all empty.

This is the error message I get when the linking fails: (First Window)

Command:
P4 -c WS_SFP -s submit -d "Database project file added by Red Gate SQL Source Control" "J:\PerforceDB\database\SFPI\..."

Output:
error: No files to submit from the default changelist.

exit: 1

Exit code:
1

and then in another popup-window:


Command line hook failed


Best regards
SynnÝve
Back to top
View user's profile Send private message
S.engel



Joined: 24 Aug 2012
Posts: 2

PostPosted: Tue Aug 28, 2012 3:13 pm    Post subject: Reply with quote

OK, I finally found it. Perforce always needs a comment, so the first link will fail.
This workaround helps:
http://www.red-gate.com/SupportCenter/Content/SQL_Source_Control/knowledgebase/linking-fails
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic All times are GMT + 1 Hour
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group