Getting back to an old revision in SVN

467

To "revert" to rev. 4, try the following commands:

svn merge -r:14:4 http://my.repository.com/my/project/trunk
svn commit -m "Reverted to revision 4."

Source: http://svnbook.red-bean.com/en/1.7/svn.branchmerge.basicmerging.html#svn.branchmerge.basicmerging.undo

Share:
467

Related videos on Youtube

1dolinski
Author by

1dolinski

Updated on September 18, 2022

Comments

  • 1dolinski
    1dolinski over 1 year

    I've added a NavigationBar to my share extension. When the NavigationView is added an extra space appears the top (image below).

    Other answers have suggested to remove the NavigationView.. without it the NavigationView the bar does not show.

    How can I remove this space while keeping the NavigationBar?

    class ShareViewController: UIViewController {    
        override func viewWillAppear(_ animated: Bool) {
            navigationController?.navigationBar.setBackgroundImage(UIImage(), for: .default)
            navigationController?.navigationBar.shadowImage = UIImage()
            navigationController?.navigationBar.isTranslucent = true
        }
        
        override func viewDidLoad() {
            super.viewDidLoad()
            
            self.view.backgroundColor = .white
    
            let vc = UIHostingController(rootView: TempView())
    
            self.addChild(vc)
            self.view.addSubview(vc.view)
            vc.didMove(toParent: self)
            vc.view.translatesAutoresizingMaskIntoConstraints = false
            
            vc.view.topAnchor.constraint(equalTo: self.view.topAnchor).isActive = true
            vc.view.bottomAnchor.constraint(equalTo: self.view.bottomAnchor).isActive = true
            vc.view.leftAnchor.constraint(equalTo: self.view.leftAnchor).isActive = true
            vc.view.rightAnchor.constraint(equalTo: self.view.rightAnchor).isActive = true
            vc.view.heightAnchor.constraint(equalTo: self.view.heightAnchor).isActive = true
            vc.view.centerYAnchor.constraint(equalTo: self.view.centerYAnchor).isActive = true
            vc.view.backgroundColor = UIColor.clear        
        }
    }
    
    import SwiftUI
    
    struct TempView : View {
        var body: some View {
            NavigationView {
                VStack {
                    Text("Ok")
                    Spacer()
                }
                .navigationBarTitle("Title", displayMode: .inline)
                .edgesIgnoringSafeArea(.top)
                .navigationBarItems(
                  leading:
                    Text("Close"),
                  trailing:
                    Text("Next")
                )
            }
        }
    }
    
    

    Extra Navigation Bar Space

    • Arronical
      Arronical almost 9 years
      What client software do you use?
    • kaka
      kaka almost 9 years
      No client I think. I do all per command line.
    • Asperi
      Asperi over 3 years
      If you use SwiftUI NavigationView you should not set UINavigationBar via UIKit, they are not combined. Instead either use only NavigationView or try to modify UINavigationBar.appearance() before showing NavigationView.
    • 1dolinski
      1dolinski over 3 years
      @Asperi Thanks for the quick response. Interesting, if I clear the viewWillAppear and add in navigationController?.navigationBar.height = true then the SwiftUI NavigationView bar appropriately doesn't have the space. However, if I link to another view then the bar unfortunately does not appear.
  • kaka
    kaka almost 9 years
    I do not want to change anything in the repository (server). I just want to work with revision 4 in my working directory. Should I use only: svn merge -r:14:4 my.repository.com/my/project/trunk without commit?
  • kaka
    kaka almost 9 years
    Thxs for you answer. I got it. With svn update -r 4 works. I do not know why it did not work before.
  • Velkan
    Velkan almost 9 years
    You know that you can use git as an svn client locally, right?
  • kaka
    kaka almost 9 years
    Yes @Velkan. The point is that we have our own servers.
  • Velkan
    Velkan almost 9 years
    The original question is not about the servers, but about the working folder. And the svn client is not the right tool for managing your working folder nowadays.
  • Arronical
    Arronical almost 9 years
    Why is that @Velkan?
  • Velkan
    Velkan almost 9 years
    Because git client is compatible with svn server. Git is better supported, used by more people, has very important features like 'rebase'. It's a bit off topic, just some information about what is considered obsolete, what is industry standard and how painlessly move towards the standard.
  • 1dolinski
    1dolinski over 3 years
    Thanks for commenting, if you take out the NavigationView the bar does not show..
  • Carlos Maria Caraccia
    Carlos Maria Caraccia over 3 years
    Because you're adding two. One is your first navigation controller which you configure in your viewWillAppear, and the other one is the Navigation Controller in the navigation view. I'll suggest you add the functionality of the Close and Next buttons in the View Controller, please read this link, and if you succeed give me a valid answer. diamantidis.github.io/2020/01/11/share-extension-custom-ui
  • 1dolinski
    1dolinski over 3 years
    Thanks for the link, I'd like to try to figure out how to do this with SwiftUI. I comment out the viewWillAppear configuration a space still appears like this: imgur.com/a/31xVBem
  • Carlos Maria Caraccia
    Carlos Maria Caraccia over 3 years
    I'm not sure if I am making my point. You're adding 2 Navigation Controllers to your view, one is the one on View Controller and the other is the Navigation View. You're only configuring it in viewWillAppear.
  • 1dolinski
    1dolinski over 3 years
    Thanks again for clarifying and sharing that link. I'll mark yours answered as it works. For others, my solution that works for now was to hide the UIKit Navigation Bar and then use SwiftUI NavigationView and default NavigationLink (i.e. without the programatic selection and EmptyView() implementation)