Can't commit both x and y, as they both refer to the same URL

261 views
Skip to first unread message

derefed

unread,
Sep 14, 2008, 6:18:22 PM9/14/08
to us...@tortoisesvn.tigris.org

I'm trying to set up a repository for my Java project which has the following
directory structure:

Project
-bin
-doc
-src

Where the "bin" subdir has the same subdir structure as "src", only the
files are the compiled versions. When creating a fresh repository and adding
everything in Project and then committing everything, I get an error like
"Can't commit both file x and file y, as they both refer to the same URL",
and it's always a file of the same name (save the extension), one from "bin"
and one from "src".

After searching the web a bit, I found that the usual cause of this is when
someone copies an SVN directory manually without using "svn copy". This
isn't the case here, as this is a fresh repository committal. I also found
that running "svn info" on the directories in question can give more info.
After trying this, it would appear that both Project/bin and Project/src DO
point to the same URL on the SVN server, Project/src. I never set it up this
way, however. Even when I make a new rep to try it all over again and add
them separately, the URLs eventually end up pointing back to the same thing
again between when I add and commit the files.

Could this be a setting in TortoiseSVN that's overriding basic SVN behavior?
How can I disable it? Also, how can I change those URLs now so that they
point to the right places, i.e., Project/bin -> Project/bin and Project/src
-> Project/src?

Thanks.
--
View this message in context: http://www.nabble.com/Can%27t-commit-both-x-and-y%2C-as-they-both-refer-to-the-same-URL-tp19485030p19485030.html
Sent from the tortoisesvn - users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-un...@tortoisesvn.tigris.org
For additional commands, e-mail: users...@tortoisesvn.tigris.org

Simon Large

unread,
Sep 14, 2008, 6:40:40 PM9/14/08
to us...@tortoisesvn.tigris.org
2008/9/14 derefed <sp...@ultimatejourney.net>:

Certainly not a setting in TSVN. Where would be the sense in that?
Please can you try to reproduce this with the Subversion command line
client.

Do you have any shortcuts or links in your project which might cause this?

Simon

