The current version of stgit does not allow whitespace in filenames.
This patch fixes that. It also speeds up operations on large
filesets considerably.
Thanks, I will apply it but I have a few comments below:
+# __run: runs cmd using spawnvp.
+#
+# The shell is avoided so it won't mess up our arguments.
+# If args is very large, the command is run multiple times;
+# args is split xargs style: cmd is passed on each invocation.
+# Unlike xargs, returns immediately if any non-zero return code
+# is received.
+#
+def __run(cmd, args=None):
I would prefer to add this as Python function documentation, i.e. with
"""...""" in the function body.
An additional thing, can you please convert all the tabs to spaces?
That's a better convention for a language like Python where you
delimit blocks by indentation.
What's the reason for having 'fin' as well? It doesn't seem to be used
(this is found in other parts of the patch as well).
Something wrong happened to my git-ftp-push script. It looks like it
copied 'master' to stgit.git/ and not to stgit.git/refs/heads/. I
can't fix it until tonight. Before then, you could actually use wget
to pull the whole repository and just copy 'master' to
'refs/heads/master'. In the latest tree I created separate files for
each command.
I'm not sure whether the GIT guys are happy for us to use this mailing
list for StGIT. If the StGIT traffic increases, I will try to create a
separate mailing list (maybe using a site like sf.net).
--
Catalin
An additional thing, can you please convert all the tabs to spaces?
That's a better convention for a language like Python where you
delimit blocks by indentation.
I would have hoped that emacs py-mode would "do the right thing".
Anybody know how to make it do what Catalin wants?
What's the reason for having 'fin' as well? It doesn't seem to be used
(this is found in other parts of the patch as well).
popen does not support bypassing the shell by using vectors of
arguments. Only popen2 and friends have this capability.
Unfortunate, yes.
I'm not sure whether the GIT guys are happy for us to use this mailing
list for StGIT. If the StGIT traffic increases, I will try to create a
separate mailing list (maybe using a site like sf.net).
I'd very much like to stay on the same list. By the same logic, cogito
should have it's own list as well...
Bryan
From: Jerry Seutter <hidden> Date: 2016-06-15 22:42:02
Bryan Larsen wrote:
Catalin Marinas wrote:
quoted
An additional thing, can you please convert all the tabs to spaces?
That's a better convention for a language like Python where you
delimit blocks by indentation.
I would have hoped that emacs py-mode would "do the right thing".
Anybody know how to make it do what Catalin wants?
Yeah, the default emacs mode seems to be to Do The Wrong Thing. I have
this in my .emacs, YMMV.
(setq-default indent-tabs-mode nil) ; Don't insert tab characters.
(setq-default tab-width 4) ; If there are tabs, display
; as 4 spaces.
You can set the tab-width to something much larger to make existing tabs
obvious.
Jerry
On Wed, 2005-07-13 at 14:17 -0400, Bryan Larsen wrote:
Catalin Marinas wrote:
I would have hoped that emacs py-mode would "do the right thing".
Anybody know how to make it do what Catalin wants?
It looks like the python-mode in my emacs does the right thing. You
could add something like below in your .emacs file:
(add-hook 'python-mode-hook
#'(lambda ()
(setq indent-tabs-mode nil)))
Otherwise, select the whole buffer and do a "M-x untabify".
quoted
What's the reason for having 'fin' as well? It doesn't seem to be used
(this is found in other parts of the patch as well).
popen does not support bypassing the shell by using vectors of
arguments. Only popen2 and friends have this capability.
But the manual says that it is not possible to get the exit code of the
child process with popen2 (at least not in python 2.3). You would need
to use the Popen3 and Popen4 classes in the popen2 module.
Does it make that big difference if the commands are invoked via the
shell? I haven't run any tests.
quoted
I'm not sure whether the GIT guys are happy for us to use this mailing
list for StGIT. If the StGIT traffic increases, I will try to create a
separate mailing list (maybe using a site like sf.net).
I'd very much like to stay on the same list. By the same logic, cogito
should have it's own list as well...
I'd like this too and it's probably OK with a low traffic (we'll see if
we receive complaints :-) ).
Catalin
Does it make that big difference if the commands are invoked via the
shell? I haven't run any tests.
It wasn't for the time difference that I bypassed the shell, it was to
support spaces and other strange characters in parameters. It's easy
to use spawnvp than it is to escape the parameters properly.
Bryan