propecia achat cialis precio farmacia cialis generika 20mg cialis pillen viagra liknande kamagra belgique comprar viagra barcelona cialis costo farmacia cialis laboratoire indien viagra cialis acquisto köpa viagra på nätet viagra generika 50mg costo finasteride medicamento levitra viagra market
viagra indien cialis generico 10 mg viagra farmaco generico venta viagra españa dapoxetin preis viagra avec ordonnance comprar levitra españa viagra voor vrouwen cialis vente cialis prezzo al pubblico viagra 50mg ou 100mg compresse cialis viagra reseller viagra sécurité sociale kamagra se vende en farmacias

How To Recover Deleted Subversion Branch

I recently deleted a branch from our (svn) code repository. Did you know that it’s the general recommendation to delete a branch after a merge to ensure that nobody commits to it. (see svnmerge wiki for more on that advice)

Svn checkout, svn info, etc. all fail when you try to access the deleted branch immediately:

$ HOST=https://repository.com/repos_path
$ svn log --limit=3 $HOST/portal/branches/VA1-12
svn: '/svn/repos_path/!svn/bc/8881/portal/branches/VA1-12' path not found

But the interesting thing is that we need to add a so-called peg revision, denoted by the @ after the URL:

$ svn log --limit=3 $HOST/portal/branches/VA1-12@8800

------------------------------------------------------------------------
r8774 | jronn | 2009-11-23 11:30:40 +0100 (Mon, 23 Nov 2009) | 3 lines

Max height in search results (indberetninger): 34px is 2 lines for a total of max 4 lines.

Also converted spaces to tabs and removed trailing whitespace for consistency
------------------------------------------------------------------------
r8769 | jronn | 2009-11-17 17:01:25 +0100 (Tue, 17 Nov 2009) | 1 line

Horizontal train first-shot with new image files
------------------------------------------------------------------------
r8768 | jronn | 2009-11-17 17:01:21 +0100 (Tue, 17 Nov 2009) | 1 line

Removed image files having not been used for a long time
------------------------------------------------------------------------

And to recover the deleted branch (for instance by checking out a copy):

$ svn co $HOST/portal/branches/VA1-12@8800 va112

More info on peg revisions in svn book

One Response to “How To Recover Deleted Subversion Branch”

  1. Shaun Judy Says:

    Wow! This was a real life saver for me. I had this happen to me on one of my computers and I have been on the biggest mission searching on how to fix it.

    Thanks