diff options
Diffstat (limited to 'bitbake/lib/bb/fetch2/hg.py')
-rw-r--r-- | bitbake/lib/bb/fetch2/hg.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/bitbake/lib/bb/fetch2/hg.py b/bitbake/lib/bb/fetch2/hg.py index cf214816b7..76810abb7d 100644 --- a/bitbake/lib/bb/fetch2/hg.py +++ b/bitbake/lib/bb/fetch2/hg.py | |||
@@ -37,7 +37,7 @@ from bb.fetch2 import logger | |||
37 | 37 | ||
38 | class Hg(FetchMethod): | 38 | class Hg(FetchMethod): |
39 | """Class to fetch from mercurial repositories""" | 39 | """Class to fetch from mercurial repositories""" |
40 | def supports(self, url, ud, d): | 40 | def supports(self, ud, d): |
41 | """ | 41 | """ |
42 | Check to see if a given url can be fetched with mercurial. | 42 | Check to see if a given url can be fetched with mercurial. |
43 | """ | 43 | """ |
@@ -66,7 +66,7 @@ class Hg(FetchMethod): | |||
66 | 66 | ||
67 | ud.localfile = data.expand('%s_%s_%s_%s.tar.gz' % (ud.module.replace('/', '.'), ud.host, ud.path.replace('/', '.'), ud.revision), d) | 67 | ud.localfile = data.expand('%s_%s_%s_%s.tar.gz' % (ud.module.replace('/', '.'), ud.host, ud.path.replace('/', '.'), ud.revision), d) |
68 | 68 | ||
69 | def need_update(self, url, ud, d): | 69 | def need_update(self, ud, d): |
70 | revTag = ud.parm.get('rev', 'tip') | 70 | revTag = ud.parm.get('rev', 'tip') |
71 | if revTag == "tip": | 71 | if revTag == "tip": |
72 | return True | 72 | return True |
@@ -126,14 +126,14 @@ class Hg(FetchMethod): | |||
126 | 126 | ||
127 | return cmd | 127 | return cmd |
128 | 128 | ||
129 | def download(self, loc, ud, d): | 129 | def download(self, ud, d): |
130 | """Fetch url""" | 130 | """Fetch url""" |
131 | 131 | ||
132 | logger.debug(2, "Fetch: checking for module directory '" + ud.moddir + "'") | 132 | logger.debug(2, "Fetch: checking for module directory '" + ud.moddir + "'") |
133 | 133 | ||
134 | if os.access(os.path.join(ud.moddir, '.hg'), os.R_OK): | 134 | if os.access(os.path.join(ud.moddir, '.hg'), os.R_OK): |
135 | updatecmd = self._buildhgcommand(ud, d, "pull") | 135 | updatecmd = self._buildhgcommand(ud, d, "pull") |
136 | logger.info("Update " + loc) | 136 | logger.info("Update " + ud.url) |
137 | # update sources there | 137 | # update sources there |
138 | os.chdir(ud.moddir) | 138 | os.chdir(ud.moddir) |
139 | logger.debug(1, "Running %s", updatecmd) | 139 | logger.debug(1, "Running %s", updatecmd) |
@@ -142,7 +142,7 @@ class Hg(FetchMethod): | |||
142 | 142 | ||
143 | else: | 143 | else: |
144 | fetchcmd = self._buildhgcommand(ud, d, "fetch") | 144 | fetchcmd = self._buildhgcommand(ud, d, "fetch") |
145 | logger.info("Fetch " + loc) | 145 | logger.info("Fetch " + ud.url) |
146 | # check out sources there | 146 | # check out sources there |
147 | bb.utils.mkdirhier(ud.pkgdir) | 147 | bb.utils.mkdirhier(ud.pkgdir) |
148 | os.chdir(ud.pkgdir) | 148 | os.chdir(ud.pkgdir) |
@@ -169,7 +169,7 @@ class Hg(FetchMethod): | |||
169 | def supports_srcrev(self): | 169 | def supports_srcrev(self): |
170 | return True | 170 | return True |
171 | 171 | ||
172 | def _latest_revision(self, url, ud, d, name): | 172 | def _latest_revision(self, ud, d, name): |
173 | """ | 173 | """ |
174 | Compute tip revision for the url | 174 | Compute tip revision for the url |
175 | """ | 175 | """ |
@@ -177,10 +177,10 @@ class Hg(FetchMethod): | |||
177 | output = runfetchcmd(self._buildhgcommand(ud, d, "info"), d) | 177 | output = runfetchcmd(self._buildhgcommand(ud, d, "info"), d) |
178 | return output.strip() | 178 | return output.strip() |
179 | 179 | ||
180 | def _build_revision(self, url, ud, d, name): | 180 | def _build_revision(self, ud, d, name): |
181 | return ud.revision | 181 | return ud.revision |
182 | 182 | ||
183 | def _revision_key(self, url, ud, d, name): | 183 | def _revision_key(self, ud, d, name): |
184 | """ | 184 | """ |
185 | Return a unique key for the url | 185 | Return a unique key for the url |
186 | """ | 186 | """ |