Importing several 'backup versions' of text files into mercurial?

Haszlakiewicz, Eric EHASZLA at transunion.com
Tue Aug 27 23:58:32 UTC 2013


I don't know of any pre-written scripts to do this kind of thing.  I expect that any script will be highly dependent on exactly how your files are stored on your filesystem.  
You'll probably want to do things like specify the author (with -u) and the date (with -d).  If you're committing a single file at a time, I expect you'd end up with something like:
  hg commit -u "$(stat -c %U $file)" -d "$(stat -c %Y $file) 0" -m "...some commit message..." $file
but of course that assumes your "backup versions" have accurate timestamps and owners.

Eric

> -----Original Message-----
> From: mercurial-bounces at selenic.com [mailto:mercurial-
> bounces at selenic.com] On Behalf Of wolf2525 at gmx.de
> Sent: Tuesday, August 27, 2013 5:00 AM
> To: mercurial at selenic.com
> Subject: Importing several 'backup versions' of text files into mercurial?
> 
>  Hi All,
> 
>  I tried to find infos about how I could import some versioned (manually
> backed up) files into Mercurial. They should result in versioned files within
> Mercurial.
> 
>  Only found infos and scripts about conversions between different
> repositories (svn to mercurial and many others, e.g.
> http://mercurial.selenic.com/wiki/CategoryConversion).
> 
>  I think, I could write this on my own, but if there are some scripts already
> available, I would use them instead :-))
> 
>  Thanks for any ideas or what terms to search for!
> 
>  Best regards, markus
> _______________________________________________
> Mercurial mailing list
> Mercurial at selenic.com
> http://selenic.com/mailman/listinfo/mercurial



More information about the Mercurial mailing list