--
: ___
: oo // \\ "De Chelonian Mobile"
: (_,\/ \_/ \ TortoiseSVN
: \ \_/_\_/> The coolest Interface to (Sub)Version Control
: /_/ \_\ http://tortoisesvn.net

derefed

unread,
Sep 14, 2008, 7:06:27 PM9/14/08
to us...@tortoisesvn.tigris.org

Perhaps to streamline the adding of projects like this by circumventing the
"bin" folder? I have no idea.

Not sure how I would reproduce it with the command line tool, but what I did
was really quite simple:
- Right clicked on the "Project" folder and selected "Add...", and with
everything selected, hit "OK"
- Right clicked on "Project" again and hit "Commit"

> Do you have any shortcuts or links in your project which might cause this?
>

No. It's a very simple project at this point, and unless Eclipse is doing
something weird (which I very much doubt, as I've successfully committed
full Eclipse projects before), then there should be nothing of the sort.

Remember that "bin" and "src", when examined under "svn info", display the
same repository URL. Is there a way to simply change this value somewhere?
--
View this message in context: http://www.nabble.com/Can%27t-commit-both-x-and-y%2C-as-they-both-refer-to-the-same-URL-tp19485030p19485310.html


Sent from the tortoisesvn - users mailing list archive at Nabble.com.

Milen A. Radev

unread,
Sep 14, 2008, 7:52:55 PM9/14/08
to us...@tortoisesvn.tigris.org
2008/9/15 derefed <sp...@ultimatejourney.net>:


Most probably the build tool you use copies everything unknown to it
from the src directory to the bin one. And that includes the ".svn"
subdirectory.
Check the build tool's settings.


--
Milen A. Radev

derefed

unread,
Sep 14, 2008, 7:58:28 PM9/14/08
to us...@tortoisesvn.tigris.org

Sounds plausible... however, all this repository setup / commital was done
after compilation and so forth, so the build tool had already done its work
before the .svn subdirectories had even been created.

--
View this message in context: http://www.nabble.com/Can%27t-commit-both-x-and-y%2C-as-they-both-refer-to-the-same-URL-tp19485030p19485620.html


Sent from the tortoisesvn - users mailing list archive at Nabble.com.

derefed

unread,
Sep 15, 2008, 2:15:32 AM9/15/08
to us...@tortoisesvn.tigris.org


>
>
>> Do you have any shortcuts or links in your project which might cause
>> this?
>>
>
> No. It's a very simple project at this point, and unless Eclipse is doing
> something weird (which I very much doubt, as I've successfully committed
> full Eclipse projects before), then there should be nothing of the sort.
>
> Remember that "bin" and "src", when examined under "svn info", display the
> same repository URL. Is there a way to simply change this value somewhere?
>

Okay, now I'm starting to think that this could be the problem. I've been
playing around with it a little, and it turns out that, when starting from a
fresh repository, simply adding JUST the "/src" directory ends up somehow
adding "/bin" as well. That is, I right-click and "Add..." on "/src" and
suddenly the little red "changes made" icon appears on BOTH "/src" and
"/bin".

So if there are links/shortcuts from "/src" to "/bin" somewhere, how could I
find them? There's only .java files within "/src", so I'm not sure how this
is possible.
--
View this message in context: http://www.nabble.com/Can%27t-commit-both-x-and-y%2C-as-they-both-refer-to-the-same-URL-tp19485030p19487702.html

derefed

unread,
Sep 15, 2008, 2:21:05 AM9/15/08
to us...@tortoisesvn.tigris.org

Okay, problem solved.

Looks like you were right. Though the build was done prior to the commit,
Eclipse was still open while the project files open, which I guess was
enough to make it do weird stuff to the directories/files.

Thanks, everyone, for your quick responses!
--
View this message in context: http://www.nabble.com/Can%27t-commit-both-x-and-y%2C-as-they-both-refer-to-the-same-URL-tp19485030p19487733.html


Sent from the tortoisesvn - users mailing list archive at Nabble.com.

Tom Blough

unread,
Sep 15, 2008, 5:43:15 AM9/15/08
to us...@tortoisesvn.tigris.org
> From: derefed [mailto:sp...@ultimatejourney.net]
<snip>

> Looks like you were right. Though the build was done prior to
> the commit, Eclipse was still open while the project files
> open, which I guess was enough to make it do weird stuff to
> the directories/files.

Since the all the /bin files are generated, why version them in the first
place? Just add /bin to your ignore list.

Regards,


Tom

Kurt Pruenner

unread,
Sep 15, 2008, 6:12:29 AM9/15/08
to us...@tortoisesvn.tigris.org
Tom Blough wrote:
>> From: derefed [mailto:sp...@ultimatejourney.net]
> <snip>
>> Looks like you were right. Though the build was done prior to
>> the commit, Eclipse was still open while the project files
>> open, which I guess was enough to make it do weird stuff to
>> the directories/files.
>
> Since the all the /bin files are generated, why version them in the first
> place? Just add /bin to your ignore list.

That doesn't work (or help) if Eclipse insists on copying the hidden
.svn folders from the src tree to the bin directory, as the SVN
libraries will then think the corresponding directory in src was checked
out into the bin tree (with files missing or having been changed), so an
ignore won't even be considered...

The solution is to either define a rule in Eclipse to just leave the
.svn directories alone (and especially not copy them to the bin folder)
or to install Subclipse which will do that automatically.

--
Kurt Bernhard Pruenner --- Haendelstrasse 17 --- 4020 Linz --- Austria
.......It might be written "Mindfuck", but it's spelt "L-A-I-N".......

Andy Levy

unread,
Sep 15, 2008, 8:16:16 AM9/15/08
to us...@tortoisesvn.tigris.org
On Mon, Sep 15, 2008 at 06:12, Kurt Pruenner <le...@gmx.at> wrote:
> Tom Blough wrote:
>>> From: derefed [mailto:sp...@ultimatejourney.net]
>> <snip>
>>> Looks like you were right. Though the build was done prior to
>>> the commit, Eclipse was still open while the project files
>>> open, which I guess was enough to make it do weird stuff to
>>> the directories/files.
>>
>> Since the all the /bin files are generated, why version them in the first
>> place? Just add /bin to your ignore list.
>
> That doesn't work (or help) if Eclipse insists on copying the hidden
> .svn folders from the src tree to the bin directory, as the SVN
> libraries will then think the corresponding directory in src was checked
> out into the bin tree (with files missing or having been changed), so an
> ignore won't even be considered...
>
> The solution is to either define a rule in Eclipse to just leave the
> .svn directories alone (and especially not copy them to the bin folder)
> or to install Subclipse which will do that automatically.

If you're using Subversion and Eclipse, installing Subclipse is far
and away the best option. Yes, you can use TSVN outside Eclipse for
handling the Subversion stuff, but why do that when you can do it all
within your IDE?

Reply all
Reply to author
Forward
0 new messages