Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Quick Fix for subversion 1.7 #101

Merged
merged 1 commit into from
May 20, 2013
Merged

Quick Fix for subversion 1.7 #101

merged 1 commit into from
May 20, 2013

Conversation

brunob
Copy link
Contributor

@brunob brunob commented May 17, 2013

frlan added a commit that referenced this pull request May 20, 2013
Quick Fix for subversion 1.7
@frlan frlan merged commit 23fdaf9 into geany:master May 20, 2013
@brunob brunob deleted the patch-1 branch May 23, 2013 08:50
@eht16
Copy link
Member

eht16 commented Jun 1, 2013

This is nice but unfortunately not yet enough to support SVN 1.7, e.g. diff is still broken.

In http://sourceforge.net/p/geany-plugins/bugs/84/ there is another change which also re-enables diff for files, IIRC.
Frank, could that other change be merged as well?

That would be cool for us poor users who are still stuck with SVN.

@eht16
Copy link
Member

eht16 commented Jun 1, 2013

Regarding the mentioned change in the SF bug report:
a slightly better variant:

diff --git a/geanyvc/src/vc_svn.c b/geanyvc/src/vc_svn.c
index da44197..66ab451 100644
--- a/geanyvc/src/vc_svn.c
+++ b/geanyvc/src/vc_svn.c
@@ -159,6 +159,12 @@ get_base_dir(const gchar * path)
    }
    while (strcmp(base, base_prev) != 0);

+   if (base_prev == NULL)
+   {
+       /* fallback for Subversion 1.7: try to climb up the tree until we
+        * find a .svn subdirectory */
+        base_prev = find_subdir_path(path, ".svn");
+   }
    g_free(base);
    return base_prev;
 }

This should fix commit/diff and related commands for Sbversion 1.7 and retain backwards compatibility for older versions.

@brunob
Copy link
Contributor Author

brunob commented Sep 22, 2013

Thanks for this fix @eht16 :) I'm using git version of geany and geany-plugins for now and can't get any diff view, the status show that a file is modified but when i hit diff for the file from geanyvc menu i just get a message telling that nothing is modified? Do you get the same behavior form your side ?

@eht16
Copy link
Member

eht16 commented Sep 25, 2013

Hey. Not really an idea what could be wrong. For me, current Git master now works properly with Subversion 1.7, I (have to) use it at daily work.

Do you use Subversion 1.8 by chance? I don't know the details but the repository format has changed again, probably not relevant for GeanyVC but who knows.

Where is the file you tested located in the directory tree relative to the root folder containing .svn?
Do you see any relevant output in Help->Debug Messages?

Could you try to debug(either with printf statements or gdb) vc_svn.c:in_vc_svn() to check whether it finds anything and if, what?

@brunob
Copy link
Contributor Author

brunob commented Sep 26, 2013

Ok i've found the origin of the bug. Here is my case the diff return that nothing is modified if i open the file from a folder that is a symlink to the original file. If i open the same (modified) file from his original location, the diff function works.

Not sure about that, but it may come from the recent change in symlink handling in ubuntu (or nautilus).

@frlan
Copy link
Member

frlan commented Sep 26, 2013

Well.... I think it might could be caused also by the way we are handling files inside the plugin ...

@eht16
Copy link
Member

eht16 commented Sep 28, 2013

Ah, pretty obvious then:
GeanyVC uses the file path(really the path of the file, not the link target in case it is a symlink) and walk the directory tree up until it find a .svn directory but if there is no .svn because the Subversion working copy is somewhere else, GeanyVC can't find it.

I just checked and the same happens with Git. So this is rather a somewhat unrelated and more general bug. @brunob: would you mind opening a new bug report for this issue?

@brunob
Copy link
Contributor Author

brunob commented Oct 2, 2013

I'm not sure it's an issue related to geany vc cause this type of setup worked like a charm in previous ubuntu release. Since 13.04 the symlink handling has changed in nautilus : now if you open a symlink "folder" the path is the original path and not the path to the symlink. Maybe the bug comes form that ?

Anyway, i'll open a new bug if necessary.

@eht16
Copy link
Member

eht16 commented Oct 6, 2013

No idea but I doubt. GeanyVC uses normal C/POSIX functions to access the files and symlinks, I can't imagine Ubuntu changed their behaviour. The changed behaviour in Nautilus is probably only in the graphical interface and so rather unrelated. Though, this is just guessing, I don't use Ubuntu.

@brunob
Copy link
Contributor Author

brunob commented Oct 7, 2013

@eht16 i've tried to open a new bug report but issues are not available on this repo and i can't open a pull request cause i don't have any fix for this bug.

@eht16
Copy link
Member

eht16 commented Oct 10, 2013

@brunob please open it at http://sourceforge.net/p/geany-plugins/bugs/. Thanks.

@brunob
Copy link
Contributor Author

brunob commented Oct 15, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants