Mercurial Hg Clone fails on C# project with GUID
UPDATE: In trying to replicate this problem one more time to answer your questions I could not! I can only conclud开发者_如何学Ce that my initial setup of Mercurial was problematic and/or possibly I was trying to checkin a build that failed compilation before the checkin. Sigh! Thank you so very much for your help. I gave credit for the help on how to do a script. I need to try that for general purposes.
hi all, I hope you can help me :). I am trying to see if Mercurial would be a good DCVS for my project at work, and I'm surely a newbie to many things.
We have a fairly large codebase in C# (Dotnet3.0 not 3.5 , WindowsXP) and it utilizes the GUID feature. I confess to know little about how or why we use the GUID, but I do know that I cannot touch it.
So, when I try hg clone, it fails unless I change the GUID in the cloned directory (ie create new GUID in Visual Studio and then paste that new GUID to replace the old one). To me, this completely defeats the purpose and utility of quick easy clones. It also makes difficult all the many workflows that require multiple clones.
Is there a workaround, or is there something I'm doing wrong? How can I simplify and/or remove this problem?
Would Bazaar make this easier?
Thank you!
You can probably do it in an update hook. I'm no windows scripter, but if you can write a powershell script that calls [system.guid].newguid()
and replaces it in that file you can use a hook like:
[hooks]
update=c:\scripts\replace-guid-in-file.PS1 path\to\file\with\guid
Whatever file you're changing these guids in should probably be untracked (put it in your .hgignore) or you're going to end up with a lot of accidental guid changes commited to the repo.
Is this GUID something the editor creates in the project files? In that case, do not check in the project files, or only those that do not contain the GUID.
精彩评论