You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Jason Butlin <ro...@hotmail.com> on 2005/07/19 09:00:50 UTC

Patch/Diff

We have a set of circumstances at work that has made me look into ways of 
providing an alternative form of remote working for our developers. I 
thought I'd come up with a solution, but it would appear that the diff/patch 
tools are not quite up to the task.

The situation is that the developers do not have any sort of access to our 
network from outside the company. The basic approach was to supply a zip 
file of an completely up to date working copy of the code every hour. To 
begin working, the developer would download this working copy of and develop 
against that.

Now the sticking point comes when it the developer is ready send their 
changes into the office. Before they do this, it would make sense to merge 
their changes into the latest copy of the code as provided by the latest zip 
file. My initial idea was for the developer to create a patch of their 
working copy, download the latest from the ftp site and apply their patch - 
resolving any conflicts as necessary. However, as everyone is no doubt 
aware, the major floor here is that file additions/deletion are not catered 
for.

As an alternative, I thought of trying to use SVNs merge facility but I 
can't seem to get that to work the way I want either. The nearest I've got 
is as following.
- They download the latest zip
- They merge the difference between their copy @BASE and the new version 
@BASE, into their working copy

Whilst this provides them with code that reflects the latest version, it 
looks to SVN that they made all the changes on their working copy. This 
obivously causes problems the more they perform these merges, and doesn't 
help the person in the office trying to commit their changes for them.

What I really want to do is merge the difference between their working copy 
in it's current state and their working copy @BASE with the latest copy 
downloaded. Basically replicate the diff/patch approach but take advantage 
of the fact that SVN merge understands file additions and deletions.

Does anyone have any solution to either of these problems, or even some 
pointers on how I resolve this issue of basically allowing a remote worker 
to send in either an up to date working copy or a patch that handles 
directory structure changes?

Thanks
Jay



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Patch/Diff

Posted by Robin Pellatt <pe...@mirocs.com>.
Hi Jason,

How about each developer has their own local Subversion repository (actually a 
lot easier than it sounds) which are basically mirrors of your main repository 
on the network, and then use SVK (http://svk.elixus.org/) to handle merging the 
mirrors when they're ready to check in.


Jason Butlin wrote:
> We have a set of circumstances at work that has made me look into ways 
> of providing an alternative form of remote working for our developers. I

Cheers,

Robin.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Patch/Diff

Posted by Bob Proulx <bo...@proulx.com>.
Chia-liang Kao wrote:
> Bob Proulx <bob <at> proulx.com> writes:
> > The original poster said they only had email between sites and would
> > never have http, https, nor ssh access.  Does svk natively support
> > sync'ing by email?
> 
> While I do think email is a very centralised solution,

Well, yes, but even in a decentralized development environment there
will still be centralized tracks.  :-)

> but yes, you can do that with svk.  But it has to be push based.
> Write a commit hook that sends email with smerge -P, and write a
> mail processor to verify pgp and pipe to svk patch --apply.

That is good information to know.  I had not known about 'svk patch'
previously and reading about it now is very useful information.  Even
though I did not say it this way I was thinking about the pulling
around of patches and changesets.  (I was thinking arch-pqm when I
posted my previous message.)  Once you have that then mail can easily
transport them.  I will spend some time reading about svk patch and
smerge -P.  Thanks for the pointer.

> Right, it's just a simple matter of programming like writing a version
> control system. :)

(chuckle) Yes.  There is often so much to do.  As you say it is only a
matter of time and resources to code this up.  But this looks
reasonable to be able to do.

However, because it does not exist at this moment, I will stand by my
previous recommendation to the original poster.  But now with the
option to change that recommendation once the capabilities being
discussed here become a proven reality.  Looking forward to it!

Bob

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Patch/Diff

Posted by Chia-liang Kao <cl...@clkao.org>.
Bob Proulx <bob <at> proulx.com> writes:
> The original poster said they only had email between sites and would
> never have http, https, nor ssh access.  Does svk natively support
> sync'ing by email?

While I do think email is a very centralised solution, but yes, you can
do that with svk.  But it has to be push based.  Write a commit hook
that sends email with smerge -P, and write a mail processor to verify
pgp and pipe to svk patch --apply.

Right, it's just a simple matter of programming like writing a version
control system. :)

Cheers,
CLK



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Patch/Diff

