[prev in list] [next in list] [prev in thread] [next in thread] 

List:       mercurial
Subject:    Re: newby: hgimportsvn, hg log & hg view
From:       Brad Ediger <brad () bradediger ! com>
Date:       2007-09-20 19:38:17
Message-ID: 7BF20664-938B-44DB-89CC-4A4B0C3F43A3 () bradediger ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Sandro:
Another +1 here for hgsvn. I'm successfully using hgsvn (pull and  
push actually, though push is alpha-quality) on projects with more  
than 1000 svn revisions.

#1: Maybe you could look into this a little further. If the svn  
revision you're interested in was 1047, try this to see Mercurial's  
idea of what changed:

hg diff -r svn.1046 -r svn.1047

Tag names like svn.1047 can be used in place of revision numbers  
almost anywhere.

#2: You will get the "svn.3 svn.2 svn.1" issue if svn revisions 1 and  
2 contain only files that are .hgignored, or otherwise translate into  
no files being modified on the hg changeset. An example would be if  
you have hgsvn pulling from /repo/trunk, but those changesets only  
modify files under /repo/branches/feature in svn.

The technical reason for this is that hgpullsvn takes the following  
steps (as a gross approximation):
1. "svn up" your working copy to the latest svn tag you have in your  
hg repo, plus one revision
2. "hg ci" the changes into a new changeset
3. "hg tag -l svn.xxx" to apply a local tag to the new changeset
4. Repeat from step 1 until done

If the svn changeset in step 1 doesn't change any files (modulo  
your .hgignore), then step 2 won't create an hg changeset (hg ci has  
no effect if there are no changes in your working copy). But the tag  
is still applied in step 3 -- it is applied to a changeset that  
probably already had another svn.xxx tag on it. This all makes sense  
because, from Mercurial's perspective, revisions 1, 2, and 3 have  
exactly the same files. No big deal.

HTH,
Brad

On Sep 20, 2007, at 1:59 PM, Peter Arrenbrecht wrote:

> I used hgsvn with great success on a repo with roughly 700 svn log
> entries. Could it be some of the files are .hgignore'd?
> -peo
>
> On 9/20/07, Sandro Dentella <sandro@e-den.it> wrote:
>> Hi, some days ago I sent this mail that was unanswered. Is there  
>> another
>> list where I should address these kind of problems?
>>
>> I really would like to switch from svn to hg but would like to  
>> preserve the
>> history of my files... is hgsvn know to be relyable?
>>
>>
>> TIA
>> sandro
>> *:-)
>>
>> ----- Forwarded message from Sandro Dentella <sandro@e-den.it> -----
>>
>> Date: Wed, 19 Sep 2007 09:59:43 +0200
>> From: Sandro Dentella <sandro@e-den.it>
>> Subject: hgimportsvn, hg log & hg view
>> To: mercurial@selenic.com
>> X-Spam-Status: No
>>
>> Hi,
>>
>>   I'm switching from svn to hg. I'm trying to convert some  
>> repository with
>>   hgimportsvn/hgpullsn. It goes to the end correctly but then I  
>> have some
>>   behaviour that I'm not able to understand:
>>
>>   1. some files appear to have no log at all. In the example  
>> both .hg and
>>      .svn coexist:
>>
>>     sandro@bluff:/misc/src/hg/svn-sqlkit$ hg log bin/sqledit
>>     sandro@bluff:/misc/src/hg/svn-sqlkit$ svn log bin/sqledit
>>      
>> --------------------------------------------------------------------- 
>> ---
>>     r1047 | sandro | 2007-02-23 13:27:32 +0100 (ven, 23 feb 2007)  
>> | 3 lines
>>
>>     sqledit: added filter for tables
>>     layout: fix for pack
>>
>>      
>> --------------------------------------------------------------------- 
>> ---
>>     [many more lines]
>>
>>   2. a look at 'hg view' shows that for each svn rev has been  
>> added a tag,
>>      that helps tracking correspondence. I never used branches in  
>> this svn
>>      repo so I thought I would find all tags in a vertical line,  
>> but what I
>>      get same times is a horizontal placement corresponding to the  
>> same id
>>      that is not possible:
>>
>>      svn.5
>>      svn.4
>>      svn.3  svn.2 svn.1  ## these all point to the same id
>>
>>      is it a bug or I'm not understanding what it means?
>>
>> Thanks in advance
>> sandro
>> *:-)
>>
>> PS: I used both 0.13 & 0.15dev with same result
>> _______________________________________________
>> Mercurial mailing list
>> Mercurial@selenic.com
>> http://selenic.com/mailman/listinfo/mercurial
>>
> _______________________________________________
> Mercurial mailing list
> Mercurial@selenic.com
> http://selenic.com/mailman/listinfo/mercurial


