[darcs-users] Copying patches by hand

Michael Conrad silverdirk at conserv.silverdirk.com
Fri Nov 19 18:39:34 UTC 2004


On Fri, Nov 19, 2004 at 03:05:47PM +0100, Juliusz Chroboczek wrote:
> I've got a similar issue (maintaining course-related code that should
> never leave my laptop or that of one of my colleagues -- our students
> become very good at cracking when project deadlines approach), and we
> use a USB key to resynchronise.  If you've got any more convenient
> suggestions, I'd be interested in hearing them, as it's an everyday
> issue for me.
> 
> >     Send wants to see the target repo.  Without being able to see the
> >     target repo, send says "No local changes to send!".
> 
> I sometimes use |send --context|.  I agree that having a way to say
> ``send just these patches, I know what I'm doing'' would be convenient.

Yeah, determining context is a bit annoying.  (especially if it were
someone else's machine and you had to ask them for it)

> >   Apply:
> >     Apply wants a patch set generated by send.  I tried unzipping the
> >     patch and making it look like a set generated by send, but I can't
> >     generate the hash.
> 
> |apply --ignore-hash| (which would also be able to take a raw patch
> file), while a potentially useful addition, feels like too much rope
> to hang oneself.

Yes, rope is bad ;-)

> >   Tar:
> >     I've done a number of darcs-replace and darcs-mv commands, so I need
> >     the "pending" info.  I can't just copy the repo because I have some
> >     changes on the target machine.
> 
> Could you please clarify ?  Why can't you have multiple repositories
> on the target machine ?

In other words, I wanted to merge the changes rather than have them in
separate repos.  However, this is the basis for a rather logical solution
which didn't occour to me until someone mentioned it (and I apologize for
not looking it up to give credit- its on the list)

Tar up the relevant bits of the repo:
  tar -cf blah.tar _darcs/p* _darcs/i*

Copy it using whatever means.

On the target machine,
  mkdir tempdir && cd tempdir
  darcs init && tar -xf blah.tar
  cd ../repodir
  darcs pull ../tempdir

And this seems to work well.  At least, when the whole collection of patches
is small enough to copy conviently.

And, it can be accelerated with aliases or shell functions, etc.

-Mike





More information about the darcs-users mailing list