51 @param all flag indicating to delete all files including ignored ones (boolean) |
51 @param all flag indicating to delete all files including ignored ones (boolean) |
52 @return name of the current patch (string) |
52 @return name of the current patch (string) |
53 """ |
53 """ |
54 purgeEntries = [] |
54 purgeEntries = [] |
55 |
55 |
56 ioEncoding = Preferences.getSystem("IOEncoding") |
|
57 process = QProcess() |
|
58 args = [] |
56 args = [] |
59 args.append("purge") |
57 args.append("purge") |
60 args.append("--print") |
58 args.append("--print") |
61 if all: |
59 if all: |
62 args.append("--all") |
60 args.append("--all") |
63 |
61 |
64 process.setWorkingDirectory(repodir) |
62 client = self.vcs.getClient() |
65 process.start('hg', args) |
63 if client: |
66 procStarted = process.waitForStarted() |
64 out, err = client.runcommand(args) |
67 if procStarted: |
65 if out: |
68 finished = process.waitForFinished(30000) |
66 purgeEntries = out.strip().split() |
69 if finished and process.exitCode() == 0: |
67 else: |
70 purgeEntries = str( |
68 ioEncoding = Preferences.getSystem("IOEncoding") |
71 process.readAllStandardOutput(), |
69 process = QProcess() |
72 ioEncoding, 'replace').strip().split() |
70 process.setWorkingDirectory(repodir) |
|
71 process.start('hg', args) |
|
72 procStarted = process.waitForStarted() |
|
73 if procStarted: |
|
74 finished = process.waitForFinished(30000) |
|
75 if finished and process.exitCode() == 0: |
|
76 purgeEntries = str( |
|
77 process.readAllStandardOutput(), |
|
78 ioEncoding, 'replace').strip().split() |
73 |
79 |
74 return purgeEntries |
80 return purgeEntries |
75 |
81 |
76 def hgPurge(self, name, all=False): |
82 def hgPurge(self, name, all=False): |
77 """ |
83 """ |