Hi all

I have a few darcs repositories at my work which I access from my home computer via ssh. Whenever I attempt to do a darcs push from my home computer I get the error of
"unknown command: darcs"
The problem being of course that 'darcs' is not installed globally at my workplace but instead I have installed it locally and for the setup is that non-interactive remove shells have a slightly different environment (such that my .bashrc (or whatever) is not run and hence my locally installed programs are not in $PATH).

Attached is a patch which I have used, it allows the user to set an environment variable to the remote darcs command to run.
eg
export DARCS_REMOTE_COMMAND = "~/install/bin/darcs"

This is useful for me because I only ever push to a darcs repository via ssh to the one place.
Anyway just in case this is useful for anyone else the patch is attached.

regards
allan

New patches:

[A small change to allow the user to set the remote darcs command in the environment variable DARCS_REMOTE_COMMAND
[EMAIL PROTECTED] {
hunk ./Push.lhs 88
-                else unfixedrepodir
+              else unfixedrepodir
hunk ./RemoteApply.lhs 4
+import System ( getEnv )
+
hunk ./RemoteApply.lhs 53
-    pipeDoc_SSH_IgnoreError addr ["darcs apply --all --repodir '"++path++"'"] bundle
-        where (addr,':':path) = break (==':') repo
+    do darcsCommand <- getEnv "DARCS_REMOTE_COMMAND" `catch`
+                       \_ -> return "darcs"
+       pipeDoc_SSH_IgnoreError addr [ darcsCommand ++ 
+                                      " apply --all --repodir '"
+                                      ++path++
+                                      "'"] bundle
+    where (addr,':':path) = break (==':') repo
hunk ./RemoteApply.lhs 64
-                         " darcs apply --all --repodir '"++path++"'"] bundle
+                                  " darcs apply --all --repodir '"++path++"'"] bundle
}

Context:

