/srv/irclogs.ubuntu.com/2011/12/05/#bzr.txt

wgzapache's windows port is reasonable... though I wouldn't run an sshd on windows myself00:00
wgzIf you want to go that route, I can help you get bzr working over http00:02
wgzotherwise you're probably best posting to the mailing list for advice00:02
Noldorinwgz, sshwidnows (openssh for win) isn't very good?00:02
Noldorinright00:02
Noldorini see00:02
wgzfeel free to try it, but I'd personally be very nervous about allowing that kind of access to my box00:05
Noldorinwgz, just because you think windows ssh servers don't have very well-tested security?00:05
wgzit's a big surface area, and not widely used, yes.00:07
Noldorinwgz, it's a big surface area on unix too :P00:14
Noldorinjust better tested00:14
Noldorinwgz, are there any guides out there for setting up bzr+ssh (openssh) on unix at least?00:18
jelmerNoldorin: there is no setup required, just a ssh server (and having bzr installed) is sufficient00:24
Noldorinjelmer, oh yes? bzr client knows exactly what to do itself when it encounters an ssh server?00:24
Noldorinjelmer, recommend any windows ssh server btw?00:25
jelmerNoldorin: right, it just asks the remote server to run "bzr serve", and that's sufficient00:26
wgzNoldorin: an ssh client can get the server to run arbitrary commands, so it just asks the server run bzr00:35
jelmerNoldorin: I don't have any experience with SSH servers on Windows, sorry00:42
Noldorinjelmer, no prob. thanks for the tip anyway :-)00:42
Noldorinwgz, sure, as long as bzr is set up to deal with the quirks of being on an ssh transport. which i guess it is :-)00:43
=== r0bby is now known as robbyoconnor
=== gthorslund_ is now known as gthorslund
AmisHello o/08:12
AmisSoo... I'm searching all over the net but not finding an answer for this (seems to be very common) question: how can I make my Bazaar remember FTP passwords? I'm using 2.3.1 Bazaar with 0.6.1 T. Bazaar08:14
AmisI might also add I use Window08:16
Amiss08:16
AmisUhh, net split08:35
AmisSo, I found this thing called "authentication.conf" that does what I need BUT it does not work with SFTP connections and I can't really wrap my head around it08:36
Amis"password ignored in section [projectnamehere], use an ssh agent instead" is what it says. What's the point of ignoring the password in the conf then promting for it? I don't really get it.08:37
fullermdI don't know the Windows side.  But with a lot of ssh programs, bzr _can't_ pass the password to ssh.08:52
fullermdIn that case, bzr isn't prompting for the password; ssh is.08:53
fullermdBut whether that's what's happening for you, I don't know.08:53
AmisSo there's an SSH client being used (since it can connect) but it bzr can't pass the password to that client?08:54
vilahey guys !08:54
AmisOkkey, I managed to set it up but it was hell of a struggle for someone without a linux machine at hand :/09:02
mgzmorning all09:04
vilamorning mgz09:04
=== vila changed the topic of #bzr to: Bazaar version control <http://bazaar.canonical.com> | try https://answers.launchpad.net/bzr for more help | http://irclogs.ubuntu.com/ | Patch pilot: vila
=== Guest37602 is now known as jpds
mgzvila: on the get_message_encoding branch,09:33
mgzI'm a little torn on whether to add 'system' or not.09:33
vilafor someone unaware of the context, 'message' is ambiguous09:34
mgzwhat we care about is system messages,09:34
mgzbut gettext looks at LC_MESSAGES as well sorta09:34
vilaright, but LC_ gives a hint there09:35
mgzand on win, FormatMessage is a generic api too (though generally just used to interpret errnos)09:35
vilawhat makes you remove the 'system' part ?09:36
mgzbecause it's the encoding for any messages really, it's just we happen to only care about the system ones09:36
vilawhat are the other kinds ?09:37
vilaof message that is09:37
vilaerror messages as in: produced by the application as opposed to the underlying system ?09:38
mgzthe c locale is a global setting09:38
mgzanything can look at it and use it.09:38
vilaright,09:39
vilaI think the trigger for my remark was the docstring mentioning system but since it's in osutils...09:39
vilamay be the context makes it clearer but your proposal doen't have any uses of the function (classical issue when splitting proposals to make them easier to review ;)09:41
mgzbasically what we need it for is to know how to interpret the strings that get put in OSError, IOError, and so on09:42
mgzwhich is why 'system', but it doesn't preclude the use of the setting for other things09:43
vilayeah, that's the part I can't see from the proposal probably. So, just land it ;)09:46
mgzwell, the one worry would be if plugin authors are tempted to use it for something not related to the C library at all09:48
mgzlike encoding strings they want to show the user with it, rather than looking at the stream.encoding or something09:48
vilamaybe you can better explain the intent in the docstring ?09:52
vilamgz: urgh, mixed eols in test_win32utils.py10:00
vilaweirdly enough, lp didn't notice10:00
mgz...how did we manage that?10:00
vilafor we I don't know, for where it's only the recently added lines ;)10:01
vilawhat is this '_func' attribute ?10:03
mgz^just added in my branch? can rewrite history to avoid that... but thought editor I used on win was smart enough not to do that...10:05
vilayup10:06
mgz_func is something I'm trying out as a way of writing ctypes code10:06
vilano need to rewrite history, just fix it ;)10:06
mgzthere are bunch of annoying issues with ctypes wrappers, that make it close to impossible to write good code with them10:06
mgzfirstly, if you don't define the params, you risk breaking on bad arguments in really bad ways10:08
mgzsecondly, you need to lazily load functions if you want to import the module on a platform without that library10:09
mgzthirdly, the basic wrapper is a horrible class with a useless docstring10:10
mgzfourthly, to test your wrapper properly you need to cover the error cases, which isn't always easy to get from the underlying library10:10
mgzso, this way does the definition inside a normal function with a docstring, on an attribute that can be overriden for tests10:11
mgzit's similar to having a named global in the module that partners the function, but more systematic10:12
mgzworks out at a lot of boilerplate though10:12
vilabut you can define this attribute as a real method and get the same benefits AFAICS10:12
mgzhow do you mean?10:12
vila_get_env_var_w = ctypes.WINFUNCTYPE(DWORD, LPCWSTR, LPWSTR, DWORD)(88+ ("GetEnvironmentVariableW", ctypes.windll.kernel32))10:13
vilaand still override that in tests10:14
mgzas a module global?10:14
vilayes10:14
mgzwe can't do that - kernel32 doesn't exist on nix.10:14
mgzwould prevent import win32utils working there.10:14
vilathese tests requires win32 anyway10:15
vilaha10:15
vilathis code is already protected by has_ctypes and plaftorm = win32 no ?10:15
vilawell, winver != 9810:15
mgznope, it could be, but that has downsides too.10:16
vilawhat nope ? it *is* covered by: if has_ctypes and winver != 'Windows 98':10:16
mgzwith a lot of functions from different places, you end up loading many libraries at import type you may not need10:17
vilaoh.10:17
vila(bit slow this morning)10:17
* vila scratches head10:18
mgz>>> print sys.platform, win32utils.winver != 9810:18
mgzlinux2 True10:18
vilaI still don't get it, we've been able to import lazily without this trick10:18
mgz^was the 'nope'10:18
vilalet's start again :)10:18
mgzif you look at existing code of this kind in osutils and win32utils10:19
vilaThe attribute trick makes me frown, can we do without it ?10:19
mgzyou'll see they use a wide range of different tricks10:19
mgzvila: I'm still looking for a way that doesn't suck :)10:19
vilahmm10:20
mgza decorator that does the boilerplate here is one idea, but then that's doing more work at startup and is even more magical10:20
mgzyou need function specific code, but most of the wrapper wants to be just like all the other wrappers10:22
vilayeah, so you have cache local to your function, why not have a shared one then (for the WINFUNCTYPE), you can still inject whatever you need for tests10:23
vilaor may be just documenting *that* magic (caching in the function attributes) is good enough to start with ?10:25
vilaBut is it even worth caching when the others don't ?10:25
mgzmany of the other functions only get called once10:25
mgzbut having everything use the same idiom at some point would make life easier10:26
vilaright, so some of the things you said here are worth documenting in the proposal ;-)10:27
mgz^one option I haven't mentioned is ctypes allows an errcheck function attribute for the specific logic you need to add, but then the exposed object is still the generated class with the useless docstring10:27
vilacaching because used more than once (but still, why on the function itself ;)10:27
vilaif the docstring is the issue can't you just override it or provide a wrapper ?10:28
mgzthere's a point with ctypes where you have so many wrappers you forget where one starts and the next begins :)10:28
vilabah, this discussion is becoming far longer than it should :-/10:28
mgz:D10:29
mgzyou've given me some useful feedback.10:29
vilamgz: reviewed, do the tweaks you feel necessary10:33
mgzhow would you feal about cfunc = <function_name>._c_function ...or can you think of a better naming scheme?10:51
vilamgz: sry, missed that,12:04
vilahmm, this sounds better12:04
mgzpants, forgot news.13:06
mgzlunch!13:23
mgzblom blom.14:16
jelmermgz: hmm14:20
jelmerI think I'm going to need a dictionary for that one14:20
mgzjust making funny noises :)14:22
=== yofel_ is now known as yofel
=== deryck is now known as deryck[lunch]
=== deryck[lunch] is now known as deryck
mgzokay, I need  break18:13
mgz+a18:13
* lamont boggles at non-monotonically increasing revnos19:06
nyuszika7h)19:06
nyuszika7hOops, auto-attach again >_<19:06
lamontif a is at rev 10, b is based on rev 7 + a change + merge of a, and I bzr pull into a from b, then the revno of a becomes smaller... this does not seem sane to me19:06
lifelesslamont: you've created a shorter left-hand-path19:12
lifelesslamont: you may want to disable such pulls by setting the config option for that19:12
lamontlifeless: I believe that I do, yes.19:16
lamontIs that clear in the manpage?19:16
lifelesslook for append_revisions_only in 'bzr help configuration'19:17
Dov_Rinewhat's the best way to install bazaar for use as a redmine repository?21:21
lamalexlifeless, is there a simple22:03
lamalexer whoops imeant to hit backspace not enter22:03
Noldorinhi jelmer23:05
jelmerhi Noldorin23:06
Noldorinjelmer, hey.23:39
Noldorinjelmer, so with regards to bzr+ssh, how is the url translated into a path on the SSH server?23:40
=== mwhudson_ is now known as mwhudson
jelmerNoldorin: it's the path part of the URL23:49
jelmerNoldorin: bzr log bzr+ssh://foo.com/var/www/bla accesses /var/www/bla there23:49
jelmerNoldorin: it supports ~23:51

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!