hgext/progress.py
author Anton Shestakov <av6@dwimlabs.net>
Sun, 12 Jul 2015 16:06:57 +0800
changeset 25777 1c2a8db33b8f
parent 25522 15c2c580b2a7
child 26073 5ef327e9c157
permissions -rw-r--r--
hgweb: allow symbolic revisions with forward slashes in urls It's possible to have a branch/tag/bookmark with all kinds of special characters, such as {}/\!?. While not very conveniently, symbolic revisions with such characters work from command line if user correctly quotes the characters. These characters also work in hgweb, when they are properly encoded, with one exception: '/' (forward slash, urlencoded as '%2F'), which was getting decoded before hgweb could parse it as a part of PATH_INFO. Because of that, hgweb was seeing it as any other forward slash, that is, as just another url parts separator. For example, if user wanted to see the content of dir/file at bookmark 'feature/eggs', url could be: '/file/feature%2Feggs/dir/file'. But hgweb tried to find a revision 'feature' and get contents of 'eggs/dir/file'. To fix this, let's assume forward slashes are doubly-urlencoded (%252F), so CGI/WSGI server decodes it into %2F. Then we can decode %2F in the revision part of the url into an actual '/' character. Making hgweb produce such urls will be done in the next 2 patches.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
10434
ad104a786d35 Progress bar extension
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
     1
# progress.py show progress bars for some actions
ad104a786d35 Progress bar extension
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
     2
#
ad104a786d35 Progress bar extension
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
     3
# Copyright (C) 2010 Augie Fackler <durin42@gmail.com>
ad104a786d35 Progress bar extension
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
     4
#
15772
83a140752239 progress: Use the same GPL boilerplate as most hg files
Augie Fackler <durin42@gmail.com>
parents: 15662
diff changeset
     5
# This software may be used and distributed according to the terms of the
83a140752239 progress: Use the same GPL boilerplate as most hg files
Augie Fackler <durin42@gmail.com>
parents: 15662
diff changeset
     6
# GNU General Public License version 2 or any later version.
10434
ad104a786d35 Progress bar extension
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
     7
25522
15c2c580b2a7 progress: deprecate the progress extension
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25521
diff changeset
     8
"""show progress bars for some actions (DEPRECATED)
10434
ad104a786d35 Progress bar extension
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
     9
25522
15c2c580b2a7 progress: deprecate the progress extension
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25521
diff changeset
    10
This extension has been merged into core, you can remove it from your config.
15c2c580b2a7 progress: deprecate the progress extension
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25521
diff changeset
    11
See hg help config.progress for configuration options.
10434
ad104a786d35 Progress bar extension
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
    12
"""