Files Updates by GetOperations.ProcessCommandGet

Post your questions regarding using the Vault and Fortress API in your programs.

Moderator: SourceGear

Post Reply
splatteredbits
Posts: 18
Joined: Fri Mar 06, 2009 12:27 pm

Files Updates by GetOperations.ProcessCommandGet

Post by splatteredbits » Wed Nov 25, 2009 12:46 pm

How do I get the list of files that were updated by GetOperations.ProcessCommandGet?

jeremy_sg
Posts: 1821
Joined: Thu Dec 18, 2003 11:39 am
Location: Sourcegear
Contact:

Re: Files Updates by GetOperations.ProcessCommandGet

Post by jeremy_sg » Mon Nov 30, 2009 11:51 am

The list should be coming along with the other messages that you're getting from subscribing to the ServerOperations.GetInstance().UserMessage event that I mentioned before.

If you want to isolate just the messages from get/checkout, you'll need to use a more complicated event notification system.
Subscribe to the Fortress/Vault blog

splatteredbits
Posts: 18
Joined: Fri Mar 06, 2009 12:27 pm

Re: Files Updates by GetOperations.ProcessCommandGet

Post by splatteredbits » Wed Dec 09, 2009 11:12 am

I'm not getting any events from that message. Here's my code:

Code: Select all

      // ...snip...
      ServerOperations.GetInstance().UserMessage += GetMessageEventHandler;
      GetOperations.ProcessCommandGet(objectPaths.ToArray(), options);
      ServerOperations.GetInstance().UserMessage -= GetMessageEventHandler;
      // ..snip

   private void GetMessageEventHandler(object sender, object message)
   {
      Trace.WriteLine(message);
   }

jeremy_sg
Posts: 1821
Joined: Thu Dec 18, 2003 11:39 am
Location: Sourcegear
Contact:

Re: Files Updates by GetOperations.ProcessCommandGet

Post by jeremy_sg » Thu Dec 10, 2009 4:56 pm

Try this:

Code: Select all

 ServerOperations.GetInstance().UserMessage += new ServerOperations.UserMessageEventHandler(GetMessageEventHandler);
      GetOperations.ProcessCommandGet(objectPaths.ToArray(), options);
      ServerOperations.GetInstance().UserMessage -= new ServerOperations.UserMessageEventHandler(
GetMessageEventHandler);
Subscribe to the Fortress/Vault blog

splatteredbits
Posts: 18
Joined: Fri Mar 06, 2009 12:27 pm

Re: Files Updates by GetOperations.ProcessCommandGet

Post by splatteredbits » Fri Dec 11, 2009 12:50 pm

Nope. Didn't work.

jeremy_sg
Posts: 1821
Joined: Thu Dec 18, 2003 11:39 am
Location: Sourcegear
Contact:

Re: Files Updates by GetOperations.ProcessCommandGet

Post by jeremy_sg » Fri Dec 11, 2009 3:01 pm

Will it work if you change the signature of GetMessageEventHandler to object, string?

Also, try setting the user message before you log in.
Subscribe to the Fortress/Vault blog

splatteredbits
Posts: 18
Joined: Fri Mar 06, 2009 12:27 pm

Re: Files Updates by GetOperations.ProcessCommandGet

Post by splatteredbits » Mon Dec 14, 2009 10:10 am

Neither worked.

jeremy_sg
Posts: 1821
Joined: Thu Dec 18, 2003 11:39 am
Location: Sourcegear
Contact:

Re: Files Updates by GetOperations.ProcessCommandGet

Post by jeremy_sg » Mon Dec 14, 2009 10:39 am

Are you getting zero messages, or are you just not getting the list of files?

If you change it to a nonworkingfolder get, do you get messages?

If you already have files in the working folder, or if they are cached in the hidden state folder, then you won't see messages when they're updated. Could that be what's going on?
Subscribe to the Fortress/Vault blog

Post Reply