Posted by Bob Proulx <bo...@proulx.com>.
Chia-liang Kao wrote:
> Bob Proulx writes:
> > People have suggested svk.  It is a great tool and I use it.  It
> > interfaces well with subversion to help manage private branches.  But
> > it is not truly an offline distributed version control system.  I
> > doubt you would be completely happy using it as compared to using one
> > of the others mentioned in the hard offline environment as you
> > describe.
> 
> what is a true offline distributed version control system?  Most of svk
> was developed offline.
> 
> If you mean real distributed version control system, with client auto
> discovery to avoid central published server, we are working on it, called
> svl built on svk api.  There will be a session talking about svl in OSCON
> this year.

The original poster said they only had email between sites and would
never have http, https, nor ssh access.  Does svk natively support
sync'ing by email?

Bob

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Patch/Diff

Posted by Chia-liang Kao <cl...@clkao.org>.
Bob Proulx <bob <at> proulx.com> writes:
> People have suggested svk.  It is a great tool and I use it.  It
> interfaces well with subversion to help manage private branches.  But
> it is not truly an offline distributed version control system.  I
> doubt you would be completely happy using it as compared to using one
> of the others mentioned in the hard offline environment as you
> describe.

what is a true offline distributed version control system?  Most of svk
was developed offline.

If you mean real distributed version control system, with client auto
discovery to avoid central published server, we are working on it, called
svl built on svk api.  There will be a session talking about svl in OSCON
this year.

Cheers,
CLK



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Patch/Diff

Posted by Bob Proulx <bo...@proulx.com>.
Jason Butlin wrote:
> The situation is that the developers do not have any sort of access to our 
> network from outside the company. The basic approach was to supply a zip 
> file of an completely up to date working copy of the code every hour. To 
> begin working, the developer would download this working copy of and 
> develop against that.

If your developers truly have no access other than email to sync then
I recommend looking at one of the distributed version control systems
such as GNU Arch or Monotone or Darcs or Bazaar or ArX or others.  In
the environment you describe you need a different VCS model than one
provided by Subversion.  I know that Arch in particular has the
capabilities that you describe.  But with an added complexity.

People have suggested svk.  It is a great tool and I use it.  It
interfaces well with subversion to help manage private branches.  But
it is not truly an offline distributed version control system.  I
doubt you would be completely happy using it as compared to using one
of the others mentioned in the hard offline environment as you
describe.

Bob

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Patch/Diff

Posted by Russ Brown <pi...@gmail.com>.
Jason Butlin wrote:
> 
> 
>> From: Martin Tomes <li...@tomes.org>
>> To: Jason Butlin <ro...@hotmail.com>
>> CC: users@subversion.tigris.org
>> Subject: Re: Patch/Diff
>> Date: Tue, 19 Jul 2005 10:05:00 +0100
>>
>> Jason Butlin wrote:
>>
>>> We have a set of circumstances at work that has made me look into 
>>> ways of providing an alternative form of remote working for our 
>>> developers. I thought I'd come up with a solution, but it would 
>>> appear that the diff/patch tools are not quite up to the task.
>>
>>
>> Have you looked at SVK?  It sounds like it might help you.
>>
>> -- 
>> Martin Tomes
> 
> 
> Cheers. I've had a little look at this before, but there are 2 problems 
> I see with this. Firstly, it's built against 1.1.4 of SubVersion and we 
> use 1.2, so there may be issues there.
> 

I'm using SVK with 1.2 right now with no problems.

> The other is that from what I can gather, SVK works by ultimately 
> connecting to the central repository. This would be great for laptop 
> users that can bring their laptops into work every now and then, but our 
> users would be developing on hoem PCs. The only connection the remote 
> worker has with the office is email (or an FTP dumping area). So I'm not 
> sure how the users would communicate their changes back and forth, or 
> get those from the office either.
> 

I'm not overly familiar with this model of working, but I think you'd do 
it like this:

1. Each developer creates a local repository, and loads a dump of the 
live repository into it.

2. Mirror the repository in SVK.

3. Create a local branch in SVK and work off that.

4. User's receive patches via email and apply them to the trunk. 
Developers pull to their local branch to get the changes.

5. Developer pushes but creates a patch instead of actually merging to 
trunk. Developer emails change to repository.

6. The developer's patch eventually gets filtered back to them in stage 
4., but SVK won't pull it into the local branch because it knows it's 
already got it.

