Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ TheIDE » U++ TheIDE: Other Features Wishlist and/or Bugs » TheIde doesn't detect svn properly
TheIde doesn't detect svn properly [message #40011] Sun, 26 May 2013 13:44 Go to next message
Zbych is currently offline  Zbych
Messages: 325
Registered: July 2009
Senior Member
Hi,

I don't know if it is bug or feature, but when TheIde shows this context menu:

index.php?t=getfile&id=4204&private=0

and it checks whether package has svn or not, it only scans $uppsrc and $MyApp directory. It doesn't check package directory at all. I usually have separate svn for every project and I can not synchronize my projects directly from TheIde.

  • Attachment: 38.png
    (Size: 118.96KB, Downloaded 462 times)
Re: TheIde doesn't detect svn properly [message #40018 is a reply to message #40011] Sun, 26 May 2013 18:37 Go to previous messageGo to next message
dolik.rce is currently offline  dolik.rce
Messages: 1789
Registered: August 2008
Location: Czech Republic
Ultimate Contributor

Zbych wrote on Sun, 26 May 2013 13:44

Hi,

I don't know if it is bug or feature, but when TheIde shows this context menu:

index.php?t=getfile&id=4204&private=0

and it checks whether package has svn or not, it only scans $uppsrc and $MyApp directory. It doesn't check package directory at all. I usually have separate svn for every project and I can not synchronize my projects directly from TheIde.



Hi Zbych,

As far as I can tell, TheIDE does check currently selected package (comments added for clarity):
void Ide::ProjectSvn(Bar& menu)
{
	Vector<String> w = SvnDirs();                           // returns paths nests from current assembly, e.g. MyApps and uppsrc
	String p = GetFileFolder(PackagePath(actualpackage));   // current package folder
	if(IsSvnDir(p))
		w.Insert(0, p);                                 // inserts the package folder in the top position in the menu if
                                                                // it is inside a SVN working copy
	for(int i = 0; i < w.GetCount(); i++)                   // create the actual menu items
		menu.Add("Synchronize " + w[i], IdeImg::svn_dir(), THISBACK1(SyncSvnDir, w[i]));
	menu.Add("Synchronize everything..", IdeImg::svn(), THISBACK(SyncSvn));
}


The IsSvnDir() function also seems to work properly. So, what exactly is the problem? Even in your screenshot I can see the item for syncing MultiIOTest (even though it is cropped Smile ).


Best regards,
Honza
Re: TheIde doesn't detect svn properly [message #40020 is a reply to message #40018] Sun, 26 May 2013 19:11 Go to previous messageGo to next message
Zbych is currently offline  Zbych
Messages: 325
Registered: July 2009
Senior Member
Hi Honza,

It is hard to show something invisible, that's why I created fake ".svn" directory in $MyApps, to show what part of menu is missing Smile

Regarding missing SVN menu, as far as I know TheIde calls SvnDirs().GetCount() every time context menu is opened (in Ide::Project function).
SvnDirs takes list of directories to search from UPP environment variable (GetVar("UPP")) and I don't see main package directory on this list.

I added some logs to Ide::Project, Ide::SvnDirs and GetUppDirs.

Vector<String> GetUppDirs() {
	RLOG("UPP VAR = " + GetVar("UPP"));
	return SplitDirs(GetVar("UPP"));
}

Vector<String> Ide::SvnDirs()
{
	Vector<String> d = GetUppDirs();
	Vector<String> r;
	for(int i = 0; i < d.GetCount(); i++){
		RLOG("Checking " + d[i]);
		if(IsSvnDir(d[i])){
			RLOG("SVNDIR: " + d[i]);
			r.Add(d[i]);	
		}else{
			RLOG("NOT SVNDIR: " + d[i]);
		}
	}
	return r;
}


Part of Ide::Project:

	RLOG("------- SVN ----------------");
	int c = SvnDirs().GetCount();
	RLOG(Format("Found %d svn dirs", c));
	if(c){
		if(menu.IsMenuBar())
			menu.Add("SVN", THISBACK(ProjectSvn));
		else
			menu.Add("SVN Synchronize everything..", IdeImg::svn(), THISBACK(SyncSvn));
	}


