##// END OF EJS Templates
hg import: write the dirstate after every commit...
Alexis S. L. Carvalho -
r5986:a732eebf default
parent child Browse files
Show More
@@ -1632,6 +1632,9 b' def import_(ui, repo, patch1, *patches, '
1632 repo.rollback()
1632 repo.rollback()
1633 raise util.Abort(_('patch is damaged' +
1633 raise util.Abort(_('patch is damaged' +
1634 ' or loses information'))
1634 ' or loses information'))
1635 # Force a dirstate write so that the next transaction backups
1636 # an up-do-date file.
1637 repo.dirstate.write()
1635 finally:
1638 finally:
1636 os.unlink(tmpname)
1639 os.unlink(tmpname)
1637 finally:
1640 finally:
@@ -111,6 +111,18 b' python mkmsg2.py | hg --cwd b import -'
111 hg --cwd b tip --template '{desc}\n'
111 hg --cwd b tip --template '{desc}\n'
112 rm -r b
112 rm -r b
113
113
114 # We weren't backing up the correct dirstate file when importing many patches
115 # (issue963)
116 echo '% import patch1 patch2; rollback'
117 echo line 3 >> a/a
118 hg --cwd a ci -m'third change'
119 hg --cwd a export -o '../patch%R' 1 2
120 hg clone -qr0 a b
121 hg --cwd b parents --template 'parent: #rev#\n'
122 hg --cwd b import ../patch1 ../patch2
123 hg --cwd b rollback
124 hg --cwd b parents --template 'parent: #rev#\n'
125 rm -r b
114
126
115 # bug non regression test
127 # bug non regression test
116 # importing a patch in a subdirectory failed at the commit stage
128 # importing a patch in a subdirectory failed at the commit stage
@@ -112,6 +112,12 b' email patch'
112
112
113 next line
113 next line
114 ---
114 ---
115 % import patch1 patch2; rollback
116 parent: 0
117 applying ../patch1
118 applying ../patch2
119 rolling back last transaction
120 parent: 1
115 % hg import in a subdirectory
121 % hg import in a subdirectory
116 requesting all changes
122 requesting all changes
117 adding changesets
123 adding changesets
General Comments 0
You need to be logged in to leave comments. Login now