{"thread":{"id":"25756","subject":"Using git-svn with svnsync mirror","startedAt":"2010-11-16T02:08:16Z","lastAt":"2010-11-16T07:31:32Z","messageCount":3,"participants":["Phillip Hutchings","Tim Stoakes"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"155963","messageId":"loom.20101116T030410-656@post.gmane.org","threadId":"25756","inReplyTo":null,"subject":"Using git-svn with svnsync mirror","fromName":"Phillip Hutchings","fromEmail":"sitharus@sitharus.com","sentAt":"2010-11-16T02:08:16Z","receivedAt":"2010-11-16T02:08:16Z","isPatch":false,"sender":{"key":"sitharus@sitharus.com","avatar":null},"body":"Hi,\n\nI've got an svnsync mirror of a large repository, and I'm trying to do\na git-svn clone from the mirror as the main server is off site. This\nworks well until I try to dcommit or use git svn info.\n\nMy investigations show that working_head_info in git-svn doesn't\naccount for using svnsync properties, so it cannot find a log entry\nthat matches a config entry.\n\nMy perl isn't good enough to patch this yet, so I was wondering if\nanyone else had encountered it.\n\nI could change the config URL to match, but I'm worried this will\nbreak things.\n"},{"id":"155977","messageId":"20101116042312.GB24344@mail.stoakes.net","threadId":"25756","inReplyTo":"loom.20101116T030410-656@post.gmane.org","subject":"Re: Using git-svn with svnsync mirror","fromName":"Tim Stoakes","fromEmail":"git@stoakes.net","sentAt":"2010-11-16T04:23:12Z","receivedAt":"2010-11-16T04:23:12Z","isPatch":false,"sender":{"key":"git@stoakes.net","avatar":null},"body":"Phillip Hutchings(sitharus@sitharus.com)@161110-02:08:\n> Hi,\n> \n> I've got an svnsync mirror of a large repository, and I'm trying to do\n> a git-svn clone from the mirror as the main server is off site. This\n> works well until I try to dcommit or use git svn info.\n> \n> My investigations show that working_head_info in git-svn doesn't\n> account for using svnsync properties, so it cannot find a log entry\n> that matches a config entry.\n> \n> My perl isn't good enough to patch this yet, so I was wondering if\n> anyone else had encountered it.\n> \n> I could change the config URL to match, but I'm worried this will\n> break things.\n\nYou want to use rewriteRoot option so that changing the URL does not\nbreak things (the URL is stored in each git commit's log).\n\nI use something like this all the time:\n[svn-remote \"svn\"]\n  rewriteRoot = svn://svn.foo.com/repo/blah   <-- the master\n  url = svn://svn-mirror.foo.com/repo/somewhere/else/blah  <-- a slave\n\nIf you've imported from the mirror without this option, then you're\nstuck I think. You could work around it by swapping the URLs in the\nrewriteRoot and url fields (essentially rewriting the URLs in the wrong\norder), but this is strictly 'wrong'.\n\nTim\n\n-- \nTim Stoakes\n"},{"id":"155981","messageId":"AC576A1A-98E4-4710-91B8-7777DBC65B9B@sitharus.com","threadId":"25756","inReplyTo":"20101116042312.GB24344@mail.stoakes.net","subject":"Re: Using git-svn with svnsync mirror","fromName":"Phillip Hutchings","fromEmail":"sitharus@sitharus.com","sentAt":"2010-11-16T07:31:32Z","receivedAt":"2010-11-16T07:31:32Z","isPatch":false,"sender":{"key":"sitharus@sitharus.com","avatar":null},"body":"\nOn 16/11/2010, at 5:23 PM, Tim Stoakes wrote:\n\n> Phillip Hutchings(sitharus@sitharus.com)@161110-02:08:\n>> Hi,\n>> \n>> I've got an svnsync mirror of a large repository, and I'm trying to do\n>> a git-svn clone from the mirror as the main server is off site. This\n>> works well until I try to dcommit or use git svn info.\n>> \n>> My investigations show that working_head_info in git-svn doesn't\n>> account for using svnsync properties, so it cannot find a log entry\n>> that matches a config entry.\n>> \n>> My perl isn't good enough to patch this yet, so I was wondering if\n>> anyone else had encountered it.\n>> \n>> I could change the config URL to match, but I'm worried this will\n>> break things.\n> \n> You want to use rewriteRoot option so that changing the URL does not\n> break things (the URL is stored in each git commit's log).\n> \n> I use something like this all the time:\n> [svn-remote \"svn\"]\n>  rewriteRoot = svn://svn.foo.com/repo/blah   <-- the master\n>  url = svn://svn-mirror.foo.com/repo/somewhere/else/blah  <-- a slave\n> \n> If you've imported from the mirror without this option, then you're\n> stuck I think. You could work around it by swapping the URLs in the\n> rewriteRoot and url fields (essentially rewriting the URLs in the wrong\n> order), but this is strictly 'wrong'.\n\n\nI cloned using --use-svnsync-props, this resulted in the log entries\nhaving the correct url to the master, but git-svn being unable to\nlink that url back to the config entry.\n\nGuess I'm in for a recloning then.\n\n--\nPhillip Hutchings\nsitharus@sitharus.com\n\n\n\n"}]}