#1881 Fix traceback when trying to edit file online
Merged by cep. Opened by cep.
cep/pagure fix_edit_file_online_traceback  into  master

Download 1881.patch

It broke only when the file was not in the root of the repo. i.e when the file was inside a directory.

Check if the path is actually used anywhere :)

Yup! Here: https://pagure.io/pagure/blob/master/f/pagure/templates/edit_file.html#_35 :)

1 new commit added

  • Fix path not defined in file.html

1 new commit added

  • Fix incorrect value for variable 'path'

1 new commit added

  • Add tests for nav links when viewing or editing a file online

@pingou: The tests are up, but they only test for cases where the links are correct. I'm not sure how to mock the previous (incorrect) behaviour. Searching didn't turn up any relevant results, so can you please point me to some docs, or examples for the same? Thanks :)

@cep, it's easy, remove your fix and see if the test still pass, if it does then we're not checking that this won't break in the future :)

rebased

@pingou, done! Please see if this'll do it.

Looks great, let's rebase and merge :)

(btw, if you grant me commit to your fork I could do the rebase while you're afk and merge directly :))

Going to apply this one manually as I'd like to have it in 2.12.1

thanks :)

Commit 0294d15c fixes this pull-request

Pull-Request has been merged by breathingcode@gmail.com

Metadata