monotone

monotone Commit Details

Date:2013-05-24 15:33:10 (6 years 24 days ago)
Author:Markus Wanner
Branch:org.debian.monotone
Commit:b5efb967e6903922810acb87661f84d39f9506a5
Parents: c3e434fed45b495e7c2f2ecb7ae1e92cfad40dba
Message:Drop the ATTIC, the files match, so we don't need them,

anymore.
Changes:
DATTIC
DATTIC/05-hurd-compilation-fix.diff (full)
DATTIC/06-broken-dns-work-around.diff (full)
DATTIC/pt_BR.po (full)

File differences

ATTIC/05-hurd-compilation-fix.diff
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
Description: fix compilation on hurd-i386
Do not rely on MAXPATHLEN to be defined. Instead iteratively call getcwd()
with an increasing buffer size until the current path fits.
Bug-Debian: http://bugs.debian.org/624779
Origin: upstream, backport of 64e690fd0e14f6a0ad816d8fd55044f36d8559d5,
d23dbf2ce78cd11fc1a1dc85cd78cc28ab2df8ca and
c14cb021dafa331f859634a14087f6f81d870aed
============================================================
--- a/src/netxx/serverbase.cxx
+++ b/src/netxx/serverbase.cxx
@@ -44,6 +44,9 @@
#include "probeinfo.h"
#include "socket.h"
+// Monotone specific, for get_current_working_dir()
+#include <src/platform.hh>
+
// standard includes
#include <map>
#include <vector>
@@ -167,14 +170,16 @@
if (saun->sun_path[0] == '/') {
files_.push_back(saun->sun_path);
} else {
- char buffer[MAXPATHLEN];
-
- if (getcwd(buffer, sizeof(buffer))) {
- std::string fullpath = buffer; fullpath += '/'; fullpath += saun->sun_path;
-files_.push_back(fullpath);
- } else {
-files_.push_back(saun->sun_path);
- }
+ /*
+ * the original (netxx) code here relied on MAXPATHLEN,
+ * which isn't defined on hurd. As netxx seems to only
+ * live on within monotone, we can as well make it
+ * inter-dependent. And the unix/fs.cc variant certainly
+ * gets more test mileage than anything special here.
+ */
+ std::string fullpath = get_current_working_dir();
+ fullpath += '/'; fullpath += saun->sun_path;
+ files_.push_back(fullpath);
}
}
#endif
--- a/src/unix/fs.cc
+++ b/src/unix/fs.cc
@@ -41,14 +41,26 @@
string
get_current_working_dir()
{
- char buffer[4096];
- if (!getcwd(buffer, 4096))
+ std::vector<char> cwd_buf;
+ size_t cwd_sz = 4096;
+
+ // This funny loop prevents having to specify a MAXPATHLEN or similar, but
+ // uses a dynamic approach, repeatedly calling getcwd() until our buffer
+ // is big enough for the current path to fit. Think of it as a portable
+ // replacement for get_current_dir_name(), which is GNU-only.
+ do
{
- const int err = errno;
- E(false, origin::system,
- F("cannot get working directory: %s") % os_strerror(err));
+ cwd_buf.resize(cwd_sz);
+ if (getcwd(&cwd_buf[0], cwd_sz))
+ return string(&cwd_buf[0]);
+
+ cwd_sz += 4096;
}
- return string(buffer);
+ while (errno == ERANGE);
+
+ const int err = errno;
+ E(false, origin::system,
+ F("cannot get working directory: %s") % os_strerror(err));
}
void
ATTIC/06-broken-dns-work-around.diff
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
Description: work-around to skip a test in case we are behind a broken DNS
Checks a domain that's supposed to be inexistent and skips a test that
fails in case a broken DNS tries to be helpful and resolves such an
inexistent name.
Bug-Debian: http://bugs.debian.org/671080
Origin: upstream, commit: 7b87eec0dc2298a18531b95c1cd2d1b72986e71c
--- a/test/func/netsync_badhost_gives_nice_error/__driver__.lua
+++ b/test/func/netsync_badhost_gives_nice_error/__driver__.lua
@@ -1,3 +1,22 @@
+skip_if(not existsonpath("host"))
+
+-- We punt in case of misconfigured DNS servers that resolve inexistant
+-- domain names. (Don't even think about buying that domain name!)
+L("\nChecking DNS resolution for nosuchhost__blahblah__asdvasoih.com: ")
+local pid = spawn_redirected("", "host-lookup.out", "host-lookup.err",
+ "host", "nosuchhost__blahblah__asdvasoih.com")
+local ec = wait(pid)
+
+if ec == 0 then
+ L("failed\n",
+ "\n",
+ "Your DNS resolver is trying to be helpful by resolving names that do\n",
+ "not exist. `host nosuchhost__blahblah__asdvasoih.com` returned:\n\n")
+ log_file_contents("host-lookup.out")
+ skip_if(true)
+else
+ L("good\n")
+end
mtn_setup()
ATTIC/pt_BR.po
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
# Brazilian Portuguese debconf templates translation for monotone.
# Copyright (C) 2012 Adriano Rafael Gomes <adrianorg@gmail.com>.
#
# This file is made available under the GNU GPL version 2.0 or
# greater. See the accompanying file COPYING for details.
#
msgid ""
msgstr ""
"Project-Id-Version: monotone 1.0-6\n"
"Report-Msgid-Bugs-To: monotone@packages.debian.org\n"
"POT-Creation-Date: 2009-09-04 14:30-0700\n"
"PO-Revision-Date: 2012-03-07 21:21-0300\n"
"Last-Translator: Adriano Rafael Gomes <adrianorg@gmail.com>\n"
"Language-Team: Brazilian Portuguese <debian-l10n-portuguese@lists.debian."
"org>\n"
"Language: pt_BR\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#. Type: boolean
#. Description
#: ../monotone-server.templates:1001
msgid "Automatically manage monotone database?"
msgstr "Gerenciar o banco de dados do monotone automaticamente?"
#. Type: boolean
#. Description
#: ../monotone-server.templates:1001
msgid ""
"Select this option to automatically manage the monotone database. If "
"selected, the database will automatically be created. Also when upgrading, "
"the database will be automatically migrated if necessary."
msgstr ""
"Selecione essa opção para gerenciar o banco de dados do monotone "
"automaticamente. Se selecionada, o banco de dados será automaticamente "
"criado. Também, ao atualizar, o banco de dados será migrado automaticamente, "
"se necessário."
#. Type: string
#. Description
#: ../monotone-server.templates:2001
msgid "Monotone key id:"
msgstr "Id da chave do monotone:"
#. Type: string
#. Description
#: ../monotone-server.templates:2001
msgid ""
"Enter the id of the key your monotone server will use. The key id is "
"typically an email address."
msgstr ""
"Informe o id da chave que o seu servidor monotone usará. O id da chave é "
"geralmente um endereço de e-mail."
#. Type: password
#. Description
#: ../monotone-server.templates:3001
msgid "Monotone key passphrase:"
msgstr "Senha da chave do monotone:"
#. Type: password
#. Description
#: ../monotone-server.templates:3001
msgid ""
"Please choose a passphrase for your monotone key. If left blank, one will be "
"generated for you."
msgstr ""
"Por favor, escolha uma senha para a sua chave do monotone. Se deixada em "
"branco, uma senha será gerada para você."

Archive Download the corresponding diff file

Branches

Tags

Quick Links:     www.monotone.ca    -     Downloads    -     Documentation    -     Wiki    -     Code Forge    -     Build Status