Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game. |
| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
12-23-2010, 02:49 AM
|
#1
|
|
LQ Newbie
Registered: Dec 2010
Posts: 5
Rep:
|
How to delete particular revision of file from SVN Repos
Hi All,
I am using Subversion version1.2 and need one favour. I have written code to delete particular revision from SVN Repository. Unfortunately, i couldn't delete particular version from repository. Any one can response me.. how to delete?
public void deleteDocRevision(String collDir, String fileName, Long revNum)
throws SVNException {
if (logger.isDebugEnabled()) {
logger.debug("deleteDocRevision(String, String, Long) - start"); //$NON-NLS-1$
}
String path = this.getPath() + "/" + DOC_COLL_FOLDER_NAME;
path = path + "/" + collDir;
String filePath = path + "/" + fileName;
SVNNodeKind kind = this.getTheRepository().checkPath(filePath, revNum);
if (kind == SVNNodeKind.NONE) {
SVNErrorMessage message = SVNErrorMessage.create(
SVNErrorCode.BAD_FILENAME, filePath + " Not found");
throw new SVNException(message);
}
try {
ISVNEditor editor = this.getTheRepository().getCommitEditor(
"file deleted", null);
editor.openRoot(-1);
editor.deleteEntry(filePath, revNum);
editor.closeDir();
editor.closeEdit();
} catch (Exception e) {
logger.error("deleteDocRevision(String, String, Long)", e); //$NON-NLS-1$
e.printStackTrace();
}
if (logger.isDebugEnabled()) {
logger.debug("deleteDocRevision(String, String, Long) - end"); //$NON-NLS-1$
}
}
Can you help me? Thanks in advance..
Last edited by stsivaraj; 01-14-2011 at 12:09 AM.
|
|
|
|
12-23-2010, 07:31 AM
|
#2
|
|
Moderator
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 42,682
|
Merely saying 'it didn't work' and dumping some raw code is not a good way to get help. What happens? In what way did it not work? Any error messages you're keeping secret from us?
|
|
|
|
12-27-2010, 10:30 PM
|
#3
|
|
LQ Newbie
Registered: Dec 2010
Posts: 5
Original Poster
Rep:
|
Upgrade
Quote:
Originally Posted by acid_kewpie
Merely saying 'it didn't work' and dumping some raw code is not a good way to get help. What happens? In what way did it not work? Any error messages you're keeping secret from us?
|
Hi Chirs,
There is no error i was getting at the moment. I think, i have to upgrade my svn kit version.
|
|
|
|
12-28-2010, 12:34 AM
|
#4
|
|
Senior Member
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 3,653
|
http://subversion.apache.org/faq.html#removal
BTW, why would you want to do this, and why are you writing a Java program to do it?
Last edited by dugan; 12-28-2010 at 12:53 AM.
|
|
|
|
01-10-2011, 12:16 AM
|
#5
|
|
LQ Newbie
Registered: Dec 2010
Posts: 5
Original Poster
Rep:
|
I have situation to delete throug the SVN API(Java Code)
Quote:
Originally Posted by dugan
|
Hi,
Thanks for your reply at all. I have situation to delete throug the SVN API(Java Code)
|
|
|
|
01-10-2011, 01:00 AM
|
#6
|
|
LQ Newbie
Registered: Dec 2010
Posts: 5
Original Poster
Rep:
|
Can i delete particular revision from SVN Repository using java code?
Hi,
I have one situation to delete particular revision of file from SVN repository. Am using tmatesoft svn.
Thanks in advance..
|
|
|
|
01-10-2011, 10:59 PM
|
#7
|
|
LQ Newbie
Registered: Dec 2010
Posts: 5
Original Poster
Rep:
|
While deleting the revision i am getting this error...
Quote:
Originally Posted by stsivaraj
Hi,
I have one situation to delete particular revision of file from SVN repository. Am using tmatesoft svn.
Thanks in advance..
|
Hi,
I have one situation to delete particular revision from SVN repository. So, am getting this error.
org.tmatesoft.svn.core.SVNException: svn: Item '/cixAdmin/docColl/344/Enhancements List.ods' is out of date
svn: DELETE of '/svn-repos/cixAdmin/!svn/wrk/2d60616f-2d01-0010-9029-cb9e00ce62c0/cixAdmin/docColl/344/Enhancements%20List.ods': 409 Conflict ( http://efycaci.stg.com)
and
org.tmatesoft.svn.core.SVNException: svn: File or directory '/cixAdmin/docColl/344/Enhancements%20List.ods' is out of date; try updating
svn: The version resource does not correspond to the resource within the transaction. Either the requested version resource is out of date (needs to be updated), or the requested version resource is newer than the transaction root (restart the commit).
svn: CHECKOUT of '/svn-repos/cixAdmin/!svn/ver/13050/cixAdmin/docColl/344/Enhancements%20List.ods': 409 Conflict ( http://efycaci.stg.com)
I have pasted my code in this cyclic mail(at top). Is it possible to delete revision from repository?
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 02:15 PM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|