Mercurial > hg > mercurial-crew-with-dirclash
comparison hgext/convert/hg.py @ 5367:adce4d30a6ea
Merge with crew
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Tue, 02 Oct 2007 18:04:18 -0500 |
parents | b98c377b3c16 |
children | 8a2915f57dfc |
comparison
equal
deleted
inserted
replaced
5366:d0c48891dd4a | 5367:adce4d30a6ea |
---|---|
57 def copyfile(self, source, dest): | 57 def copyfile(self, source, dest): |
58 self.repo.copy(source, dest) | 58 self.repo.copy(source, dest) |
59 | 59 |
60 def delfile(self, f): | 60 def delfile(self, f): |
61 try: | 61 try: |
62 os.unlink(self.repo.wjoin(f)) | 62 util.unlink(self.repo.wjoin(f)) |
63 #self.repo.remove([f]) | 63 #self.repo.remove([f]) |
64 except: | 64 except OSError: |
65 pass | 65 pass |
66 | 66 |
67 def setbranch(self, branch, pbranch, parents): | 67 def setbranch(self, branch, pbranch, parents): |
68 if (not self.clonebranches) or (branch == self.lastbranch): | 68 if (not self.clonebranches) or (branch == self.lastbranch): |
69 return | 69 return |
154 return hex(self.repo.changelog.tip()) | 154 return hex(self.repo.changelog.tip()) |
155 | 155 |
156 class mercurial_source(converter_source): | 156 class mercurial_source(converter_source): |
157 def __init__(self, ui, path, rev=None): | 157 def __init__(self, ui, path, rev=None): |
158 converter_source.__init__(self, ui, path, rev) | 158 converter_source.__init__(self, ui, path, rev) |
159 self.repo = hg.repository(self.ui, path) | 159 try: |
160 self.repo = hg.repository(self.ui, path) | |
161 except: | |
162 raise NoRepo("could not open hg repo %s as source" % path) | |
160 self.lastrev = None | 163 self.lastrev = None |
161 self.lastctx = None | 164 self.lastctx = None |
162 | 165 |
163 def changectx(self, rev): | 166 def changectx(self, rev): |
164 if self.lastrev != rev: | 167 if self.lastrev != rev: |