Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 0.7, 0.7.1, and 0.7.2

commit: properly deal with special change types

* permission changes, do not revert and patch (bug in patch-apply)
* only revert and re-patch if file had selectable diff chunks

Changeset 3d4d665da488

Parent fdfdaed459ef

by Steve Borho

Changes to one file · Browse files at 3d4d665da488 Showing diff from parent fdfdaed459ef Diff from another changeset...

Change 1 of 2 Show Entire File hggtk/​commit.py Stacked
 
258
259
260
261
262
263
264
265
266
267
268
269
270
 
280
281
282
283
284
 
 
 
285
286
287
 
258
259
260
 
 
 
 
 
 
 
261
262
263
 
273
274
275
 
 
276
277
278
279
280
281
@@ -258,13 +258,6 @@
  import hgshelve   # 1a. get list of chunks not rejected   hlist = [x[DM_CHUNK_ID] for x in self.diff_model if not x[DM_REJECTED]] - # 1b. ignore header chunks - nlist = [n for n in hlist if not self.diff_model[n][DM_HEADER_CHUNK]] - if not nlist: - Prompt('Commit', 'Please select diff chunks to commit', - self).run() - return -   repo, chunks, ui = self.repo, self._shelve_chunks, self.ui     # 2. backup changed files, so we can restore them in the end @@ -280,8 +273,9 @@
  try:   # backup continues   for f in files: - if f not in self.modified: - continue + if f not in self._filechunks: continue + if len(self._filechunks[f]) == 1: continue + if f not in self.modified: continue   fd, tmpname = tempfile.mkstemp(prefix=f.replace('/', '_')+'.',   dir=backupdir)   os.close(fd)