Re: [fossil-users] fossil export handling of trunk differs from import

2017-02-12 Thread Roy Marples
On 10/02/17 17:52, Roy Marples wrote:
> On 09/02/2017 21:42, Roy Marples wrote:
>> When importing a git fast import file, the master branch is silently
>> changed to trunk, to match the fossil default.
>> However, when exported back out the reverse conversion does not apply.
>>
>> This is not good, because fossil is effectively re-writing history.
>> But what is worse is that the export does not match the import  I'm
>> striving to get out pretty much exactly what I put in.
> 
> The silent branch renaming is problematic, but solvable.
> Both fossil and git work fine without a master or trunk branch.
> It is just a question of changing the defaults. I propose the following:
> 
> Without any options, both import and export preserve the original naming
> scheme. However, we use the provided options to handle preference.
> 
> fossil import --rename-master trunk
> fossil export --rename-trunk master
> 
> This would allow a bi-directional bridge where the default trunk name is
> respected at both ends. It would also allow the crazy situation where
> you have both trunk AND master branches.

This has now been done in the roy-export branch. Testing welcome.

One issue with my changes is that when a git repo imports to a new
fossil database, there is no trunk branch or tag (visible from the ui at
least) but when we try to create a trunk branch fossil complains it
already exists.

Another issue (but this exists before my changes) is the rename trunk
feature, probably related to the above issue:
$ ./fossil import --git --rename-trunk master x.fossil x
Rebuilding repository meta-data...
  100.0% complete...
SQLITE_ERROR: no such table: vfile
./fossil: no such table: vfile
SELECT 1 FROM vfile WHERE pathname='manifest'
$

So my question is, has the --rename-trunk feature ever worked and can
fossil work without the trunk branch at all to allow a new one to be
created?

Roy
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] fossil export handling of trunk differs from import

2017-02-10 Thread Roy Marples
On 10/02/2017 19:10, Joe Mistachkin wrote:
> 
> Roy Marples wrote:
>>
>> fossil import --rename-master trunk
>> fossil export --rename-trunk master 
>>
> 
> As a matter of my personal preferences and taste, I really like the
> idea of NOT doing "magic branch renaming" by default and adding the
> above new options.
> 
> What kind of backward compatibility issues might we face with those
> changes?

Import and export are used in three possible scenarios:
1) Import into fossil, discard old repository
2) Export from fossil, discard fossil repository
3) Fossil is one end of a bi-directional bridge

The first two cases are one shot, thus there is no backwards compat to
be concerned about.

The third case should also not be a problem for existing setups because
master being renamed to trunk has already happened, so master doesn't
exist here.

So I'm pretty sure the proposed change only affects new setups.

Roy
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] fossil export handling of trunk differs from import

2017-02-10 Thread Joe Mistachkin

Roy Marples wrote:
> 
> fossil import --rename-master trunk
> fossil export --rename-trunk master 
> 

As a matter of my personal preferences and taste, I really like the
idea of NOT doing "magic branch renaming" by default and adding the
above new options.

What kind of backward compatibility issues might we face with those
changes?

--
Joe Mistachkin @ https://urn.to/r/mistachkin

___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] fossil export handling of trunk differs from import

2017-02-10 Thread Roy Marples
On 09/02/2017 21:42, Roy Marples wrote:
> When importing a git fast import file, the master branch is silently
> changed to trunk, to match the fossil default.
> However, when exported back out the reverse conversion does not apply.
> 
> This is not good, because fossil is effectively re-writing history.
> But what is worse is that the export does not match the import  I'm
> striving to get out pretty much exactly what I put in.

The silent branch renaming is problematic, but solvable.
Both fossil and git work fine without a master or trunk branch.
It is just a question of changing the defaults. I propose the following:

Without any options, both import and export preserve the original naming
scheme. However, we use the provided options to handle preference.

fossil import --rename-master trunk
fossil export --rename-trunk master

This would allow a bi-directional bridge where the default trunk name is
respected at both ends. It would also allow the crazy situation where
you have both trunk AND master branches.

Commentary on this default changing idea welcome.

Roy
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users