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

Re: How to import

From: Thorsten Schöning <tschoening_at_am-soft.de>
Date: Mon, 23 Jul 2012 23:38:39 +0200

Guten Tag John Maher,
am Montag, 23. Juli 2012 um 21:22 schrieben Sie:

> @Thorsten: Thanks for taking the time to respond, I do appreciate it, I
> should provide more background. I did use tortoise. Then I lost a
> bunch of source code trying to do a merge probably because I didn't know
> what I was doing.

If you really only merged or more specific did "something" within
Subversion, nothing was lost. It may just seem so due to a lack of
basic knowledge, but especially with Tortoise it is really easy to get
everythign back if you only have 3 revisions.

> I started with version 1. Branched for version 2.
> Enhanced version 1 then merged to version 2 and somehow killed the
> enhanced version 1.

Not with a merge from 1 to 2, you must hjave done something else, too,
like deleting, merging 2 back to 1 or stuff like that. But again,
nothing to worry about, just open the log in Tortoise for your
problematic directory and see what actually has been done. Afterwards
right click in the log on the revisions you want to revert and revert
them.

> All I could get was old version 1 or new version 2
> in effect prohibiting any more enhancements to version 1 (I didn't want
> to dig through version 2 to find the changes and put them back in
> version 1 with the release of version 2 so close).

May it be that you didn't commit your enhancements in version 1, which
would have resulted in version 3, which should get merged as version 4
into version 2. But in this case there wouldn't be anything to merge
at all, because you didn't change anything. In fact, you should have
reverted your working copy/enhancements to version 1 manually and
Tortoise should have even warned you about that, I think.

> I have now completed
> version 2 and would like to get it under source code control without any
> code loss. That is why I wished to learn the command line version, it
> seems knowing how the CLI works will tell me how svn works better than a
> third party product. Am I right or wrong?

In my personal opinion I don' think this is correct. What you need to
know are the basics, what is an import, how to create a repository,
what is a commit, merge, how to revert changes etc. The CLI command
for doing that is just unnecessary implementation detail, as for
example Tortoise provides all those operations, only named
differently, but if you read about the basics it's easy to map
Tortoise names to svn operations.

> Besides the book that I am
> reading only mentions command line options so it is incompatible with
> anything else. To top it off, I can get clarifications for the CLI here
> but the support for the other products stinks.

Subversion is Open Source, you can't really expect the developers to
document each and any third party client which is out there. They
provide a default implementation for a client, document it and more
important the basis concepts of how to use Subversion and the rest is
of course up to reader's abstraction skills. ;-)

> Thanks for the link
> http://en.wikipedia.org/wiki/Uniform_resource_locator, however it
> indicates the problem I was trying to resolve earlier. Wikipedia claims
> a URL points to a resource on the internet. We don't store our
> repository on the internet. We store it on our intranet.

It's all about the basics... What's the technical difference between
"the Internet" and your intranet? There isn't any, it's all about
protocols and standards. URLs are standards and how they are used ca
differ in many ways. Even smartphones use URLs to be able to call
people.

> So either we
> can't use the command line to import files, which seems unlikely. Or
> svn uses the term URL differently than Wikipedia, very likely.

There's always one more possibility: One itself doesn't understand the
problem properly and this is the case with your problem. You just
don't know what an URL is or is used for.

