[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Commit lands in unexpected repository path

From: Ulrich Eckhardt <ulrich.eckhardt_at_dominolaser.com>
Date: Wed, 30 Mar 2011 11:02:47 +0200

On Wednesday 30 March 2011, Ben Allen wrote:
> We keep a repository of the source code that we get for libraries provided
> to us by vendors. Our team member responsible for integrating new code
> drops from the vendor is still learning how to use Subversion properly, and
> he did something unexpected and ran into a curious problem.
>
> The user created a new folder and checked out the source tree from the
> repository. He then went through the process of manually integrating a new
> build from the vendor (adding new files, merging in changes, etc).

There is a tool for that, it's called svn_load_dirs. Use this, it saves
immense amounts of time, even though its use is a bit complicated (or maybe
that's just me who doesn't use it too often).

> After completing this process, he noticed that he had accidentally done his
> checkout from a tag and not from the trunk. Integrating a vendor drop
> requires a lot of time and manual effort, so he wasn't too keen on doing a
> fresh checkout from /trunk and re-doing the integration process.

In that case, I'd suggest the use of "switch", which changes the base for a WC
to a different location, migrating local changes along. This can of course
lead to merge conflicts, so backing up is recommended.

> Instead, he did a /trunk checkout into a separate folder, then deleted the
> contents of the folder (using Windows Explorer and the delete key) and
> copy/pasted the source tree from his tag-based working copy into the
> trunk-based working copy's folder[...]. He then opened the TortoiseSVN
> commit dialog and noticed that the "Commit to" URL indicated that he
> would be committing to /trunk. However, the Subversion log shows
> that the commit was actually made to the tag from which the original source
> was checked out.

You made a mistake copying over the data, as you already analysed yourself.
Every WC contains hidden .svn directories that SVN uses in order to make the
connection between a directory in the WC and the according location in the
repository. Since you copied over the whole content, you also overwrote these
folders. Maybe you missed the one in the root of the WC, which would confuse
SVN even more (in particular it indicates that the WC points to a different
location that the folders therein).

> I would expect that working with a cobbled-together working copy like this
> would cause problems. However, I was surprised that Tortoise didn't give
> any kind of indication that anything was out of the ordinary.

Every child dir of a WC is its own WC. Also, you can e.g. switch parts of a WC
to a different URL or revision, so the whole tree can be heterogeneous in
several aspects.

> Would it be possible for the commit dialog to check all selected files for
> inconsistent metadata like this and throw an error? If nothing else, at
> least give some kind of visual indicator that all of the files won't
> necessarily be committed to the URL listed in the "Commit to" field.

I don't think this is going to happen. For one reason, the heterogeneous WCs
are an intended feature. The other reason, SVN 1.7 will change the WC format
to one where the whole metadata is stored in a single location and not every
child dir is a WC on its own, so such mistakes will occur less often.

Good luck!

Uli

-- 
ML: http://tortoisesvn.tigris.org/list_etiquette.html
FAQ: http://tortoisesvn.net/faq
**************************************************************************************
Domino Laser GmbH, Fangdieckstra�e 75a, 22547 Hamburg, Deutschland
Gesch�ftsf�hrer: Thorsten F�cking, Amtsgericht Hamburg HR B62 932
**************************************************************************************
Visit our website at http://www.dominolaser.com
**************************************************************************************
Diese E-Mail einschlie�lich s�mtlicher Anh�nge ist nur f�r den Adressaten bestimmt und kann vertrauliche Informationen enthalten. Bitte benachrichtigen Sie den Absender umgehend, falls Sie nicht der beabsichtigte Empf�nger sein sollten. Die E-Mail ist in diesem Fall zu l�schen und darf weder gelesen, weitergeleitet, ver�ffentlicht oder anderweitig benutzt werden.
E-Mails k�nnen durch Dritte gelesen werden und Viren sowie nichtautorisierte �nderungen enthalten. Domino Laser GmbH ist f�r diese Folgen nicht verantwortlich.
**************************************************************************************
------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=2715227
To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_tortoisesvn.tigris.org].
Received on 2011-03-30 11:00:31 CEST

This is an archived mail posted to the TortoiseSVN Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.