{"thread":{"id":"33803","subject":"Mapping file contents from one repository to another","startedAt":"2013-05-12T15:22:00Z","lastAt":"2013-05-13T08:46:43Z","messageCount":2,"participants":["Jason Timrod","Michael Haggerty"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"217079","messageId":"1368372120.73994.YahooMailNeo@web160305.mail.bf1.yahoo.com","threadId":"33803","inReplyTo":null,"subject":"Mapping file contents from one repository to another","fromName":"Jason Timrod","fromEmail":"jtimrod@yahoo.com","sentAt":"2013-05-12T15:22:00Z","receivedAt":"2013-05-12T15:22:00Z","isPatch":false,"sender":{"key":"jtimrod@yahoo.com","avatar":null},"body":"Hi all,\n\nThis is a complicated question to try and ask, let alone answer, so I had best give some background.\n\nI have two repositories --- one of them, which I'll call \"repoA\", is the main repository, it's the one which most of the code we develop ends up.  The other repository, \"repoB\" is our portable version of the code---the one which is used to deploy on systems other than the one which repoA is deployed on.  As such, \"repoB\" often (and does) contain commits specific to repoB which will never appear in repoA, such as OS-specific things.\n\nIn this case, in repoA we have a man page.  Up until recently, this used to be the same file in both repositories.  But because of the way the files in repoB are deployed, unlike in repoA this file has had its name changed from:\n\nfoo.1 -> foo.1.in\n\nBecause the man page is run through some sed script to replace various things which never need to happen in repoA\n\nNow, as you might guess, foo.1 in repoA doesn't change.  When I merge in changes from repoA to repoB, there is no way for the repositories to know that repoA:foo.1 is really repoB:foo.1.in -- which means a new file is created every time.\n\nI appreciate I could just rename foo.1.in back to foo.1 in repoB, but this would cause some ambiguity with users who try to run the file through \"man\", because the tradition of .in files is well-understood.\n\nSo short of renaming the file in repoB back to foo.1, my question is this:  when merging repoA to repoB, can I somehow map the file contents from foo.1 to be foo.1.in in repoB?\n\nKindly,\n\nJason\n"},{"id":"217144","messageId":"5190A873.2040101@alum.mit.edu","threadId":"33803","inReplyTo":"1368372120.73994.YahooMailNeo@web160305.mail.bf1.yahoo.com","subject":"Re: Mapping file contents from one repository to another","fromName":"Michael Haggerty","fromEmail":"mhagger@alum.mit.edu","sentAt":"2013-05-13T08:46:43Z","receivedAt":"2013-05-13T08:46:43Z","isPatch":false,"sender":{"key":"mhagger@alum.mit.edu","avatar":"https://avatars.githubusercontent.com/u/119718?v=4"},"body":"On 05/12/2013 05:22 PM, Jason Timrod wrote:\n> Hi all,\n> \n> This is a complicated question to try and ask, let alone answer, so I had best give some background.\n> \n> I have two repositories --- one of them, which I'll call \"repoA\", is the main repository, it's the one which most of the code we develop ends up.  The other repository, \"repoB\" is our portable version of the code---the one which is used to deploy on systems other than the one which repoA is deployed on.  As such, \"repoB\" often (and does) contain commits specific to repoB which will never appear in repoA, such as OS-specific things.\n> \n> In this case, in repoA we have a man page.  Up until recently, this used to be the same file in both repositories.  But because of the way the files in repoB are deployed, unlike in repoA this file has had its name changed from:\n> \n> foo.1 -> foo.1.in\n> \n> Because the man page is run through some sed script to replace various things which never need to happen in repoA\n\nWhy don't you name it foo.1.in in both repos and pipe it through \"cat\"\non repoA (i.e., just copy it to foo.1)?  Then you would only have to\nmaintain a small difference in your build system between repoA/repoB\nrather than having to coordinate two versions of the bigger source document.\n\nMichael\n\n-- \nMichael Haggerty\nmhagger@alum.mit.edu\nhttp://softwareswirl.blogspot.com/\n"}]}