equal
deleted
inserted
replaced
12 from mercurial.node import sha1nodeconstants |
12 from mercurial.node import sha1nodeconstants |
13 from mercurial import ( |
13 from mercurial import ( |
14 config, |
14 config, |
15 error, |
15 error, |
16 pycompat, |
16 pycompat, |
|
17 util, |
17 ) |
18 ) |
18 |
19 |
19 from . import common |
20 from . import common |
20 |
21 |
21 |
22 |
72 super(convert_git, self).__init__(ui, repotype, path, revs=revs) |
73 super(convert_git, self).__init__(ui, repotype, path, revs=revs) |
73 common.commandline.__init__(self, ui, b'git') |
74 common.commandline.__init__(self, ui, b'git') |
74 |
75 |
75 # Pass an absolute path to git to prevent from ever being interpreted |
76 # Pass an absolute path to git to prevent from ever being interpreted |
76 # as a URL |
77 # as a URL |
77 path = os.path.abspath(path) |
78 path = util.abspath(path) |
78 |
79 |
79 if os.path.isdir(path + b"/.git"): |
80 if os.path.isdir(path + b"/.git"): |
80 path += b"/.git" |
81 path += b"/.git" |
81 if not os.path.exists(path + b"/objects"): |
82 if not os.path.exists(path + b"/objects"): |
82 raise common.NoRepo( |
83 raise common.NoRepo( |