7. Repeat and rinse as required.

As I say, this might not be completely correct, but I think that's 
roughly how it would work.

> Jay
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: users-help@subversion.tigris.org
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Patch/Diff

Posted by Brian Behlendorf <br...@collab.net>.
On Tue, 19 Jul 2005, Branko �~Libej wrote:
> ra_smtp, anyone? :)

Kinda like CTM...

http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/ctm.html

 	Brian


Re: Patch/Diff

Posted by Philip Martin <ph...@codematters.co.uk>.
Marc Haisenko <ha...@webport.de> writes:

> On Tuesday 19 July 2005 14:22, Branko Čibej wrote:
>> ra_smtp, anyone? :)
>
> Actually that would be an interesting thing to have and a major technological 
> advantage over all other VCS :-)

Monotone did both SMTP and NNTP at one stage, although it seems to
have moved to a custom protocol now.

-- 
Philip Martin

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org


Re: Patch/Diff

Posted by Marc Haisenko <ha...@webport.de>.
On Tuesday 19 July 2005 14:22, Branko Čibej wrote:
> ra_smtp, anyone? :)
>
> -- Brane

Actually that would be an interesting thing to have and a major technological 
advantage over all other VCS :-) Put SpamAssassin into the picture and you'd 
have a VCS with spam protection, something some (commercial !) projects I 
know really would gain from ;-)

-- 
Marc Haisenko
Systemspezialist
Webport IT-Services GmbH
mailto: haisenko@webport.de

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: Patch/Diff

Posted by Branko Čibej <br...@xbc.nu>.
From a thread on users@:

Jason Butlin wrote:

> The other is that from what I can gather, SVK works by ultimately 
> connecting to the central repository. This would be great for laptop 
> users that can bring their laptops into work every now and then, but 
> our users would be developing on hoem PCs. The only connection the 
> remote worker has with the office is email (or an FTP dumping area). 
> So I'm not sure how the users would communicate their changes back and 
> forth, or get those from the office either.

ra_smtp, anyone? :)

-- Brane


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: Patch/Diff

Posted by Jason Butlin <ro...@hotmail.com>.

>From: Martin Tomes <li...@tomes.org>
>To: Jason Butlin <ro...@hotmail.com>
>CC: users@subversion.tigris.org
>Subject: Re: Patch/Diff
>Date: Tue, 19 Jul 2005 10:05:00 +0100
>
>Jason Butlin wrote:
>>We have a set of circumstances at work that has made me look into ways of 
>>providing an alternative form of remote working for our developers. I 
>>thought I'd come up with a solution, but it would appear that the 
>>diff/patch tools are not quite up to the task.
>
>Have you looked at SVK?  It sounds like it might help you.
>
>--
>Martin Tomes

Cheers. I've had a little look at this before, but there are 2 problems I 
see with this. Firstly, it's built against 1.1.4 of SubVersion and we use 
1.2, so there may be issues there.

The other is that from what I can gather, SVK works by ultimately connecting 
to the central repository. This would be great for laptop users that can 
bring their laptops into work every now and then, but our users would be 
developing on hoem PCs. The only connection the remote worker has with the 
office is email (or an FTP dumping area). So I'm not sure how the users 
would communicate their changes back and forth, or get those from the office 
either.

Jay



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Patch/Diff

Posted by Martin Tomes <li...@tomes.org>.
Jason Butlin wrote:
> We have a set of circumstances at work that has made me look into ways 
> of providing an alternative form of remote working for our developers. I 
> thought I'd come up with a solution, but it would appear that the 
> diff/patch tools are not quite up to the task.

Have you looked at SVK?  It sounds like it might help you.

-- 
Martin Tomes
echo 'martin at tomes x org x uk'\
  | sed -e 's/ x /\./g' -e 's/ at /@/'

The Subversion Wiki is at http://www.subversionary.org/

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Patch/Diff

Posted by Romain Prévost <pr...@gmail.com>.
You could try to set up a remote SVN server, and maintain synchro by
hand, sending zips of server dump files for the latest revision ?

They would have a local server available to them with the latest
versions of all files, do the merge, and send you back their working
copies, merged and tested, so you can submit them into your server,
and send back the dump of the revision to the remote workers so they
are up to date.

Their server would be read-only, just to retrieve the latest revisions
loaded in it.

-- 
Romain Prévost
Epitech promotion 2007

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org