1056 process = QProcess() |
1056 process = QProcess() |
1057 args = [] |
1057 args = [] |
1058 args.append('parents') |
1058 args.append('parents') |
1059 args.append('--template') |
1059 args.append('--template') |
1060 args.append('{rev}:{node|short}@@@{tags}@@@{author|xmlescape}@@@' |
1060 args.append('{rev}:{node|short}@@@{tags}@@@{author|xmlescape}@@@' |
1061 '{date|isodate}@@@{branches}\n') |
1061 '{date|isodate}@@@{branches}@@@{bookmarks}\n') |
1062 process.setWorkingDirectory(ppath) |
1062 process.setWorkingDirectory(ppath) |
1063 process.start('hg', args) |
1063 process.start('hg', args) |
1064 procStarted = process.waitForStarted() |
1064 procStarted = process.waitForStarted() |
1065 if procStarted: |
1065 if procStarted: |
1066 finished = process.waitForFinished(30000) |
1066 finished = process.waitForFinished(30000) |
1068 output = str(process.readAllStandardOutput(), |
1068 output = str(process.readAllStandardOutput(), |
1069 Preferences.getSystem("IOEncoding"), 'replace') |
1069 Preferences.getSystem("IOEncoding"), 'replace') |
1070 index = 0 |
1070 index = 0 |
1071 for line in output.splitlines(): |
1071 for line in output.splitlines(): |
1072 index += 1 |
1072 index += 1 |
1073 changeset, tags, author, date, branches = line.split("@@@") |
1073 changeset, tags, author, date, branches, bookmarks = line.split("@@@") |
1074 cdate, ctime = date.split()[:2] |
1074 cdate, ctime = date.split()[:2] |
1075 info.append("""<p><table>""") |
1075 info.append("""<p><table>""") |
1076 info.append(QApplication.translate("mercurial", |
1076 info.append(QApplication.translate("mercurial", |
1077 """<tr><td><b>Parent #{0}</b></td><td></td></tr>\n""" |
1077 """<tr><td><b>Parent #{0}</b></td><td></td></tr>\n""" |
1078 """<tr><td><b>Changeset</b></td><td>{1}</td></tr>""")\ |
1078 """<tr><td><b>Changeset</b></td><td>{1}</td></tr>""")\ |
1079 .format(index, changeset)) |
1079 .format(index, changeset)) |
1080 if tags: |
1080 if tags: |
1081 info.append(QApplication.translate("mercurial", |
1081 info.append(QApplication.translate("mercurial", |
1082 """<tr><td><b>Tags</b></td><td>{0}</td></tr>""")\ |
1082 """<tr><td><b>Tags</b></td><td>{0}</td></tr>""")\ |
1083 .format('<br/>'.join(tags.split()))) |
1083 .format('<br/>'.join(tags.split()))) |
|
1084 if bookmarks: |
|
1085 info.append(QApplication.translate("mercurial", |
|
1086 """<tr><td><b>Bookmarks</b></td><td>{0}</td></tr>""")\ |
|
1087 .format('<br/>'.join(bookmarks.split()))) |
1084 if branches: |
1088 if branches: |
1085 info.append(QApplication.translate("mercurial", |
1089 info.append(QApplication.translate("mercurial", |
1086 """<tr><td><b>Branches</b></td><td>{0}</td></tr>""")\ |
1090 """<tr><td><b>Branches</b></td><td>{0}</td></tr>""")\ |
1087 .format('<br/>'.join(branches.split()))) |
1091 .format('<br/>'.join(branches.split()))) |
1088 info.append(QApplication.translate("mercurial", |
1092 info.append(QApplication.translate("mercurial", |
1507 process = QProcess() |
1511 process = QProcess() |
1508 args = [] |
1512 args = [] |
1509 args.append(mode) |
1513 args.append(mode) |
1510 args.append('--template') |
1514 args.append('--template') |
1511 args.append('{rev}:{node|short}@@@{tags}@@@{author|xmlescape}@@@' |
1515 args.append('{rev}:{node|short}@@@{tags}@@@{author|xmlescape}@@@' |
1512 '{date|isodate}@@@{branches}@@@{parents}\n') |
1516 '{date|isodate}@@@{branches}@@@{parents}@@@{bookmarks}\n') |
1513 |
1517 |
1514 process.setWorkingDirectory(repodir) |
1518 process.setWorkingDirectory(repodir) |
1515 process.start('hg', args) |
1519 process.start('hg', args) |
1516 procStarted = process.waitForStarted() |
1520 procStarted = process.waitForStarted() |
1517 if procStarted: |
1521 if procStarted: |
1520 output = str(process.readAllStandardOutput(), |
1524 output = str(process.readAllStandardOutput(), |
1521 Preferences.getSystem("IOEncoding"), 'replace') |
1525 Preferences.getSystem("IOEncoding"), 'replace') |
1522 index = 0 |
1526 index = 0 |
1523 for line in output.splitlines(): |
1527 for line in output.splitlines(): |
1524 index += 1 |
1528 index += 1 |
1525 changeset, tags, author, date, branches, parents = line.split("@@@") |
1529 changeset, tags, author, date, branches, parents, bookmarks = \ |
|
1530 line.split("@@@") |
1526 cdate, ctime = date.split()[:2] |
1531 cdate, ctime = date.split()[:2] |
1527 info.append("""<p><table>""") |
1532 info.append("""<p><table>""") |
1528 if mode == "heads": |
1533 if mode == "heads": |
1529 info.append(QApplication.translate("mercurial", |
1534 info.append(QApplication.translate("mercurial", |
1530 """<tr><td><b>Head #{0}</b></td><td></td></tr>\n""" |
1535 """<tr><td><b>Head #{0}</b></td><td></td></tr>\n""" |
1541 .format(changeset)) |
1546 .format(changeset)) |
1542 if tags: |
1547 if tags: |
1543 info.append(QApplication.translate("mercurial", |
1548 info.append(QApplication.translate("mercurial", |
1544 """<tr><td><b>Tags</b></td><td>{0}</td></tr>""")\ |
1549 """<tr><td><b>Tags</b></td><td>{0}</td></tr>""")\ |
1545 .format('<br/>'.join(tags.split()))) |
1550 .format('<br/>'.join(tags.split()))) |
|
1551 if bookmarks: |
|
1552 info.append(QApplication.translate("mercurial", |
|
1553 """<tr><td><b>Bookmarks</b></td><td>{0}</td></tr>""")\ |
|
1554 .format('<br/>'.join(bookmarks.split()))) |
1546 if branches: |
1555 if branches: |
1547 info.append(QApplication.translate("mercurial", |
1556 info.append(QApplication.translate("mercurial", |
1548 """<tr><td><b>Branches</b></td><td>{0}</td></tr>""")\ |
1557 """<tr><td><b>Branches</b></td><td>{0}</td></tr>""")\ |
1549 .format('<br/>'.join(branches.split()))) |
1558 .format('<br/>'.join(branches.split()))) |
1550 if parents: |
1559 if parents: |