##// END OF EJS Templates
right way to check if file was in renamed directory, fixes import monotone...
Pavel Volkovitskiy -
r7957:88a2687f default
parent child Browse files
Show More
@@ -0,0 +1,23
1 % tedious monotone keys configuration
2 % create monotone repository
3 mtn: adding dir1 to workspace manifest
4 mtn: adding dir1/subdir1 to workspace manifest
5 mtn: adding dir1/subdir1/file1 to workspace manifest
6 mtn: beginning commit on branch 'com.selenic.test'
7 mtn: committed revision 5ed13ff5582d8d1e319f079b694a37d2b45edfc8
8 % rename directory
9 mtn: skipping dir1, already accounted for in workspace
10 mtn: renaming dir1/subdir1 to dir1/subdir2 in workspace manifest
11 mtn: beginning commit on branch 'com.selenic.test'
12 mtn: committed revision 985204142a822b22ee86b509d61f3c5ab6857d2b
13 % convert
14 assuming destination repo.mtn-hg
15 initializing destination repo.mtn-hg repository
16 scanning source...
17 sorting...
18 converting...
19 1 initialize
20 0 rename
21 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
22 % manifest
23 dir1/subdir2/file1
@@ -111,9 +111,8 class monotone_source(converter_source,
111 111 def mtnrenamefiles(self, files, fromdir, todir):
112 112 renamed = {}
113 113 for tofile in files:
114 suffix = tofile.lstrip(todir)
115 if todir + suffix == tofile:
116 renamed[tofile] = (fromdir + suffix).lstrip("/")
114 if tofile.startswith(todir):
115 renamed[tofile] = fromdir + tofile[len(todir):]
117 116 return renamed
118 117
119 118
General Comments 0
You need to be logged in to leave comments. Login now