Mercurial > hg > easyhg
comparison mainwindow.cpp @ 358:ea6f76c0aa76
Make username/password prompts in easyhg.py more helpful; use a distinctive return for cancel in these dialogs, and avoid showing command-failed in the main program when cancelled
author | Chris Cannam |
---|---|
date | Thu, 17 Mar 2011 13:52:57 +0000 |
parents | 368b96a87c43 |
children | 550650bbb959 4cd753e083cc |
comparison
equal
deleted
inserted
replaced
357:4373061dd20e | 358:ea6f76c0aa76 |
---|---|
1800 break; // go on to default report | 1800 break; // go on to default report |
1801 case ACT_INCOMING: | 1801 case ACT_INCOMING: |
1802 if (output.contains("authorization failed")) { | 1802 if (output.contains("authorization failed")) { |
1803 reportAuthFailed(output); | 1803 reportAuthFailed(output); |
1804 return; | 1804 return; |
1805 } else if (output.contains("entry cancelled")) { | |
1806 // ignore this, user cancelled username or password dialog | |
1807 return; | |
1805 } else { | 1808 } else { |
1806 // Incoming returns non-zero code and no output if the | 1809 // Incoming returns non-zero code and no output if the |
1807 // check was successful but there are no changes | 1810 // check was successful but there are no changes |
1808 // pending. This is the only case where we need to remove | 1811 // pending. This is the only case where we need to remove |
1809 // warning messages, because it's the only case where a | 1812 // warning messages, because it's the only case where a |
1824 break; // go on to default report | 1827 break; // go on to default report |
1825 case ACT_PULL: | 1828 case ACT_PULL: |
1826 if (output.contains("authorization failed")) { | 1829 if (output.contains("authorization failed")) { |
1827 reportAuthFailed(output); | 1830 reportAuthFailed(output); |
1828 return; | 1831 return; |
1832 } else if (output.contains("entry cancelled")) { | |
1833 // ignore this, user cancelled username or password dialog | |
1834 return; | |
1829 } | 1835 } |
1830 break; // go on to default report | 1836 break; // go on to default report |
1831 case ACT_PUSH: | 1837 case ACT_PUSH: |
1832 if (output.contains("creates new remote heads")) { | 1838 if (output.contains("creates new remote heads")) { |
1833 reportNewRemoteHeads(output); | 1839 reportNewRemoteHeads(output); |
1834 return; | 1840 return; |
1835 } else if (output.contains("authorization failed")) { | 1841 } else if (output.contains("authorization failed")) { |
1836 reportAuthFailed(output); | 1842 reportAuthFailed(output); |
1843 return; | |
1844 } else if (output.contains("entry cancelled")) { | |
1845 // ignore this, user cancelled username or password dialog | |
1837 return; | 1846 return; |
1838 } | 1847 } |
1839 break; // go on to default report | 1848 break; // go on to default report |
1840 case ACT_QUERY_HEADS: | 1849 case ACT_QUERY_HEADS: |
1841 // fails if repo is empty; we don't care (if there's a genuine | 1850 // fails if repo is empty; we don't care (if there's a genuine |