Putting this place to use
This will probably bore most of you to tears but I'm typing it anyway. :-P
Today I resolved to set up a working mercurial repository for my graphics work on this server, for two reasons. One, I sometimes work on the code on my work machine, and the instant you have more than one copy of your code, you need something to keep track of which copy is the good one. Two, I need to know how to use mercurial for the summer anyway so this would be a good start. It was an interesting experience.
You see, I know very little about mercurial still, so I didn't really know where to start and honestly wasn't sure I would be able to tell if it worked or not. The big reason for my hesitation is that mercurial works differently from subversion, the system we use right now at work. Subversion is all about a centralized repository where you set up a subversion server and then everybody interacts with it. Mercurial doesn't really center around a main server. In fact, there is no "mercurial server" to install. Armed with only this knowledge, I set about trying to follow a Wiki tutorial titled "Publishing Repositories." After about an hour and a good spot on a permissions issue by Fruity Pants, I had that working, and then promptly realized it was the wrong thing. It provides a nice web interface to viewing the changes and whatnot for the repository, and allows you to pull changesets, but it has no means for pushing changes you make on your local copy (and no permissions model to govern who can or can't do so).
So, the next step was to realize that I actually just want to use the ssh protocol to push and pull changes to and from that repository, which is actually quite simple to set up. Of course, the syntax for working on an ssh repository looks a lot like scp syntax but isn't exactly the same, which cost me another chunk of time and another good spot from Fruity Pants, but it seems that I have what I need now.
Moral of the story, I now have the ability to edit code in a ton of different places with very little worry about where the good copy is or how I'm going to keep all those places up to date. I'm pleased.
Today I resolved to set up a working mercurial repository for my graphics work on this server, for two reasons. One, I sometimes work on the code on my work machine, and the instant you have more than one copy of your code, you need something to keep track of which copy is the good one. Two, I need to know how to use mercurial for the summer anyway so this would be a good start. It was an interesting experience.
You see, I know very little about mercurial still, so I didn't really know where to start and honestly wasn't sure I would be able to tell if it worked or not. The big reason for my hesitation is that mercurial works differently from subversion, the system we use right now at work. Subversion is all about a centralized repository where you set up a subversion server and then everybody interacts with it. Mercurial doesn't really center around a main server. In fact, there is no "mercurial server" to install. Armed with only this knowledge, I set about trying to follow a Wiki tutorial titled "Publishing Repositories." After about an hour and a good spot on a permissions issue by Fruity Pants, I had that working, and then promptly realized it was the wrong thing. It provides a nice web interface to viewing the changes and whatnot for the repository, and allows you to pull changesets, but it has no means for pushing changes you make on your local copy (and no permissions model to govern who can or can't do so).
So, the next step was to realize that I actually just want to use the ssh protocol to push and pull changes to and from that repository, which is actually quite simple to set up. Of course, the syntax for working on an ssh repository looks a lot like scp syntax but isn't exactly the same, which cost me another chunk of time and another good spot from Fruity Pants, but it seems that I have what I need now.
Moral of the story, I now have the ability to edit code in a ton of different places with very little worry about where the good copy is or how I'm going to keep all those places up to date. I'm pleased.


4 Comments:
this is what i read:
"This will probably bore most of you to tears but I'm typing it anyway. :-P
...
Moral of the story, I now have the ability to edit code in a ton of different places with very little worry about where the good copy is or how I'm going to keep all those places up to date. I'm pleased."
heehee....=D
Yea that's about what I expect out of most of you. I figure Sean, Mike, Lundles, and Josh are the only ones who will really get much out of it on the technical side.
Bit odd that there's no server. What decides what changes have been made?
-Josh
Well, the quick(ish) and mostly accurate explanation is that you basically ask another repository "What do you have that's different than me?" (a pull) or you tell another repository "Here's what I have that's different than you," (a push). If everyone pushes their changes to a central repository, then that one becomes the de facto "server" repository.
As Kershaw explained it, Mercurial is best used for large code bases where most people are each working on their own bit, so you don't need the centralized server. Mercurial helps them manage their own changes, then allows them to share those changes with people when they want to. The true central server approach (CVS, subversion) is better for when multiple people are working on the same files, and you need really tight coordination of the changes and conflicts.
The two systems are semi-interchangeable, but for some projects one works better and for some projects the other works better. Subversion is really the better choice for me with my stuff but it requires much more server-side setup and since I don't have root on my hosting server Mercurial was my best choice.
Post a Comment
<< Home