Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [stellation-res] Eclipse Client Load Revision (Checkout)

On Tue, 2002-12-24 at 19:36, Jeffrey Howard wrote:
> Hi there,
> 
> Hopefully you're all on vacation by now.  :)

Two out of the three of us are Jewish, so the fact that it's Christmas
week isn't such a big deal. The only thing special about this week for
me is that my daughter's daycare is closed, so my wife and I need to
stay home with her. I'm working as I have time around taking care
of her.

>  I have a question based
> on working with the Eclipse client feature for when you get back.  I
> understand that publishing changes out to other branches is not yet
> implemented.  In my toy project, I have some work in my sandbox branch
> that I want to publish to the main branch.  From reading the
> documentation for the command line tools, I gather I can achieve this
> effect by checking out the main branch and then merging from the
> sandbox into the main branch.

Pretty much, yes. It should be easier than that, but we haven't built
expicit command-line support for the public operation, so you need to
do it manually like that.

> I think I ran into a bug when trying to check out a branch (in the
> Eclipse right-click menu, the action is called "Load Revision").  The
> action returns without displaying a dialog box of any kind.  A
> NoSuchElement exception is thrown by the StringTokenizer.nextToken()
> call in the ScmFacade.getBranchItems() method.  (I'd provide the stack
> trace, but I have a few debugging statements in there now that would
> throw off the line references.)
> 
> The relevant segment of code is around line 412 or so of ScmFacade.
> There is a loop while (versionIter.hasNext()) which invokes the
> StingTokenizer's nextToken() method on a String of version information
> retrieved from the server.  The delimiter being used to tokenize is
> the tab character '\t'.
> 
> When I look at the debug log produced by the server, the VersionString
> looks in order:
> 
> <VersionString string="My Project Name	jhoward-sandbox	0	jhoward	Mon Dec 23 18:18:38 EST 2002" />
> 
> But when I print altered the in ScmFacade to print out the string just
> before it's tokenized, the tabs have been replaced by spaces.  Thus
> the tokenizer only sees one (long) token and throws a
> NoSuchElementException when the attempt is made to retrieve more
> tokens.

Yeah, that looks like the problem all right. Jim has been debugging
mainly against LocalHandle's, rather than against a live server. This
will work fine that way, but not so well against the server.

The underlying problem here is that most of the current eclipse plugin
was written by trying to wrap the CLI code in an Eclipse facade. And
that really wasn't the right way to do it - it leads to very brittle
code, with tons of potential gotchas like this. That's why his latest
work has been to stop working off of the CLI workspace, and build a
totally independent Eclipse client layer. In the new code, it doesn't
try to parse the output of the CLI "list versions" command: it gets a
BranchSpecList directly from the repository. But that new code isn't
finished yet. So it doesn't get it right.

I think that I can fix this by making some changes to the server to make
sure that the tabs get preserved. If you toss a bug report into
bugzilla, it'll get into my work queue.

	-Mark

-- 
Mark Craig Chu-Carroll,  IBM T.J. Watson Research Center  
*** The Stellation project: Advanced SCM for Collaboration
***		http://www.eclipse.org/stellation
*** Work Email: mcc@xxxxxxxxxxxxxx  ------- Personal Email: markcc@xxxxxxxxxxx




Back to the top