{"thread":{"id":"35238","subject":"rcs","startedAt":"2013-10-29T16:35:21Z","lastAt":"2013-11-06T17:28:52Z","messageCount":6,"participants":["Finnerty, James M Mr CTR USA USASOC-SOAR","Keshav Kini","Jeff King","Jakub Narębski","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"229733","messageId":"B49EE6A27F1B0642B4D12AD9C064E8C7B072E3@SOARCPRVSBEU000.regnet2.soar.ns","threadId":"35238","inReplyTo":null,"subject":"rcs","fromName":"Finnerty, James M Mr CTR USA USASOC-SOAR","fromEmail":"jim.finnerty.ctr@soar.army.mil","sentAt":"2013-10-29T16:35:21Z","receivedAt":"2013-10-29T16:35:21Z","isPatch":false,"sender":{"key":"jim.finnerty.ctr@soar.army.mil","avatar":null},"body":"Hi. I'm going to attempt to import a git database into Razor which is\nlinux rcs based. Does the linux version of git use rcs ?\n\n Thanks Jim\n\nJim Finnerty\n\n\nECS, Inc.\nComm: (270) 798-1386, Fax: (270)798-7724\nCell: (570) 498-8499\n\nCAUTION: This message may contain competitive, sensitive or other\nnon-public information not intended for disclosure outside official\ngovernment channels.  Do not disseminate this message outside of\nofficial channels.  If you received this message in error, please notify\nthe sender by reply e-mail and delete all copies of this message.\" \n\n\"STATEMENT OF LIMITATION OF AUTHORITY: You are hereby notified that I do\nnot have the authority to direct you in any way to alter your\ncontractual obligations. Further, if your U.S. Army customer, as the\nresult of the information obtained from discussions or emails, does\ndesire to alter your contract requirements, changes will be issued in\nwriting and signed by the contracting officer. You should take no action\non any change unless and until you receive such a contract modification\nor written direction by the Contracting Officer.\"\n"},{"id":"229735","messageId":"87txg0huga.fsf@gmail.com","threadId":"35238","inReplyTo":"B49EE6A27F1B0642B4D12AD9C064E8C7B072E3@SOARCPRVSBEU000.regnet2.soar.ns","subject":"Re: rcs","fromName":"Keshav Kini","fromEmail":"keshav.kini@gmail.com","sentAt":"2013-10-29T17:12:53Z","receivedAt":"2013-10-29T17:12:53Z","isPatch":false,"sender":{"key":"keshav.kini@gmail.com","avatar":"https://avatars.githubusercontent.com/u/691290?v=4"},"body":"\"Finnerty, James M Mr CTR USA USASOC-SOAR\"\n<jim.finnerty.ctr@soar.army.mil> writes:\n> Hi. I'm going to attempt to import a git database into Razor which is\n> linux rcs based. Does the linux version of git use rcs ?\n\nIf you're talking about the GNU rcs program, no, it does not.\n\n-Keshav\n"},{"id":"229736","messageId":"20131029181614.GA13601@sigill.intra.peff.net","threadId":"35238","inReplyTo":"B49EE6A27F1B0642B4D12AD9C064E8C7B072E3@SOARCPRVSBEU000.regnet2.soar.ns","subject":"Re: rcs","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2013-10-29T18:16:14Z","receivedAt":"2013-10-29T18:16:14Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Tue, Oct 29, 2013 at 11:35:21AM -0500, Finnerty, James M Mr CTR USA USASOC-SOAR wrote:\n\n> Hi. I'm going to attempt to import a git database into Razor which is\n> linux rcs based. Does the linux version of git use rcs ?\n\nNo, the formats are completely different, and you will have to\ntranslate.  We don't usually get requests to go from git to rcs; it\nusually goes the other way. :)\n\nI don't know offhand of a tool that does it out of the box.  It should\nbe possible to generate the RCS files directly from the \"git log\" data\n(though RCS does not use unified diff for storage, but rather \"ed\"\ncommands, so you'd have to translate there). A slower simpler way would\nbe to just \"replay\" the git history, committing to rcs at each step.\nThat might look something like the hacky, largely untested script below:\n\n-- >8 --\n#!/bin/sh\n\n# note that this does not handle filenames which need quoting.\nchanged_files() {\n  git diff-tree -r --name-only \"$1\" | tail -n +2\n}\n\n# Look at each commit in chronological order; note\n# that this will linearize your history, as this\n# script does not know about branches at all.\ngit rev-list --reverse HEAD |\nwhile read rev; do\n\n  # take a lock on each file we are about to update\n  rcs -l $(changed_files $rev)\n\n  # update the working tree to this revision\n  git checkout -fq $rev\n\n  # get commit date in iso8601\n  date=$(git log -1 --format=%ai)\n\n  # get author \"login\". This just pulls the username from\n  # the email address; you may also want to map email\n  # addresses to logins via a file.\n  login=$(git log -1 --format=%ae | cut -d@ -f1)\n\n  # original commit message\n  msg=$(git log -1 --format=%B)\n\n  # now we're ready to checkin\n  ci -w\"$login\" -d\"$date\" -m\"$msg\" $(changed_files $rev) </dev/null\ndone\n-- 8< --\n\nThere are lots of ways it can go wrong (and I tried to note them above),\nbut it may be enough for a simple history.\n\n-Peff\n"},{"id":"229738","messageId":"B49EE6A27F1B0642B4D12AD9C064E8C7B072E5@SOARCPRVSBEU000.regnet2.soar.ns","threadId":"35238","inReplyTo":"20131029181614.GA13601@sigill.intra.peff.net","subject":"RE: rcs","fromName":"Finnerty, James M Mr CTR USA USASOC-SOAR","fromEmail":"jim.finnerty.ctr@soar.army.mil","sentAt":"2013-10-29T19:17:34Z","receivedAt":"2013-10-29T19:17:34Z","isPatch":false,"sender":{"key":"jim.finnerty.ctr@soar.army.mil","avatar":null},"body":"Jeff,\n\n  Thanks.  We have several systems using Razor right now. So we are trying to get all the systems into one CM system. Razor is just a gui that uses rcs commands. Once we get everything synced we will explore our options for a complete development CM system.\n\n Jim\n\n-----Original Message-----\nFrom: Jeff King [mailto:peff@peff.net] \nSent: Tuesday, October 29, 2013 1:16 PM\nTo: Finnerty, James M Mr CTR USA USASOC-SOAR\nCc: git@vger.kernel.org; Hawkins, Lisa M Mrs CTR USA USASOC-SOAR\nSubject: Re: rcs\n\nOn Tue, Oct 29, 2013 at 11:35:21AM -0500, Finnerty, James M Mr CTR USA USASOC-SOAR wrote:\n\n> Hi. I'm going to attempt to import a git database into Razor which is \n> linux rcs based. Does the linux version of git use rcs ?\n\nNo, the formats are completely different, and you will have to translate.  We don't usually get requests to go from git to rcs; it usually goes the other way. :)\n\nI don't know offhand of a tool that does it out of the box.  It should be possible to generate the RCS files directly from the \"git log\" data (though RCS does not use unified diff for storage, but rather \"ed\"\ncommands, so you'd have to translate there). A slower simpler way would be to just \"replay\" the git history, committing to rcs at each step.\nThat might look something like the hacky, largely untested script below:\n\n-- >8 --\n#!/bin/sh\n\n# note that this does not handle filenames which need quoting.\nchanged_files() {\n  git diff-tree -r --name-only \"$1\" | tail -n +2 }\n\n# Look at each commit in chronological order; note # that this will linearize your history, as this # script does not know about branches at all.\ngit rev-list --reverse HEAD |\nwhile read rev; do\n\n  # take a lock on each file we are about to update\n  rcs -l $(changed_files $rev)\n\n  # update the working tree to this revision\n  git checkout -fq $rev\n\n  # get commit date in iso8601\n  date=$(git log -1 --format=%ai)\n\n  # get author \"login\". This just pulls the username from\n  # the email address; you may also want to map email\n  # addresses to logins via a file.\n  login=$(git log -1 --format=%ae | cut -d@ -f1)\n\n  # original commit message\n  msg=$(git log -1 --format=%B)\n\n  # now we're ready to checkin\n  ci -w\"$login\" -d\"$date\" -m\"$msg\" $(changed_files $rev) </dev/null done\n-- 8< --\n\nThere are lots of ways it can go wrong (and I tried to note them above), but it may be enough for a simple history.\n\n-Peff\n"},{"id":"230117","messageId":"5279071B.2070309@gmail.com","threadId":"35238","inReplyTo":"B49EE6A27F1B0642B4D12AD9C064E8C7B072E5@SOARCPRVSBEU000.regnet2.soar.ns","subject":"Re: rcs","fromName":"Jakub Narębski","fromEmail":"jnareb@gmail.com","sentAt":"2013-11-05T14:56:27Z","receivedAt":"2013-11-05T14:56:27Z","isPatch":false,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"Finnerty, James M Mr CTR USA USASOC-SOAR wrote\n> Jeff King [mailto:peff@peff.net]wrote:\n>> On Tue, Oct 29, 2013 at 11:35:21AM -0500, Finnerty, James M Mr CTR USA USASOC-SOAR wrote:\n>>\n>>> Hi. I'm going to attempt to import a git database into Razor which is\n>>> linux rcs based. Does the linux version of git use rcs ?\n>>\n>> No, the formats are completely different, and you will have to translate.\n >> We don't usually get requests to go from git to rcs; it usually goes\n >> the other way. :)\n\n >\n >    Thanks.  We have several systems using Razor right now. So we are\n > trying to get all the systems into one CM system. Razor is just a gui\n > that uses rcs commands. Once we get everything synced we will explore\n > our options for a complete development CM system.\n\nThe problem with using RCS as sync (as base) is that it is least\npowerfull of VCS, and as far as I know do not offer place to store\nextra information, so conversion from Git to RSS will lose some\ninformation (committership, signed commits and signed merges, signed\ntags, etc.).\n\nThere is a tool to create fast-import stream from RCS repository,\nbut I am not sure if there is reverse (fast-import is a common\nintermediate fairly VCS_agnostic representation used for fast\nconversion between different version control systems).\n\n-- \nJakub Narębski\n"},{"id":"230146","messageId":"xmqqy5518mnf.fsf@gitster.dls.corp.google.com","threadId":"35238","inReplyTo":"5279071B.2070309@gmail.com","subject":"Re: rcs","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2013-11-06T17:28:52Z","receivedAt":"2013-11-06T17:28:52Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jakub Narębski <jnareb@gmail.com> writes:\n\n> Finnerty, James M Mr CTR USA USASOC-SOAR wrote\n>> Jeff King [mailto:peff@peff.net]wrote:\n>>> On Tue, Oct 29, 2013 at 11:35:21AM -0500, Finnerty, James M Mr CTR USA USASOC-SOAR wrote:\n>>>\n>>>> Hi. I'm going to attempt to import a git database into Razor which is\n>>>> linux rcs based. Does the linux version of git use rcs ?\n>>>\n>>> No, the formats are completely different, and you will have to translate.\n>>> We don't usually get requests to go from git to rcs; it usually goes\n>>> the other way. :)\n>\n>>\n>>    Thanks.  We have several systems using Razor right now. So we are\n>> trying to get all the systems into one CM system. Razor is just a gui\n>> that uses rcs commands. Once we get everything synced we will explore\n>> our options for a complete development CM system.\n>\n> The problem with using RCS as sync (as base) is that it is least\n> powerfull of VCS, and as far as I know do not offer place to store\n> extra information, so conversion from Git to RSS will lose some\n> information (committership, signed commits and signed merges, signed\n> tags, etc.).\n\nYou forgot to mention another important one: atomicity of commits\nacross the entire tree.  The best you could do would be to assume\nthat changes in such a collection of RCS ,v files from a Git export\nto different files with the same timestamp and by the same author\nare likely to have come from the same Git commit, and that the\ntimestamp monotonically increases, in order to stitch the history\nback together.\n"}]}