Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I eventually discovered what I was looking for after many hours of searching. Unfortunately since I have less than 100 rep. I have been unable to post until now....</p> <p>I am making a little progress on this. I randomly stumbled upon this while pouring through eclipse source code.</p> <p>The following code snippet monitors everything that goes on with regard to an svn enabled project. If you save a file, to an update, revert etc. Anything that touches the files or meta data of the files. I just print out the file/direcory name and its revision number.</p> <p><strong>Subversive version:</strong></p> <pre><code>final Subscriber subscriber = UpdateSubscriber.instance(); subscriber.addListener(new ISubscriberChangeListener() { @Override public void subscriberResourceChanged(ISubscriberChangeEvent[] events) { for(ISubscriberChangeEvent event : events) { UpdateSyncInfo info = (UpdateSyncInfo) subscriber.getSyncInfo(event.getResource()); System.out.println(event.getResource().getName()+" revision: "+uInfo.getLocalResource().getRevision()); } } }); </code></pre> <p>The real trick was figuring out the entry point to get at this information: UpdateSubscriber. It would be nice if there was a good resource for finding out this sort of information.</p> <p><strong>Subclipse version:</strong></p> <pre><code>private static final Subscriber subscriber = SVNWorkspaceSubscriber.getInstance(); private static final ISubscriberChangeListener subsciberListener = new ISubscriberChangeListener() { @Override public void subscriberResourceChanged(ISubscriberChangeEvent[] events) { try { for (ISubscriberChangeEvent event : events) { SVNStatusSyncInfo info = (SVNStatusSyncInfo) subscriber.getSyncInfo(event.getResource()); System.out.println(event.getResource().getName() + " revision: " + info.getRepositoryRevision()); } } catch (TeamException e) { } } }; @Override public void start(BundleContext context) throws Exception { super.start(context); subscriber.addListener(subsciberListener); } @Override public void stop(BundleContext context) throws Exception { subscriber.removeListener(subsciberListener); super.stop(context); } </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload