You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Eric Antonio Maquiling <er...@gmail.com> on 2016/01/19 20:57:06 UTC

point of time dump?

SVN on Linux
Tortoise on PC's installed

First let me say, I'm the sysadmin, not a developer so they tasked me to get
this done.  I take care of the SVN linux box and making sure it's up and
running. I can do basic stuff on SVN such as commit and checking out.

But here's something they asked me to do.  Mind you, this is all management
request, not developers.

They (managers) want a dump of code they can look at from say 1 and a half
years ago.  I can do that with Tortoise easy enough.  But these managers won't
have tortoise installed and I'm not going to train them on how to
"revert/merge/update" tortoise.

I *think* what they want is to be able to dump the repo, from 1.5 years ago, to
something readable they can look at.  They don't want to change anything, they
just want to be able to see it.

What I typically do for them is just do a check out to my local PC, and burn
the folder to a CD.  Yes, burn to a CD.  Old managers have old habits so I
don't question that.  

So what I (they) want is a CD with code that is 1.5 years old.  
-- 
eric

Re: point of time dump?

Posted by Stefan <lu...@posteo.de>.
Hi Eric,
> SVN on Linux
> Tortoise on PC's installed
>
> First let me say, I'm the sysadmin, not a developer so they tasked me to get
> this done.  I take care of the SVN linux box and making sure it's up and
> running. I can do basic stuff on SVN such as commit and checking out.
>
> But here's something they asked me to do.  Mind you, this is all management
> request, not developers.
>
> They (managers) want a dump of code they can look at from say 1 and a half
> years ago.  I can do that with Tortoise easy enough.  But these managers won't
> have tortoise installed and I'm not going to train them on how to
> "revert/merge/update" tortoise.
>
> I *think* what they want is to be able to dump the repo, from 1.5 years ago, to
> something readable they can look at.  They don't want to change anything, they
> just want to be able to see it.
>
> What I typically do for them is just do a check out to my local PC, and burn
> the folder to a CD.  Yes, burn to a CD.  Old managers have old habits so I
> don't question that.
>
> So what I (they) want is a CD with code that is 1.5 years old.
I'm not totally sure what you are looking for here.
It sounds like all you need is to use the SVN command line client or 
provide your managers with a simple batch file they could use.

The commands you are looking for is most likely:
svn co [URL] [PATH] -r {2014-06-01}

Where URL is the URL to the repository and path the path for the local 
working copy.
-r {2015-10-31} would then retrieve the code/repository content of the 
specified date.

If I don't get you wrong, then all which is left for you to do is to 
wrap that up in a nice batch file so that managers could easily call 
something like:
getOldCode 1.5y

(or whatever they want)

Regards,
Stefan

Re: point of time dump?

Posted by Eric Antonio Maquiling <er...@gmail.com>.
On Tue, Jan 19, 2016 at 01:52:33PM -0700, jblist@icloud.com wrote:
>
>To present the code as a snapshot of a point in time, you could look at the
>"svn export" command and specify either a date or revision number
>corresponding to the date you are looking for. This dump of code could easily

I *THINK* this is what they want.  They weren't very clear.  I really don't
understand that they will need it for.  They just want a CD of repo "from this
date on".  I don't think they want to see changes but I think they just wanna
see a snaphot of the code for that particular month/year.  

I know it's weird.  Manager thing...
-- 
eric

Re: point of time dump?

Posted by Eric Antonio Maquiling <er...@gmail.com>.
On Wed, Jan 20, 2016 at 01:25:08AM +0100, Stefan wrote:
>
>Basically the command you'd use is svnadmin dump [REPOSPATH] -r 1:X
>where X is the last revision you want to include (aka: the one from june
>2015).
>See: http://svnbook.red-bean.com/en/1.8/svn.ref.svnadmin.c.dump.html
>
>Then you do an svnadmin load of the provided dump and there you have the
>repository with all the content from the beginning of time to June 2015.

Yes, this looks like what I need.  Thanks!  Will read up on this tonight.

So basically, talked to the manglers some more, and this is the requirement:

1.  dump the repo
2.  give them the repo
3.  they need to load it to a machine, not my responsibility
4.  they need to use their own UI (Probably Tortoise)
5.  they look for whatever they want.

So in step 1, the requirement is:
dump the repo from beginning of time til June of 2015.  So probably after
reading up on that url above and testing it out a few times, this is probably exactly
what we need.

Then they will have a june2015.dmp file and I'm in the clear.

Luckily for me, one of my daily backups is a dump file every  night to a VM.
So to make sure the dump files work, I just do svn://backup_vm_ip address.

-- 
eric

Re: point of time dump?

Posted by Stefan <lu...@posteo.de>.
On 1/20/2016 01:16, Eric Antonio Maquiling wrote:
> On Wed, Jan 20, 2016 at 12:40:12AM +0100, Stefan wrote:
>> If they really require full offline access to the entire repository, you
>> could create a backup/dump of the data they need so they can locally set up
>> their own SVN repository (even on a local machine). You can filter the dump
>> to control which data they will be provided with.
> That's exactly what my suggestion was.  I figure, if they have people who know
> what to look for they probably know how to use version control software.
>
> But me and developer are stumped on one thing.  How to give them to dump of the
> repo, from beginning of time, to June of 2015?  He was thinking of doing a dump
> of the whole thing, putting it into another machine, and remove changes from
> now til June of 2015.
>
Joseph already answered that in his other reply. I take it you answered 
my reply prior to checking out his.

Basically the command you'd use is svnadmin dump [REPOSPATH] -r 1:X
where X is the last revision you want to include (aka: the one from june 
2015).
See: http://svnbook.red-bean.com/en/1.8/svn.ref.svnadmin.c.dump.html

Then you do an svnadmin load of the provided dump and there you have the 
repository with all the content from the beginning of time to June 2015.

Regards,
Stefan

Re: point of time dump?

Posted by Eric Antonio Maquiling <er...@gmail.com>.
On Wed, Jan 20, 2016 at 12:40:12AM +0100, Stefan wrote:
>This is quite an unclear requirement to me. If it's an audit, you'd normally

You should see the look on my face when they asked me!  I was like "huh?  just
install Tortoise and they can view all the changes they want!".  But then they
said no, it needs to go outside, outside our network.  

>If they really require full offline access to the entire repository, you
>could create a backup/dump of the data they need so they can locally set up
>their own SVN repository (even on a local machine). You can filter the dump
>to control which data they will be provided with.

That's exactly what my suggestion was.  I figure, if they have people who know
what to look for they probably know how to use version control software.  

But me and developer are stumped on one thing.  How to give them to dump of the
repo, from beginning of time, to June of 2015?  He was thinking of doing a dump
of the whole thing, putting it into another machine, and remove changes from
now til June of 2015. 

-- 
eric

Re: point of time dump?

Posted by Stefan <lu...@posteo.de>.
On 1/20/2016 00:27, Eric Antonio Maquiling wrote:
> On Tue, Jan 19, 2016 at 01:52:33PM -0700, jblist@icloud.com wrote:
>> To present the code as a change over time, you have a couple of options. You
>> could perform the same export as above but do so for each revision of the
>> repository over the selected range. This could be automated creating separate
>> directories or folders for each revision. This would allow an intuitive way of
>> browsing the code base over time without the use of svn technology.
>>
>> If you need to present the actual changes, then using various options of the "svn log" command could show the deltas of each commit over the same range. Use of the '-c' option might allow for outputting each commit as a separate file through automation.
>>
>
>
> I was TOTALLY wrong in what it was they wanted.  More explantion from the
> managers reveiled this to me.  An outside agency wants to view the code
> (guessing some sort of audit).
>
> They want to see the code AND the changes to code (whatever file they want to
> see) over the course in time UP TO June of last year.  BUT not from June last
> year to present.
>
> Talked to a developer who is pretty good with SVN and he thought he had ideas
> but then turned out it won't work.
>
> I suggested they install Tortoise and they can view all the changes they want
> but the source code has to be outside the building and the network so it has to
> be presented something like a CD or DVD.
This is quite an unclear requirement to me. If it's an audit, you'd 
normally grant them restricted access to your network (for instance via 
a VPN). It's then possible to grant them read access to the SVN 
repository and restrict that to a subset of the entire repository, if 
required.
If they are doing an audit, they might have more sophisticated tools at 
hand. If I were you, I'd ask which tools they want to use to do the 
audit to get an idea what they really require.

If they really require full offline access to the entire repository, you 
could create a backup/dump of the data they need so they can locally set 
up their own SVN repository (even on a local machine). You can filter 
the dump to control which data they will be provided with.

Another alternative is to provide slaves of the repository you have in 
your company, if network speed is the limiting factor/concern by the 
management for the audit (or whatever it's required to). VisualSVNServer 
for instance provides facilities for that case, and I think that 
Wandisco as well as Collabnet also provide some competing solutions.

Regards,
Stefan

Re: point of time dump?

Posted by Eric Antonio Maquiling <er...@gmail.com>.
On Tue, Jan 19, 2016 at 04:44:36PM -0700, jblist@icloud.com wrote:
>
>Ok, this is still workable. The first option assumes that your auditors have
>no clue how to use SVN and would be fine with raw source code minus all the
>nice meta-data provided by subversion. The second option assumes your auditors
>are at least willing to use SVN tools to browse a repository.

Will need to work on your instructions tomorrow.  Thank you for all your help!  I'm assuming
they have no clue about SVN.  But who knows, I'll ask for me info.  Don't know
why they just won't tell me exactly what they need first time :)

I'll keep you guys updated.
-- 
eric

Re: point of time dump?

Posted by jb...@icloud.com.
> On Jan 19, 2016, at 4:27 PM, Eric Antonio Maquiling <er...@gmail.com> wrote:
> 
> On Tue, Jan 19, 2016 at 01:52:33PM -0700, jblist@icloud.com wrote:
>> 
>> To present the code as a change over time, you have a couple of options. You
>> could perform the same export as above but do so for each revision of the
>> repository over the selected range. This could be automated creating separate
>> directories or folders for each revision. This would allow an intuitive way of
>> browsing the code base over time without the use of svn technology.
>> 
>> If you need to present the actual changes, then using various options of the "svn log" command could show the deltas of each commit over the same range. Use of the '-c' option might allow for outputting each commit as a separate file through automation.
>> 
> 
> 
> 
> I was TOTALLY wrong in what it was they wanted.  More explantion from the
> managers reveiled this to me.  An outside agency wants to view the code
> (guessing some sort of audit).
> 
> They want to see the code AND the changes to code (whatever file they want to
> see) over the course in time UP TO June of last year.  BUT not from June last
> year to present.
> 
> Talked to a developer who is pretty good with SVN and he thought he had ideas
> but then turned out it won't work.
> 
> I suggested they install Tortoise and they can view all the changes they want
> but the source code has to be outside the building and the network so it has to
> be presented something like a CD or DVD.
> -- 
> eric


Ok, this is still workable. The first option assumes that your auditors have no clue how to use SVN and would be fine with raw source code minus all the nice meta-data provided by subversion. The second option assumes your auditors are at least willing to use SVN tools to browse a repository.


Option 1) You will still need to automate the export of every revision from 1 to the end date you have in mind.