------- SVN ----------------
UPP VAR = /media/1A1890EB1890C763/workspace;/home/zbych/upp/uppsrc;
Checking /media/1A1890EB1890C763/workspace
Directory '/media/1A1890EB1890C763/workspace/.svn' doesn't exist
NOT SVNDIR: /media/1A1890EB1890C763/workspace
Checking /home/zbych/upp/uppsrc
Directory '/home/zbych/upp/uppsrc/.svn' doesn't exist
NOT SVNDIR: /home/zbych/upp/uppsrc
Found 0 svn dirs


As you can see number of returned SVNs is 0 although there is ".svn" in the main package directory.

[Updated on: Sun, 26 May 2013 19:24]

Report message to a moderator

Re: TheIde doesn't detect svn properly [message #40031 is a reply to message #40020] Mon, 27 May 2013 08:18 Go to previous messageGo to next message
dolik.rce is currently offline  dolik.rce
Messages: 1789
Registered: August 2008
Location: Czech Republic
Ultimate Contributor

Zbych wrote on Sun, 26 May 2013 19:11

It is hard to show something invisible, that's why I created fake ".svn" directory in $MyApps, to show what part of menu is missing Smile
Well, that explains my confusion Very Happy

Zbych wrote on Sun, 26 May 2013 19:11

Regarding missing SVN menu, as far as I know TheIde calls SvnDirs().GetCount() every time context menu is opened (in Ide::Project function).

Ok, now I see the problem, this sentece opened my eyes Smile It should be simple to fix. Can you try the attached patch please? It works fine for me, but I haven't tested it with your use-case... If it works well, I will commit it.

Honza
  • Attachment: svn.patch
    (Size: 1.11KB, Downloaded 229 times)
Re: TheIde doesn't detect svn properly [message #40032 is a reply to message #40031] Mon, 27 May 2013 09:32 Go to previous messageGo to next message
Zbych is currently offline  Zbych
Messages: 325
Registered: July 2009
Senior Member
Hi Honza,

Your patch works. Thank you.
I modified it a little bit to avoid double verification of package directory and Ide::SvnDirs looks like this:

Vector<String> Ide::SvnDirs()
{
	Vector<String> d = GetUppDirs();
	d.Insert(0, GetFileFolder(PackagePath(actualpackage)));

	Vector<String> r;
	for(int i = 0; i < d.GetCount(); i++)
		if(IsSvnDir(d[i]))
			r.Add(d[i]);
	return r;
}

Re: TheIde doesn't detect svn properly [message #40033 is a reply to message #40032] Mon, 27 May 2013 12:20 Go to previous messageGo to next message
dolik.rce is currently offline  dolik.rce
Messages: 1789
Registered: August 2008
Location: Czech Republic
Ultimate Contributor

Zbych wrote on Mon, 27 May 2013 09:32

I modified it a little bit to avoid double verification of package directory

Thank you for the correction. It is committed now (rev 6114).

Honza
Re: TheIde doesn't detect svn properly [message #40035 is a reply to message #40033] Mon, 27 May 2013 20:02 Go to previous messageGo to next message
Zbych is currently offline  Zbych
Messages: 325
Registered: July 2009
Senior Member
Thank you.
Re: TheIde doesn't detect svn properly [message #40043 is a reply to message #40035] Tue, 28 May 2013 09:57 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Patch is wrong for "Synchronize everything" - in my mode of operation, I now have current package in the list twice (once as part of nest, then alone).

Reverting, adding to RM...

Mirek
Re: TheIde doesn't detect svn properly [message #40046 is a reply to message #40043] Tue, 28 May 2013 12:06 Go to previous message
dolik.rce is currently offline  dolik.rce
Messages: 1789
Registered: August 2008
Location: Czech Republic
Ultimate Contributor

mirek wrote on Tue, 28 May 2013 09:57

Patch is wrong for "Synchronize everything" - in my mode of operation, I now have current package in the list twice (once as part of nest, then alone).

Reverting, adding to RM...

Mirek

Sorry about that... I'll try to find out better solution.

Weird think is that I didn't notice the problem with "the nest is a working copy" mode. Is there anything special about your directory and svn organization?

Honza
Previous Topic: TheIde crashes when there is an error in translation file
Next Topic: BUG with .lay files - 'Z's added
Goto Forum:
  


Current Time: Thu Mar 28 18:50:46 CET 2024

Total time taken to generate the page: 0.00904 seconds