[Attachment #5 (unknown)]

<HTML><BODY style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: \
after-white-space; "><DIV>Sandro:</DIV><DIV><SPAN class="Apple-style-span" \
style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); \
font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; \
font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; \
-khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: \
auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: \
0px; "><SPAN class="Apple-style-span" style="border-collapse: separate; \
border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: \
12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: \
normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: \
none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: \
2; white-space: normal; widows: 2; word-spacing: 0px; "><SPAN \
class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; \
color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; \
font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: \
normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; \
-apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; \
widows: 2; word-spacing: 0px; "><SPAN class="Apple-style-span" \
style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); \
font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; \
font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; \
-khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: \
auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: \
0px; ">Another +1 here for hgsvn. I'm successfully using hgsvn (pull and push \
actually, though push is alpha-quality) on projects with more than 1000 svn \
revisions. </SPAN></SPAN></SPAN></SPAN></DIV><DIV><BR \
class="khtml-block-placeholder"></DIV><DIV>#1: Maybe you could look into this a \
little further. If the svn revision you're interested in was 1047, try this to see \
Mercurial's idea of what changed:</DIV><DIV><BR \
class="khtml-block-placeholder"></DIV><DIV>hg diff -r svn.1046 -r \
svn.1047</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Tag names like \
svn.1047 can be used in place of revision numbers almost anywhere.</DIV><DIV><BR \
class="khtml-block-placeholder"></DIV><DIV><SPAN class="Apple-style-span" \
style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); \
font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; \
font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; \
-khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: \
auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: \
0px; "><SPAN class="Apple-style-span" style="border-collapse: separate; \
border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: \
12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: \
normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: \
none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: \
2; white-space: normal; widows: 2; word-spacing: 0px; "><SPAN \
class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; \
color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; \
font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: \
normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; \
-apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; \
widows: 2; word-spacing: 0px; "><SPAN class="Apple-style-span" \
style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); \
font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; \
font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; \
-khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: \
auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: \
0px; ">#2: You will get the "svn.3 svn.2 svn.1" issue if svn revisions 1 and 2 \
contain only files that are .hgignored, or otherwise translate into no files being \
modified on the hg changeset. An example would be if you have hgsvn pulling from \
/repo/trunk, but those changesets only modify files under /repo/branches/feature in \
svn.</SPAN></SPAN></SPAN></SPAN></DIV><DIV><BR \
class="khtml-block-placeholder"></DIV><DIV>The technical reason for this is that \
hgpullsvn takes the following steps (as a gross approximation):</DIV><DIV>1. "svn up" \
your working copy to the latest svn tag you have in your hg repo, plus one \
revision</DIV><DIV>2. "hg ci" the changes into a new changeset</DIV><DIV>3. "hg tag \
-l svn.xxx" to apply a local tag to the new changeset</DIV><DIV>4. Repeat from step 1 \
until done</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>If the svn \
changeset in step 1 doesn't change any files (modulo your .hgignore), then step 2 \
won't create an hg changeset (hg ci has no effect if there are no changes in your \
working copy). But the tag is still applied in step 3 -- it is applied to a changeset \
that probably already had another svn.xxx tag on it. This all makes sense because, \
from Mercurial's perspective, revisions 1, 2, and 3 have exactly the same files. No \
big deal.</DIV><DIV><BR \
class="khtml-block-placeholder"></DIV><DIV>HTH,</DIV><DIV>Brad</DIV><BR><DIV><DIV>On \
Sep 20, 2007, at 1:59 PM, Peter Arrenbrecht wrote:</DIV><BR \
class="Apple-interchange-newline"><BLOCKQUOTE type="cite"><DIV style="margin-top: \
0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">I used hgsvn with \
great success on a repo with roughly 700 svn log</DIV><DIV style="margin-top: 0px; \
margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">entries. Could it be some \
of the files are .hgignore'd?</DIV><DIV style="margin-top: 0px; margin-right: 0px; \
margin-bottom: 0px; margin-left: 0px; ">-peo</DIV><DIV style="margin-top: 0px; \
margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; \
"><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; \
margin-left: 0px; ">On 9/20/07, Sandro Dentella &lt;<A \
href="mailto:sandro@e-den.it">sandro@e-den.it</A>&gt; wrote:</DIV> <BLOCKQUOTE \
type="cite"><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; \
margin-left: 0px; ">Hi, some days ago I sent this mail that was unanswered. Is there \
another</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; \
margin-left: 0px; ">list where I should address these kind of problems?</DIV><DIV \
style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; \
min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; \
margin-bottom: 0px; margin-left: 0px; ">I really would like to switch from svn to hg \
but would like to preserve the</DIV><DIV style="margin-top: 0px; margin-right: 0px; \
margin-bottom: 0px; margin-left: 0px; ">history of my files... is hgsvn know to be \
relyable?</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; \
margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; \
margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; \
"><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; \
margin-left: 0px; ">TIA</DIV><DIV style="margin-top: 0px; margin-right: 0px; \
margin-bottom: 0px; margin-left: 0px; ">sandro</DIV><DIV style="margin-top: 0px; \
margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">*:-)</DIV><DIV \
style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; \
min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; \
margin-bottom: 0px; margin-left: 0px; ">----- Forwarded message from Sandro Dentella \
&lt;<A href="mailto:sandro@e-den.it">sandro@e-den.it</A>&gt; -----</DIV><DIV \
style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; \
min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; \
margin-bottom: 0px; margin-left: 0px; ">Date: Wed, 19 Sep 2007 09:59:43 \
+0200</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; \
margin-left: 0px; ">From: Sandro Dentella &lt;<A \
href="mailto:sandro@e-den.it">sandro@e-den.it</A>&gt;</DIV><DIV style="margin-top: \
0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Subject: hgimportsvn, \
hg log &amp; hg view</DIV><DIV style="margin-top: 0px; margin-right: 0px; \
margin-bottom: 0px; margin-left: 0px; ">To: <A \
href="mailto:mercurial@selenic.com">mercurial@selenic.com</A></DIV><DIV \
style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; \
">X-Spam-Status: No</DIV><DIV style="margin-top: 0px; margin-right: 0px; \
margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV \
style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; \
">Hi,</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; \
margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; \
margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><SPAN \
class="Apple-converted-space">  </SPAN>I'm switching from svn to hg. I'm trying to \
convert some repository with</DIV><DIV style="margin-top: 0px; margin-right: 0px; \
margin-bottom: 0px; margin-left: 0px; "><SPAN class="Apple-converted-space">  \
</SPAN>hgimportsvn/hgpullsn. It goes to the end correctly but then I have \
some</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; \
margin-left: 0px; "><SPAN class="Apple-converted-space">  </SPAN>behaviour that I'm \
not able to understand:</DIV><DIV style="margin-top: 0px; margin-right: 0px; \
margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV \
style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; \
"><SPAN class="Apple-converted-space">  </SPAN>1. some files appear to have no log at \
all. In the example both .hg and</DIV><DIV style="margin-top: 0px; margin-right: 0px; \
margin-bottom: 0px; margin-left: 0px; "><SPAN class="Apple-converted-space">     \
</SPAN>.svn coexist:</DIV><DIV style="margin-top: 0px; margin-right: 0px; \
margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV \
style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; \
"><SPAN class="Apple-converted-space">    \
</SPAN>sandro@bluff:/misc/src/hg/svn-sqlkit$ hg log bin/sqledit</DIV><DIV \
style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; \
"><SPAN class="Apple-converted-space">    \
</SPAN>sandro@bluff:/misc/src/hg/svn-sqlkit$ svn log bin/sqledit</DIV><DIV \
style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; \
"><SPAN class="Apple-converted-space">    \
</SPAN>------------------------------------------------------------------------</DIV><DIV \
style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; \
"><SPAN class="Apple-converted-space">    </SPAN>r1047 | sandro | 2007-02-23 13:27:32 \
+0100 (ven, 23 feb 2007) | 3 lines</DIV><DIV style="margin-top: 0px; margin-right: \
0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV \
style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; \
"><SPAN class="Apple-converted-space">    </SPAN>sqledit: added filter for \
tables</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; \
margin-left: 0px; "><SPAN class="Apple-converted-space">    </SPAN>layout: fix for \
pack</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; \
margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; \
margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><SPAN \
class="Apple-converted-space">    \
</SPAN>------------------------------------------------------------------------</DIV><DIV \
style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; \
"><SPAN class="Apple-converted-space">    </SPAN>[many more lines]</DIV><DIV \
style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; \
min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; \
margin-bottom: 0px; margin-left: 0px; "><SPAN class="Apple-converted-space">  \
</SPAN>2. a look at 'hg view' shows that for each svn rev has been added a \
tag,</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; \
margin-left: 0px; "><SPAN class="Apple-converted-space">     </SPAN>that helps \
tracking correspondence. I never used branches in this svn</DIV><DIV \
style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; \
"><SPAN class="Apple-converted-space">     </SPAN>repo so I thought I would find all \
tags in a vertical line, but what I</DIV><DIV style="margin-top: 0px; margin-right: \
0px; margin-bottom: 0px; margin-left: 0px; "><SPAN class="Apple-converted-space">     \
</SPAN>get same times is a horizontal placement corresponding to the same \
id</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; \
margin-left: 0px; "><SPAN class="Apple-converted-space">     </SPAN>that is not \
possible:</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; \
margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; \
margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><SPAN \
class="Apple-converted-space">     </SPAN>svn.5</DIV><DIV style="margin-top: 0px; \
margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><SPAN \
class="Apple-converted-space">     </SPAN>svn.4</DIV><DIV style="margin-top: 0px; \
margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><SPAN \
class="Apple-converted-space">     </SPAN>svn.3<SPAN class="Apple-converted-space">  \
</SPAN>svn.2 svn.1<SPAN class="Apple-converted-space">  </SPAN>## these all point to \
the same id</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; \
margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; \
margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><SPAN \
class="Apple-converted-space">     </SPAN>is it a bug or I'm not understanding what \
it means?</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; \
margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; \
margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Thanks in \
advance</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; \
margin-left: 0px; ">sandro</DIV><DIV style="margin-top: 0px; margin-right: 0px; \
margin-bottom: 0px; margin-left: 0px; ">*:-)</DIV><DIV style="margin-top: 0px; \
margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; \
"><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; \
margin-left: 0px; ">PS: I used both 0.13 &amp; 0.15dev with same result</DIV><DIV \
style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; \
">_______________________________________________</DIV><DIV style="margin-top: 0px; \
margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Mercurial mailing \
list</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; \
margin-left: 0px; "><A \
href="mailto:Mercurial@selenic.com">Mercurial@selenic.com</A></DIV><DIV \



_______________________________________________
Mercurial mailing list
Mercurial@selenic.com
http://selenic.com/mailman/listinfo/mercurial


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic