by
Changes to 2 files · Browse files at 1c3ca873cc4b Showing diff from parent 8ada4f4e59d8 4b78b9a94dd0 Diff from another changeset...
@@ -112,11 +112,16 @@ pfiles = {}
curdir = os.getcwd()
try:
+ eolmode = ui.config('patch', 'eol', 'strict')
+ if eolmode.lower() not in patch.eolmodes:
+ eolmode = 'strict'
+ else:
+ eolmode = eolmode.lower()
os.chdir(repo.root)
- if patch.applydiff(ui, fp, pfiles) < 0:
+ if patch.applydiff(ui, fp, pfiles, eolmode=eolmode) < 0:
ok = False
self.showMessage.emit(_('Patch failed to apply'))
- except patch.PatchError, err:
+ except (patch.PatchError, EnvironmentError), err:
ok = False
self.showMessage.emit(hglib.tounicode(str(err)))
os.chdir(curdir)
|
@@ -240,7 +240,8 @@ self.addAction(act)
def contextMenuEvent(self, event):
- itemissubrepo = self.currentFile() in self.model()._ctx.substate.keys()
+ itemissubrepo = (self.model().dataFromIndex(self.currentIndex())['status'] == 'S')
+
# Subrepos and regular items have different context menus
if itemissubrepo:
contextmenu = self.subrepocontextmenu
|
Loading...