Microsoft 开发人员网络 > 论坛主页 > Visual Studio Source Control and SourceSafe > How to set time of local files during the Branch operation?
提出问题提出问题
 

问题How to set time of local files during the Branch operation?

  • 2009年2月17日 8:40Alexander Sviridov 用户奖牌用户奖牌用户奖牌用户奖牌用户奖牌
     
    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

全部回复

  • 2009年2月18日 3:32Catherine Sea 用户奖牌用户奖牌用户奖牌用户奖牌用户奖牌
     
    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
  • 2009年2月18日 9:12Alexander Sviridov 用户奖牌用户奖牌用户奖牌用户奖牌用户奖牌
     
    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
  • 2009年5月22日 5:54Catherine Sea 用户奖牌用户奖牌用户奖牌用户奖牌用户奖牌
     
    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/

  • 2009年10月29日 14:01Alexander Sviridov 用户奖牌用户奖牌用户奖牌用户奖牌用户奖牌
     
    Hi Catherine, Thanks for the information.
  • 2009年11月2日 6:09Catherine Sea 用户奖牌用户奖牌用户奖牌用户奖牌用户奖牌
     
    You are welcome. :-)



    Catherine Sea
    Version Control Software | Software Configuration Management Solution