[OSM-dev] Newbie question

Karl Newman siliconfiend at gmail.com
Mon Nov 10 15:47:11 GMT 2008


On Mon, Nov 10, 2008 at 12:13 AM, Ed Loach <ed at loach.me.uk> wrote:

> Thomas wrote:
>
> > Patch files are applied using the standard unix tools (patch),
> > if on
> > windows, there's probably an alternative.
> > Make sure you check out the relevant tree from svn - svn co
> > http://svn.openstreetmap.org/applications/....
> > Edit the file. then svn ci file_path
> > Make sure you svn up before your next edits.
>
> I am on Windows - 64-bit Vista - and have added the TortoiseSVN
> shell extension(s), which I've played around with enough to be able
> to use the diff option and create the patch (and apply it to my
> local XML files when I've reverted to the current repository
> version). I did try the commit option, but it reported some
> problems, so assumed I was misunderstanding what was required.
>
> The shell extension though doesn't have obvious checkout and checkin
> equivalents. I would guess that "get lock" is the co equivalent and
> "commit" is the ci equivalent.
>
> It also contains "apply patch" functionality which so far I have
> done by browsing to my local (reverted) files and applying it to
> them. So would the process be "Get Lock", "Patch local files",
> "Commit", "svn up"?
>
> I do also have the command line svn version used by the T at H client
> if I need to use the command line.
>
> Thanks
>
> Ed
>

Generally you don't need to use the "Get Lock" functionality. Probably the
command you're looking for is "Update". You only need to "Checkout" once,
then when you have a copy on your computer, you just perform an "Update" to
get the latest changes.

Many version control systems use an "exclusive access" model, where only one
person can work on a particular file at a time. That's where the "Get Lock"
command comes from--you lock the file so nobody else can modify it until
you're done. By default, SVN (and its predecessor, CVS) use a "non-exclusive
access" model. This means that two or more developers can work on the same
file at the same time. As long as they work on different parts of the file,
there is no problem. The first person to modify the file checks in their
changes as normal. The second person attempts to check in their changes but
is prevented because a newer version exists, so that person does an "update"
to get the changes from the first person. The software is smart enough to
merge in those changes. After merging in the changes, the second person can
check in their modifications. The automatic merging generally only works for
text files, though. But it's a good argument to "svn up" like a nervous
habit before and while you're making changes, to get the most recent updates
and avoid conflicts. Also a good argument to make your changes bite-sized
and completed over a short period of time (if possible). Ideally, a single
check-in should be related to a single logical change (i.e., "renamed varX
to varY").

Karl
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/dev/attachments/20081110/1ff88c81/attachment.html>


More information about the dev mailing list