> I have
> seen numerous instances where different sources use terms differently.
> What does the svn book
> (http://svnbook.red-bean.com/en/1.7/svn-book.pdf)
> mean when it uses the term?

It means what Wikipedia describes.

> Actually I don't need to create a directory, I need to create a
> repository.

It's all about background and basics than. ;-)

> Looking at the server now it looks like we have a separate
> repository for each project with folders such as branches, tags and
> files stored in the root so we can't use a repository for more than 1
> project. Is this incorrect?

No, having one repository per project with tags, branches and trunk is
common sense and in most cases I prefer this setup.

> So it looks like I need to create a
> repository before the import.

Didn't you say you already had "something" with version 1 and 2 where
you did your mistakes? Sounds to me you could import in to that repo,
too.

> I issued "svnadmin create" to make a new
> repository, and it succeeded but only when issued when the current
> directory was the repository directory.

I don't understand what you mean with that. You need an empty
directory or svnadmin create will create a new one for you, depending
on how and where it is called.

> Actually it appears to succede
> anywhere, but I doubt the folders it creates are useable if they are not
> on the server. Import still fails though. See below.

Basics again: Repos can be anywhere, how one like you access them is
completely different question and solvable in many ways.

> @Andy: Thanks for replying, but we do have a proper server set up using
> VisualSVN Server.

If you know that, why do do you try to import to UNC file names? Why
not just use "something" you used for checkout etc.? svn can even tell
you the URLs of your current repos from within any wirking copy and it
will show you something like http://...

svn help info

> But the problem remains. Also I would like to point
> out that it is not helpful to use a word in its own definition: A URL is
> always a properly-formed URL. That doesn't tell me much. Care to
> claify?

Reread the Wikipedia article and it's links and think of something
like http://www.heise.de.

> Realizing I needed a new repository, I issued:
> svnadmin create iERP85_v2 WORKED!!

There's not much room for not working. ;-)

> svn import "g:/code/intuitive projects/projects"
> file://Vm006/Repositories/iERP85_v2

This file URL is only valid if you have a Vm006 host exporting some
file shares.

http://blogs.msdn.com/b/ie/archive/2006/12/06/file-uris-in-windows.aspx

> svn import "g:/code/intuitive projects/projects"
> svn://Vm006/Repositories/iERP85_v2

svn is a specific protocol only supported when svnserve is running,
which is something whoever set up your repos should tell you.

> svn import "g:/code/intuitive projects/projects"
> http://Vm006/Repositories/iERP85_v2

Is Vm0006 a valid host name and doe sit serve repos with VisualSVN?

> All fail with "Could not use external editor to fetch log message;
> consider setting the $SVN_EDITOR environment variable or using the
> --message (-m) or --file (-F) options"

Because you made an operation which requires a log message, but didn't
provide one. The client does some magic in those cases, which simply
failed because of the stated reasons.

> It appears that the import command has an undocumented required
> parameter, or something else is wrong, because when I provide the
> parameter I get different errors.

There's nothing undocumented, the parameter stated above are described
in the book and common amongst different operations.

> import "g:/code/intuitive projects/projects" file://Vm006/Repositories/i
> erp_v2 -m "JPM"
> svn: E180001: Unable to connect to a repository at URL
> 'file://vm006/Repositories/ierp_v2'
> svn: E180001: Unable to open an ra_local session to URL
> svn: E180001: Unable to open repository
> 'file://vm006/Repositories/ierp_v2'

The repo name is wrong, your created iERP85_v2.

> import "g:/code/intuitive projects/projects" svn://Vm006/Repositories/iE
> RP85_v2 -m "JPM"
> svn: E730060: Unable to connect to a repository at URL
> 'svn://vm006/Repositories/iERP85_v2'
> svn: E730060: Can't connect to host 'vm006': A connection attempt failed
> because the connected party did not properly respond after a period of
> time, or established connection failed because connected host has failed
> to respond.

Vm0067 doesn't run svserver or it's not accessible from your client,
which may be possible depending on firewalls and all that stuff. But
it's unlikely in your case, of course.

> import "g:/code/intuitive projects/projects" http://Vm006/Repositories/i
> ERP85_v2 -m "JPM"
> svn: E175002: Unable to connect to a repository at URL
> 'http://vm006/Repositories/iERP85_v2'
> svn: E175002: OPTIONS of 'http://vm006/Repositories/iERP85_v2': could
> not connect to server (http://vm006)

Does Vm006 run VisualSVN?

Mit freundlichen Grüßen,

Thorsten Schöning

-- 
Thorsten Schöning       E-Mail:Thorsten.Schoening_at_AM-SoFT.de
AM-SoFT IT-Systeme      http://www.AM-SoFT.de/
Telefon.............030-2 1001-310
Fax...............05151-  9468- 88
Mobil..............0178-8 9468- 04
AM-SoFT GmbH IT-Systeme, Brandenburger Str. 7c, 31789 Hameln
AG Hanover HRB 207 694 - Geschäftsführer: Andreas Muchow
Received on 2012-07-23 23:39:15 CEST

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

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