当我的文件和/或他们的文件发生更改时,安装程序/SVN 用于部署应用程序数据文件
我对 Tortoise SVN / Innosetup 的使用感到一团糟,并且我自己对尝试保留客户数据更改感到自豪,并且希望得到一些建议。问题是:
我部署了一个安装其数据文件的应用程序,并且作为安装的一部分,我让安装程序将这些文件标记为“神奇”日期时间(01-01-1991 00:00:00)。我的客户随后会修改一些数据文件,导致它们的日期比我的“神奇”日期更新。因为我不想丢弃客户更改,所以我在 Innosetup 中使用“COMPARETIMESTAMP”(尽管“不推荐”)。这一直很有效,直到我必须将更改部署到我的一个文件,在这种情况下,除非客户更改了时间戳,否则我需要忽略时间戳。
这种情况适用于所有文件类型,例如没有版本功能、只有日期时间的文本文件。
作为进一步的限制,我的日期时间标记必须发生在安装程序脚本中,因为 SVN 不(也不应该)保证稍后的文件日期时间。
我在这里缺少更好的方法吗?其他人对此做了什么? 谢谢
I'm getting in a mess with the use of Tortoise SVN / Innosetup and my own pride in trying to preserve customer data changes and would appreciate some suggestions. Here's the problem:
I deploy an application which installs its data files and as part of the install I've made the installer stamp these files to a 'magic' date-time (01-01-1991 00:00:00). Some data files will be subsequently modifed by my customer causing their date to be more recent than my 'magic' date. Because I dont want to trash customer changes I use 'COMPARETIMESTAMP' in Innosetup (athough its 'not recommended'). This has worked well until I have to deploy a change to one of my files in which case I need the time stamp to be ignored unless the customer has changed it.
This situation applies to all file types e.g text file where there is no version capability, only a date-time.
As a further restriction my stamping of date-time has to happen in the installer script because SVN does not (and should not) guarantee the file date time later.
Am I missing a better approach here? What do others do about this?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
好吧,我寻求这个问题的答案,并提出了这个方法,我在这里复制了它,以防它有一些用处。它的作用是:
如果目标文件已被最终用户修改,则显示一条消息,默认情况下不理会它。
如果最终用户未修改目标文件,请始终替换它。
要实现此目的,您需要使用脚本设置:
安装时,所有“我的”文件都被标记为 1/1/1991 01:01,这对于检查很有用,并允许我使用以下两行在最终用户可以编辑的任何文件的 [Files] 部分中,例如:
两行都尝试安装该文件,但如果使用检查功能该文件仍然是“我的一个”,则第二行将使用差异标志安装该文件“是魔法”。 'IsMagic 函数在代码中声明如下:
我希望这有一些用处。
Well, I pursued an answer to this problem and came up with this method which I've reproduced here in case it is of some use. What it does is:
If the destination file has been modified by the end-user, display a message with the default being to leave it alone.
If the destination file HAS NOT been modified by the end-user, always replace it.
To achive this, you need to use the script settings:
When the installation takes place, all 'my' files are stamped to 1/1/1991 01:01 which makes it useful for examination, and allowes me to use the following two lines in the [Files] section for any file which the end-user may edit eg:
Both lines attempt to install the file, but the second line installs the file using difference flags if the file is still 'one of mine' using the check function 'IsMagic'. The 'IsMagic function is declared in code as follows:
I hope this is of some use.