[tmate] feature request + bug report

Hi Alexander,

Great plugin, I have to admit it entered my list of "must have" IDEA plugins. :)

Here's a feature request: could you add a background option for actions that can, potentially, take a long time? Fetching the list of pending updates is one of those actions I'd rather not wait for, especially when working with a large project. I know the result can be slightly off if I change the files while the plugin does its job, but I'm willing to live with that risk (especially since I know what I change, most of the time I'm looking for things other people changed).

Also, with the last build I failed to get a list of pending updates. The progress bar hangs at about 30% every time. I tried several times, susspecting some kind of cvs lock, but it doesn't seem to be the case. IDEA is responsive, so cancel worked every time.

Let me know if you think a thread dump might help.

Thanks,
Andrei

7 comments

Hello,

Thank you for feedback! I think I will add "run in background" option for "Pending Updates" and opposite function in "Local Changes" TMate tool window that analyzes what is changed and have to be commited.

Advantage of "Pending Updates" view is that it doesn't connect to CVS to get list of files that have to be updated, like IDEA "CVS->Check Status" do. Instead it analyzes already downloaded transactions and compares it with the local files status. Results may be not always up-to-date, but it should work faster then "Check Status", espessialy for large projects or when CVS connection is slow.

If you will make a thread dump it definitely will help a lot to solve the lock problem.

Thanks a lot for investigating the problem!
Alexander Kitaev.

0

AK> Hello,
AK>
AK> Thank you for feedback! I think I will add "run in background"
AK> option for "Pending Updates" and opposite function in "Local
AK> Changes" TMate tool window that analyzes what is changed and have to
AK> be commited.

Nice, thanks.

AK>
AK> Advantage of "Pending Updates" view is that it doesn't connect to
AK> CVS to get list of files that have to be updated, like IDEA
AK> "CVS->Check Status" do. Instead it analyzes already downloaded
AK> transactions and compares it with the local files status. Results
AK> may be not always up-to-date, but it should work faster then "Check
AK> Status", espessialy for large projects or when CVS connection is
AK> slow.

I wasn't sure you did that, I was about to suggest something along those lines. And, since you do it using the downloaded data, could you not do it in the background automatically (or at least provide an option to have it done that way) in a low priority thread? You could initiate it every time the server gets new data, and have it available when the user checks it. The same for the locally changed files, not having to wait every time you're interested in this type of information can be a nice bonus (not sure if you can somehow hook into IDEA's notification mechanism so you don't have to search, but rather be notified when something changes, but that could be a lower impact mechanism for gathering the same data).


AK>
AK> If you will make a thread dump it definitely will help a lot to
AK> solve the lock problem.

Here's an exception that occurs before the things get stuck. This might show you the problem, if you still need a thread dump just let me know. As an observation, the numeric percentage indicator near the progress bar dissapeared at some point before tmate hung, not sure if this has any relevance, though. The stack trace is from the latest build, 0.0.39.

Regards,
Andrei

java.lang.NumberFormatException: For input string: "79 locked"
at java.lang.NumberFormatException.forInputString(NumberFormatException.
java:48)
at java.lang.Integer.parseInt(Integer.java:477)
at java.lang.Integer.parseInt(Integer.java:518)
at org.tmatesoft.tmate.A.B.B.A(Unknown Source)
at org.tmatesoft.tmate.A.B.B.A(Unknown Source)
at org.tmatesoft.tmate.A.B.G.A(Unknown Source)
at org.tmatesoft.tmate.ui.window.G$4.run(Unknown Source)
at com.intellij.openapi.application.a.b.runReadAction(b.java:284)
at org.tmatesoft.tmate.ui.window.G$3.A(Unknown Source)
at org.tmatesoft.tmate.ui.A.T$1.run(Unknown Source)
at java.lang.Thread.run(Thread.java:534)
ERROR - llij.ide.plugins.PluginManager -
ERROR - llij.ide.plugins.PluginManager - IntelliJ IDEA 4.0 Build #11
78
ERROR - llij.ide.plugins.PluginManager - JDK: 1.4.2_03
ERROR - llij.ide.plugins.PluginManager - VM: Java HotSpot(TM) Client
VM
ERROR - llij.ide.plugins.PluginManager - Vendor: Sun Microsystems Inc

0

Hello,

checks it. The same for the locally changed files,
not having to wait every time you're interested in
this type of information can be a nice bonus (not
sure if you can somehow hook into IDEA's notification
mechanism so you don't have to search, but rather be
notified when something changes, but that could be a
lower impact mechanism for gathering the same data).

"Local Changes" view is already updated in the way you've described: "refresh" is required only the first time one would like to see locally modified files, then TMate starts to monitor changes made in the IDEA and updates view in background.

