Mercurial > hg > mercurial-crew-with-dirclash
comparison mercurial/ui.py @ 2494:73ac95671788
push, outgoing, bundle: fall back to "default" if "default-push" not defined
author | Vadim Gelfer <vadim.gelfer@gmail.com> |
---|---|
date | Fri, 23 Jun 2006 18:09:44 -0700 |
parents | fe1689273f84 |
children | 4a2a4d988ead |
comparison
equal
deleted
inserted
replaced
2493:9c660e691e90 | 2494:73ac95671788 |
---|---|
195 def shortuser(self, user): | 195 def shortuser(self, user): |
196 """Return a short representation of a user name or email address.""" | 196 """Return a short representation of a user name or email address.""" |
197 if not self.verbose: user = util.shortuser(user) | 197 if not self.verbose: user = util.shortuser(user) |
198 return user | 198 return user |
199 | 199 |
200 def expandpath(self, loc): | 200 def expandpath(self, loc, default=None): |
201 """Return repository location relative to cwd or from [paths]""" | 201 """Return repository location relative to cwd or from [paths]""" |
202 if loc.find("://") != -1 or os.path.exists(loc): | 202 if loc.find("://") != -1 or os.path.exists(loc): |
203 return loc | 203 return loc |
204 | 204 |
205 return self.config("paths", loc, loc) | 205 return self.config("paths", loc, default or loc) |
206 | 206 |
207 def write(self, *args): | 207 def write(self, *args): |
208 if self.header: | 208 if self.header: |
209 if self.header != self.prev_header: | 209 if self.header != self.prev_header: |
210 self.prev_header = self.header | 210 self.prev_header = self.header |