Mercurial > hg
comparison hgext/convert/monotone.py @ 8124:d883bfbd2e60
convert/mtn: handle directory move into moved directory (issue1619/3)
author | Patrick Mezard <pmezard@gmail.com> |
---|---|
date | Wed, 22 Apr 2009 10:25:05 +0200 |
parents | 933b874e402f |
children | da9f3866c637 |
comparison
equal
deleted
inserted
replaced
8123:933b874e402f | 8124:d883bfbd2e60 |
---|---|
158 for tofile in self.files: | 158 for tofile in self.files: |
159 if tofile in ignoremove: | 159 if tofile in ignoremove: |
160 continue | 160 continue |
161 if tofile.startswith(todir + '/'): | 161 if tofile.startswith(todir + '/'): |
162 renamed[tofile] = fromdir + tofile[len(todir):] | 162 renamed[tofile] = fromdir + tofile[len(todir):] |
163 # Avoid chained moves like: | |
164 # d1(/a) => d3/d1(/a) | |
165 # d2 => d3 | |
166 ignoremove[tofile] = 1 | |
163 for tofile, fromfile in renamed.items(): | 167 for tofile, fromfile in renamed.items(): |
164 self.ui.debug (_("copying file in renamed dir from '%s' to '%s'") | 168 self.ui.debug (_("copying file in renamed dir from '%s' to '%s'") |
165 % (fromfile, tofile), '\n') | 169 % (fromfile, tofile), '\n') |
166 files[tofile] = rev | 170 files[tofile] = rev |
167 copies[tofile] = fromfile | 171 copies[tofile] = fromfile |