Something like this (choose your favorite scripting language):

for R in 1..X (where X is the revision from June of last year)
  svn export -r $R  foldername.$R
end-for

This will export each revision into its own folder, named with the revision number from the repository. You will lose all meta data with this method: Who changed what, and what the commit log was for each commit will be lost. Depending on how old and how big your repository is, this might exceed the capability of your local machine and the capacity of optical storage media.


Option 2) On the other hand, if your auditors are familar with subversion and would like a local COPY of the repository so that meta data are preserved, you might have better luck using "svnadmin dump -r1:X" to dump out the range of revisions up to X, or June of last year. Then use "svnadmin load" to create a new subset repository containing only the revisions in question. This duplicate, subset repository could be burned to optical media and browsed using tools such as Tortoise.


Re: point of time dump?

Posted by Eric Antonio Maquiling <er...@gmail.com>.
On Tue, Jan 19, 2016 at 01:52:33PM -0700, jblist@icloud.com wrote:
>
>To present the code as a change over time, you have a couple of options. You
>could perform the same export as above but do so for each revision of the
>repository over the selected range. This could be automated creating separate
>directories or folders for each revision. This would allow an intuitive way of
>browsing the code base over time without the use of svn technology.
>
>If you need to present the actual changes, then using various options of the "svn log" command could show the deltas of each commit over the same range. Use of the '-c' option might allow for outputting each commit as a separate file through automation.
>



I was TOTALLY wrong in what it was they wanted.  More explantion from the
managers reveiled this to me.  An outside agency wants to view the code
(guessing some sort of audit).

They want to see the code AND the changes to code (whatever file they want to
see) over the course in time UP TO June of last year.  BUT not from June last
year to present.

Talked to a developer who is pretty good with SVN and he thought he had ideas
but then turned out it won't work.

I suggested they install Tortoise and they can view all the changes they want
but the source code has to be outside the building and the network so it has to
be presented something like a CD or DVD.
-- 
eric

Re: point of time dump?

Posted by jb...@icloud.com.
> On Jan 19, 2016, at 12:57 PM, Eric Antonio Maquiling <er...@gmail.com> wrote:
> 
> SVN on Linux
> Tortoise on PC's installed
> 
> First let me say, I'm the sysadmin, not a developer so they tasked me to get
> this done.  I take care of the SVN linux box and making sure it's up and
> running. I can do basic stuff on SVN such as commit and checking out.
> 
> But here's something they asked me to do.  Mind you, this is all management
> request, not developers.
> 
> They (managers) want a dump of code they can look at from say 1 and a half
> years ago.  I can do that with Tortoise easy enough.  But these managers won't
> have tortoise installed and I'm not going to train them on how to
> "revert/merge/update" tortoise.
> 
> I *think* what they want is to be able to dump the repo, from 1.5 years ago, to
> something readable they can look at.  They don't want to change anything, they
> just want to be able to see it.
> 
> What I typically do for them is just do a check out to my local PC, and burn
> the folder to a CD.  Yes, burn to a CD.  Old managers have old habits so I
> don't question that.  
> 
> So what I (they) want is a CD with code that is 1.5 years old.  
> -- 
> eric


Hello Eric,

The first question you might want to ask your managers is what they expect that dump to look like. Do they want a single point in time or would they like to see change over a range of time. How that question is answered could save you some time and would give you some idea of a direction.

To present the code as a snapshot of a point in time, you could look at the "svn export" command and specify either a date or revision number corresponding to the date you are looking for. This dump of code could easily be burned to an optical disk for archival. You can use a date with the '-r' option to select a revision.

To present the code as a change over time, you have a couple of options. You could perform the same export as above but do so for each revision of the repository over the selected range. This could be automated creating separate directories or folders for each revision. This would allow an intuitive way of browsing the code base over time without the use of svn technology.

If you need to present the actual changes, then using various options of the "svn log" command could show the deltas of each commit over the same range. Use of the '-c' option might allow for outputting each commit as a separate file through automation.

Again, find out what your managers expect that dump to look like.

-Joseph