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

Commit lands in unexpected repository path

From: Ben Allen <ben.allen_at_gmail.com>
Date: Tue, 29 Mar 2011 19:44:26 -0500

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). 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. 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 (this was a habit based on our old integration procedures from
when we used VSS {{shudder}}). 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.

I believe what happened is that when he deleted the contents of his
/trunk-based WC, he didn't have "Show hidden folders" enabled in Explorer
and thus didn't delete the Subversion metadata for that folder. When he
copied in the source tree from his /tag-based WC, he brought in the metadata
with it. When TortoiseSVN loaded the "Commit" dialog, it looked at the
metadata for the folder that was right-clicked on, saw that it was checked
out from /trunk, and displayed /trunk in the "Commit to" field. However,
the actual commit operation looked at the metadata for the entire source
tree, thus sending the actual commit to the tag.

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. 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.

This behavior was observed while using TortoiseSVN v1.6.15 on Windows XP.

-Ben

------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=2715119

To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_tortoisesvn.tigris.org].
Received on 2011-03-30 03:38:01 CEST

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