Visual Studio Developer Center > Visual Studio Forums > Visual Studio Source Control and SourceSafe > How to set time of local files during the Branch operation?
Ask a questionAsk a question
 

QuestionHow to set time of local files during the Branch operation?

  • Tuesday, February 17, 2009 8:40 AMAlexander Sviridov Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Hi,

    I want to set modified time of local files during the Branch operation like I do it during the Check Out operation ("Check Out ..." dialog > Advanced > Set file time: Current, Modification, Check In). But I cannot find any possibilities to do this via VSS IDE. Is it in principle possible?

    Also I have found the article where the method I can use to control VSS via COM technology was described:
    http://msdn.microsoft.com/en-us/library/microsoft.visualstudio.sourcesafe.interop.ivssitem.branch(VS.80).aspx

    And there is possible to call described method with the flags shown below:
    "VSSFLAG_TIMEMOD
    Use this flag with the Branch, Checkout, or Get methods.
    When this flag is set, the date/time of the local copy is set to last modification date and time. This is typically used during a Get operation. Only one constant from this group may be used at a time.
    This flag belongs to the group of flags:
    VSSFLAG_TIMEMOD
    VSSFLAG_TIMENOW (default)
    VSSFLAG_TIMEUPD
    ..." (from http://msdn.microsoft.com/en-us/library/microsoft.visualstudio.sourcesafe.interop.vssflags(VS.80).aspx)

    I.e. it must be possible to change time of local files during the Branch operation. I have tried to call the method with the corresponding arguments. The result is files were branched ok but the time of the files was not changed.

    Maybe anybody know anything about this?

    Thanks in advance

All Replies

  • Wednesday, February 18, 2009 3:32 AMCatherine Sea Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Hi Alexander,

    Would you please be more specific with "change time of local files during the Branch operation"?

    After you branch the file, you can also set the local time of the branch during Check Out or Get by using the "Set file time" option.

    Thanks.


    www.dynamsoft.com - Microsoft GOLD CERTIFIED Partner
    the leading developer of version control and issue tracking software
  • Wednesday, February 18, 2009 9:12 AMAlexander Sviridov Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Hi Catherine,


    > After you branch the file, you can also set the local time of the branch during Check Out or Get by using the "Set file time" option.
    My question is actually mean the following: can I set the local time of the branch DURING Branch by using some option like the Check Out's or Get's "Set file time" option? Or can I set the local time only AFTER Branch using, for example, Check Out or Get?

    > Would you please be more specific with "change time of local files during the Branch operation"?
    I hope the paragraph above made my question clean. Please let me know if you need any details yet.

    This question is important for me because I am writing the modules (with UI part) for performing different actions with VSS (Check In, Check Out, Branch, etc.) - they will be very simple in use modules to help to organize the build process as a variant. Then I found the description of the corresponding function for Branch action I also found what I can set the time of the local copy:
    "VSSFLAG_TIMEMOD
    Use this flag with the Branch, Checkout, or Get methods.
    When this flag is set, the date/time of the local copy is set to last modification date and time. This is typically used during a Get operation. Only one constant from this group may be used at a time.
    This flag belongs to the group of flags:
    VSSFLAG_TIMEMOD
    VSSFLAG_TIMENOW (default)
    VSSFLAG_TIMEUPD
    ..."
    But I cannot find any similar option in the VSS's UI (If the option exists, of course). And when I tried to call the method with the corresponding options I did not have the expected result (the specifing parameters for setting time changed nothing).

    I do not have big experience with Branch action and I do not know whether setting the time of the files important for Branch (or right after Branch) or not.

    Thanks for reply
  • Friday, May 22, 2009 5:54 AMCatherine Sea Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Hi Alexander,

    >My question is actually mean the following: can I set the local time of the branch DURING Branch by using some option like the Check Out's or Get's "Set file time" option? Or can I set the local time only AFTER Branch using, for example, Check Out or Get?

    You can set the local time only after Branch. If you branch a file in VSS, the file will not be got to local so you cannot set the time. You can use Check Out/Get to set time after Branch.

    Hope it helps.

    Thanks.

    Catherine Sea
    http://www.scmsoftwareconfigurationmanagement.com/

  • Thursday, October 29, 2009 2:01 PMAlexander Sviridov Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Hi Catherine, Thanks for the information.
  • Monday, November 02, 2009 6:09 AMCatherine Sea Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    You are welcome. :-)



    Catherine Sea
    Version Control Software | Software Configuration Management Solution