equal
deleted
inserted
replaced
4 # Copyright 2005-2007 Matt Mackall <mpm@selenic.com> |
4 # Copyright 2005-2007 Matt Mackall <mpm@selenic.com> |
5 # |
5 # |
6 # This software may be used and distributed according to the terms of the |
6 # This software may be used and distributed according to the terms of the |
7 # GNU General Public License version 2 or any later version. |
7 # GNU General Public License version 2 or any later version. |
8 |
8 |
9 import os, copy |
9 from __future__ import absolute_import |
|
10 |
|
11 import copy |
|
12 import difflib |
|
13 import os |
10 import re |
14 import re |
11 from mercurial import match, patch, error, util, pathutil, context |
15 |
12 from mercurial import ui as uimod |
16 from ..i18n import _ |
13 from mercurial.i18n import _ |
17 from ..node import hex, nullid, short |
14 from mercurial.node import hex, nullid, short |
18 |
15 from mercurial import templatefilters |
19 from .common import ( |
16 from common import ErrorResponse, paritygen |
20 ErrorResponse, |
17 from common import HTTP_NOT_FOUND |
21 HTTP_NOT_FOUND, |
18 import difflib |
22 paritygen, |
|
23 ) |
|
24 |
|
25 from .. import ( |
|
26 context, |
|
27 error, |
|
28 match, |
|
29 patch, |
|
30 pathutil, |
|
31 templatefilters, |
|
32 ui as uimod, |
|
33 util, |
|
34 ) |
19 |
35 |
20 def up(p): |
36 def up(p): |
21 if p[0] != "/": |
37 if p[0] != "/": |
22 p = "/" + p |
38 p = "/" + p |
23 if p[-1] == "/": |
39 if p[-1] == "/": |