Things are different with the "Pending Updates" view - it refreshes quite fast (not the first time, however), but it is more complex task to update it automatically, so for now I left the manual update for it. May be later I will make it update smoothly, the same way as "Local Changes" view do.

Here's an exception that occurs before the things get
stuck. This might show you the problem, if you still

Thank you for your investigation! It indeed helped me to locate the reason of the problem and it should be fixed in TMate build #0.0.40, please let me know if it works with your project now.

Thanks,
Alexander Kitaev.

0

AK> "Local Changes" view is already updated in the way you've described:
AK> "refresh" is required only the first time one would like to see
AK> locally modified files, then TMate starts to monitor changes made in
AK> the IDEA and updates view in background.

OK, cool, I wasn't aware of the first-time-only usage of refresh.
I just tried it in the new build and here's a bug report: I have a file that I reversed to a previous version (an update with conflicts messed it badly, so I used the local history to get my local version back), and while IDEA does find it when I prepare to commit (Ctrl + K) TMate local changes window misses it. Changing it even more still doesn't make a difference, TMate won't pick it up no matter what.


AK> Thank you for your investigation! It indeed helped me to locate the
AK> reason of the problem and it should be fixed in TMate build #0.0.40,
AK> please let me know if it works with your project now.

While it doesn't hang anymore, it still doesn't work. I get an error pop-up telling me that Exception occured: For input string: "79 locked"]]>. (btw, you're missing an r in occurred). It just doesn't get past that point.

Let me know if there's something I can do to help.

Andrei

0

I just tried it in the new build and here's a bug
report: I have a file that I reversed to a previous
version (an update with conflicts messed it badly, so
I used the local history to get my local version
back), and while IDEA does find it when I prepare to
commit (Ctrl + K) TMate local changes window misses
it. Changing it even more still doesn't make a
difference, TMate won't pick it up no matter what.

Thank you for reporting the problem! It is fixed in build 0.0.41.

While it doesn't hang anymore, it still doesn't work.
I get an error pop-up telling me that
<quote>Exception occured: For input string: "79
locked"</quote>. (btw, you're missing an r in
occurred). It just doesn't get past that point.
Let me know if there's something I can do to help.

I think in build 0.0.41 it should be finally fixed. The reason of the problem is that one of your CVS/Entries file contains revision in form "/xx.xx locked by user/", and TMate failed to parse it. In the previous build I've tryed to truncate revision number looking for the first space symbol, but there is actually a tab symbol after revision, not space - now revision should be parsed correctly. If it still will not work with your project, could you please send me your CVS/Entries file that contains "locked by" symbol?

Thanks,
Alexander Kitaev.

0

Hi Alexander,

AK> I think in build 0.0.41 it should be finally fixed. The reason of
AK> the problem is that one of your CVS/Entries file contains revision
AK> in form "/xx.xx locked by user/", and TMate failed to parse it. In
AK> the previous build I've tryed to truncate revision number looking
AK> for the first space symbol, but there is actually a tab symbol after
AK> revision, not space - now revision should be parsed correctly. If it
AK> still will not work with your project, could you please send me your
AK> CVS/Entries file that contains "locked by" symbol?

It still doesn't work. :( I get the Error occurred dialog once, and then the pending updates fails silently (the dialog seems to pop-up briefly, but goes away really fast, so I'm not sure if it's the same one or some other error message).

I checked the Entries files, but was unable to find any "locked by" entry (I also searched for "locked", just to be sure, with the same results). I've done that both on my laptop and on the desktop (the server is installed on the desktop and I point to it from both IDEA installations).

Could it be that the transactions database got messed up somehow? I remember that after a TMate server update I ended up getting duplicates in the transactions lists (for the transactions that were already there at the time of update). Since the error message is the same as a week ago, it might be that some corrupted data remained in the database, I doubt someone would keep a file locked for so long (besides, it doesn't show up in my Entries on either one of the machines). How can I reset the database (short of reinstalling the tmate server)?

Thanks,
Andrei

0

Hello,

Unfortunately I didn't manage to reproduce this problem, so I've supposed that "locked by" is stored somewhere in the Entries files (the same kind of revision sometimes is reported is reported by cvs rlog command). May be incorrect revision number was downloaded from TMate server, in this case reindex may help.

To reset TMate Server you may either reindex transactions (use TMate | Administrate | Reindex All Changes in main menu) or reinstall server completely (using TMate | Administrate | Install Local Server item, then select "Reinstall", not "Upgrade" when prompted). After reindex this all the transactions should be reloaded by the client.

Alexander Kitaev.

0

Please sign in to leave a comment.