是否有一个现代的免费 D?VCS 可以忽略大型机序列号?

发布于 2024-07-19 14:00:49 字数 554 浏览 5 评论 0原文

我正在考虑将一大套 IBM 汇编语言程序从基于“文件名包含版本号”的 vcs 迁移到现代 vcs,这将给我带来分支和合并的能力。

这些文件有 80 列记录,最后 8 列是几乎没有意义的序列号。

由于我不想浪费空间的多种原因,我需要 vcs 忽略(但希望以某种明确定义的方式保留)序列号列,并仅根据前 72 列的内容。

有任何想法吗?


只是为了澄清“忽略但保留”:我承认它有点模糊,因为我还没有完全收集我的想法。

大概是这样的:

“合并/修补时,如果一侧有序列号,则输出它们;如果多于一侧有序列号,则使用文件(1|2|3)中存在的序列号”


为什么我要保留序列号? 首先,它们实际上是序列号。 其次,我想将这些东西重新集成到大型机上,其中序列号可能非常重要。 (那些知道“SMP/E”含义的人会理解。那些不知道的人,会很高兴,但会颤抖......)


我刚刚意识到我没有接受答案。 艰难的选择,但@Noldorin 最接近我要去的地方。

I'm looking at migrating a large suite of IBM Assembler Language programs, from a vcs based on "filenames include version numbers", to a modern vcs which will give me, among other things, the ability to branch and merge.

These files have 80-column records, the last 8 columns being an almost-meaningless sequence number.

For a number of reasons which I don't really want to waste space by going into, I need the vcs to ignore (but hopefully preserve in some well-defined manner) the sequence number columns, and to diff and patch based only on the contents of the first 72 columns.

Any ideas?


Just to clarify "ignore but preserve": I accept it's a bit vague, as I haven't fully collected my ideas yet.

It would be something along the lines of this:

"When merging/patching, if one side has sequence numbers, output them; if more-than-one side has sequence numbers, use those present in file (1|2|3)"


Why do I want to preserve sequence numbers? First, they really are sequence numbers. Second, I want to reintegrate this stuff back onto the mainframe, where sequence numbers can be terribly significant. (Those of you who know what "SMP/E" means will understand. Those who don't, be happy, but tremble...)


I've just realised I hadn't accepted an answer. Difficult choice, but @Noldorin comes closest to where I have to go.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

兲鉂ぱ嘚淚 2024-07-26 14:00:49

在 Mercurial 中,您可以轻松忽略 .asm 文件的第 73 列 - 只需将以下行添加到 .hgrc 中:(

[encode]
*.asm: cut -b -72

如果您也想支持 Windows 系统,则可以使用稍微复杂的方法;-)。 然而,这不符合“忽略但保留”规范的“保留”部分(正如尼尔的评论指出的那样,这本身就有些问题)。

In Mercurial, you could easily ignore columns 73-end of .asm files -- just add to your .hgrc the following lines:

[encode]
*.asm: cut -b -72

(or slightly more complex ways if you want to support Windows systems as well;-). However this wouldn't meet the "preserve" part of your "ignore but preserve" spec (which, as Neil's comment points out, is somewhat problematic in itself).

似梦非梦 2024-07-26 14:00:49

我相信任何现代版本控制系统(SubversionBazaar 是我通常推荐的,是 分别是集中式和分布式)可以利用外部差异/合并工具。 不幸的是,我认为您必须自己编写这个自定义合并工具(至少我从未听说过可以满足您需要的工具),尽管这不应该是我想象的一项艰巨的任务。 话虽如此,您可能会对 此 StackOverflow 问题 以及 < a href="https://stackoverflow.com/questions/50371/better-merge-tool-for-subversion">这个。 抱歉,我无法提供更多信息来说明您想要特别研究哪些内容,但值得浏览一下,以防其中任何一个恰好满足您的要求。

I believe any modern version control system (Subversion and Bazaar are the ones I would typically recommend, being centralised and distributed respectively) can utilise an external diff/merge tool. Unfortunately, I would think you would have to write this custom merge tool yourself (at least I have never heard of one that does that you need), though this shouldn't be a huge task I would imagine. Saying that, you may have some luck with the recommendations given in this StackOverflow question as well as this one. Sorry I can't give any more information as to which ones you'll want to look into in particular, but it's worth having a browse through in case that any of them do happen to satisfy your requirements.

恬淡成诗 2024-07-26 14:00:49

我认为“保留”的含义是这里的关键。 当你说序列号“几乎毫无意义”时,这个“几乎”还包括除了序列之外的任何东西吗? 在 Dreamtime 中,我们曾经在那里编码一种程序流程图(您可以在布鲁克斯的《人月神话》第一版中找到一个示例),但值得庆幸的是,这种做法已经消失了。

如果序列号列的唯一含义是作为有序的数字序列。 我很想使用 @Alex 的方法 - 您可以在任何现代 VC 工具中对脚本中的文件进行预处理 - 来剪切序列号,然后当您提取文件时,使用类似的工具再次对记录进行重新排序。

I think the meaning of "preserve" is the key here. When you say the sequence numbers are "almost meaningless", does that "almost" include anything besides sequence? In the Dreamtime, we used to encode a sort of program flow chart over there (you can find an example in the First Edition of Brooks' Mythical Man Month) but that practice has thankfully died out.

If the only meaning of the sequence numbers columns are as an ordered sequence of numbers. I'd be tempted to use @Alex's approach — you can preprocess files from a script in any of the modern VC tools — to cut the sequence numbers, then when you extract a file, use an analogous tool to resequence the records again.

美男兮 2024-07-26 14:00:49

(披露:我代表本答案中描述的工具供应商)。

您想要的是一个 diff 工具,它可以理解第 72-80 列中的内容是“空白”,无论您是否已用字符填充它。

Semantic Designs COBOL Smart Differencer 有一个 IBM Enterprise COBOL 变体,它可以理解这一点美好的。

SD 为各种语言制作了 Smart Differencers,IBM Assembler 是未来的目标。 如果您有兴趣,请联系 SD 离线讨论有关 IBM Assembler 的智能差分器。

(Disclosure: I represent the vendor of tool described in this answer).

What you want is a diff tool that understands that the stuff in columns 72-80 is "whitespace" regardless of the facts that you've filled it with characters.

The Semantic Designs COBOL Smart Differencer has an IBM Enterprise COBOL variant that understands this just fine.

SD makes Smart Differencers for a variety of langauges, and IBM Assembler is a future target. Contact SD offline for discussion about a Smart Differencer for IBM Assembler, if you are interested.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文