[remove TODO from pull.pl.
David Roundy <[EMAIL PROTECTED]>**20060805192700] 
[fixes in pull.pl.
David Roundy <[EMAIL PROTECTED]>**20060805221055
 The first fix avoids a false error that shows up because of identical
 timestamps.  The second verifies that revert -a doesn't prompt user.
] 
[add new obliterate test.
David Roundy <[EMAIL PROTECTED]>**20060806122536] 
[clean up docs on DarcsRepo format.
David Roundy <[EMAIL PROTECTED]>**20060808104321] 
[Read sftp batch file in from stdin (part of issue237).
Eric Kow <[EMAIL PROTECTED]>**20060812143113
 
 Passing the batch file in from stdin allows for sftp to be used with
 password-based authentication.  According to the sftp user manual regarding
 the -b switch:
   Since it lacks user interaction it should be
   used in conjunction with non-interactive authentication
 
 Credit for this idea goes to Ori Avtalion.
 
] 
[Extend runSSH function to accept argument for stdin.
Eric Kow <[EMAIL PROTECTED]>**20060812142932] 
[fail if replace token pattern contains spaces (issue231)
Tommy Pettersson <[EMAIL PROTECTED]>**20060806110807
 It would otherwise create a badly formated patch in pending with unexpected
 results for subsequent commands.
] 
[fix negation of result in test
Tommy Pettersson <[EMAIL PROTECTED]>**20060806104215
 Negation with ! "uses" the result and thus there is no "failure", so the
 script wouldn't have exit with failure.
] 
[add test that replace with spaces fail
Tommy Pettersson <[EMAIL PROTECTED]>**20060806103033] 
[unset default author environment variables in test suite harness
Tommy Pettersson <[EMAIL PROTECTED]>**20060805151210
 This makes it harder to accidently write tests that fail because no author
 is set.
] 
[set author in pull_two test so it doesn't hang
Tommy Pettersson <[EMAIL PROTECTED]>**20060804181518] 
[add new test that triggers bug in refactoring.
David Roundy <[EMAIL PROTECTED]>**20060804103830] 
[make test external stay in its temp1 dir
Tommy Pettersson <[EMAIL PROTECTED]>**20060804134139] 
[Do not run sftp with the -q flag (issue240).
Eric Kow <[EMAIL PROTECTED]>**20060811212030
 
 sftp does not recognise it, and so any command which uses it fails.
 
] 
[Refactor calls to ssh/scp/sftp.
Eric Kow <[EMAIL PROTECTED]>**20060706202509
 
] 
[Extend test suite for patch matching.
Eric Kow <[EMAIL PROTECTED]>**20060513192501
 
] 
[Implement help --match (issue91).
Eric Kow <[EMAIL PROTECTED]>**20060513185610
 
 Also, refactor matching code in a way that encourages developers
 to document for help --match any new matchers they create.
 
] 
[Replace dateparser.sh with more general match.pl for testing --match.
Eric Kow <[EMAIL PROTECTED]>**20060513104942
 
] 
[Add tests for pristine error and quiet mode when removing a directory.
Eric Kow <[EMAIL PROTECTED]>**20060513100021] 
[Replace test rmdir.sh with rmdir.pl.
Eric Kow <[EMAIL PROTECTED]>**20060513043823] 
[remove some tabs from haskell source
Tommy Pettersson <[EMAIL PROTECTED]>**20060730122505] 
[use FastPackeString when examining executable scripts in Get
Tommy Pettersson <[EMAIL PROTECTED]>**20060729130645] 
[add some changelog entries
Tommy Pettersson <[EMAIL PROTECTED]>**20060718152611] 
[Minor tweaks to list_authors.
Juliusz Chroboczek <[EMAIL PROTECTED]>**20060720180602] 
[Fixed typo in documentation.
Michal Sojka <[EMAIL PROTECTED]>**20060514095212] 
[Added elc and pyc to binaries.
Juliusz Chroboczek <[EMAIL PROTECTED]>**20060713184214] 
[Run ssh/scp/sftp quietly.
Eric Kow <[EMAIL PROTECTED]>**20060707025245
 
 This is useful for silencing Putty, and could also be for OpenSSH should
 we decide to stop redirecting to /dev/null.
 
] 
[Added up links in web interface.
Peter Stuifzand <[EMAIL PROTECTED]>**20060610082238
 Added a link to the 'projects' part of the cgi repository interface, so that
 you go back to the project list.
] 
[Add a test suite for calling external programs.
Eric Kow <[EMAIL PROTECTED]>**20060521045407
 
 For now this only includes a test for ssh (issue171).
 
] 
[Suppress non-empty dir warning if Quiet.
Eric Kow <[EMAIL PROTECTED]>**20060513053456] 
[Add forgotten file umask.h.
Juliusz Chroboczek <[EMAIL PROTECTED]>**20060423174844] 
[Add --umask to all commands that write to the current repository.
Juliusz Chroboczek <[EMAIL PROTECTED]>**20060407195655] 
[Add option --umask.
Juliusz Chroboczek <[EMAIL PROTECTED]>**20060407194552] 
[Actually switch umasks in withRepoLock.
Juliusz Chroboczek <[EMAIL PROTECTED]>**20060407194202] 
[Implement withUMask.
Juliusz Chroboczek <[EMAIL PROTECTED]>**20060407193312] 
[Add umask.c.
Juliusz Chroboczek <[EMAIL PROTECTED]>**20060407193255] 
[Propagate opts to withRepoLock.
Juliusz Chroboczek <[EMAIL PROTECTED]>**20060325190622] 
[TAG 1.0.8
Tommy Pettersson <[EMAIL PROTECTED]>**20060616160213] 
Patch bundle hash:
f760deaff1beda8ebb1c155e6de9f31875011df8
_______________________________________________
darcs-users mailing list
darcs-users@darcs.net
http://lists.osuosl.org/mailman/listinfo/darcs-users

Reply via email to