Fossil

Check-in [edf03559]
Login

Check-in [edf03559]

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Backout change on "login-group join" command which broke the usage of it outside an opened checkout (using -R flag). Change usage text to match the command behavior properly when using the -R flag.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: edf03559615d4ce035caa65a5352742ef0ef1042aa919bd02ac89db64b622fa4
User & Date: mgagnon 2023-01-13 18:38:56
Context
2023-01-16
15:37
Roll back the part of [71a2d68a7a113e7c] which automatically updates the user display prefs cookie, per /chat discussion. Updating the cookie once again requires an explicit udc URL arg or setting the skin, which implies udc. This fixes the problem that a timeline link from the /reports page persistently sets the default timeline entry count to the value used by that report. ... (check-in: 5feac634 user: stephan tags: trunk)
2023-01-13
18:38
Backout change on "login-group join" command which broke the usage of it outside an opened checkout (using -R flag). Change usage text to match the command behavior properly when using the -R flag. ... (check-in: edf03559 user: mgagnon tags: trunk)
16:52
Modernized several old fossil-scm.org URLs, changing "http" to "https" where absolute URLs are necessary, and using site-relative URLs otherwise. Also found and fixed a reference to fossil-scm.hwaci.com, which doesn't seem to resolve any more. ... (check-in: 143f1db7 user: wyoung tags: trunk)
2022-07-30
20:33
login-group command: corrected help text for 'join' option to include REPO and extended code to allow REPO to optionally be passed on as -R REPO. Resolves issue reported in forum post 240b6d856a3dd4b5. ... (check-in: 769a7651 user: stephan tags: trunk)
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/login.c.

2629
2630
2631
2632
2633
2634
2635
2636
2637
2638

2639
2640
2641

2642

2643
2644
2645
2646
2647
2648
2649
2650
** repository or of the repository identified by the -R or --repository option.
**
** >  fossil login-group ?-R REPO?
**
**     Show the login-group to which REPO, or if invoked from within a check-out
**     the repository on which the current check-out is based, belongs.
**
** >  fossil login-group join ?-R? REPO ?--name NAME?
**
**     This subcommand must be invoked from within a check-out to either: add

**     the open repository to the login group that REPO is a member, in which
**     case the optional "--name" argument is not required; or create a new
**     login group between the open repository and REPO, in which case the new

**     group NAME is determined by the mandatory "--name" option. REPO may be

**     specified with or without the -R flag.
**
** >  fossil login-group leave ?-R REPO?
**
**     Take the repository REPO, or if invoked from within a check-out the
**     repository on which the current check-out is based, out of whatever
**     login group it is a member.
**







|

|
>
|
|
|
>
|
>
|







2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
** repository or of the repository identified by the -R or --repository option.
**
** >  fossil login-group ?-R REPO?
**
**     Show the login-group to which REPO, or if invoked from within a check-out
**     the repository on which the current check-out is based, belongs.
**
** >  fossil login-group join ?-R REPO? ?--name NAME? REPO2
**
**     This command will either: (1) add the repository on which the current
**     check-out is based, or the repository REPO specified with -R, to the
**     login group where REPO2 is a member, in which case the optional --name
**     argument is not required; or (2) create a new login group between the
**     repository on which the current check-out is based, or the repository
**     REPO specified with -R, and REPO2, in which case the new group NAME is
**     determined by the mandatory --name option. In both cases, the specified
**     repositories will first leave any group in which they are currently a
**     member before joining the new login group.
**
** >  fossil login-group leave ?-R REPO?
**
**     Take the repository REPO, or if invoked from within a check-out the
**     repository on which the current check-out is based, out of whatever
**     login group it is a member.
**
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677

2678
2679
2680
2681
2682
2683
2684
  Stmt q;
  db_find_and_open_repository(0, 0);
  if( g.argc>2 ){
    zCmd = g.argv[2];
    nCmd = (int)strlen(zCmd);
    if( strncmp(zCmd,"join",nCmd)==0 && nCmd>=1 ){
      const char *zNewName = find_option("name",0,1);
      const char *zOther = g.zRepositoryOption
        ? g.zRepositoryOption : (g.argc>3 ? g.argv[3] : 0);
      char *zErr = 0;
      verify_all_options();
      if( g.zRepositoryOption ? g.argc!=3 : g.argc!=4 ){
        fossil_fatal("unexpected argument count for \"login-group join\"");
      }

      login_group_leave(&zErr);
      sqlite3_free(zErr);
      zErr = 0;
      login_group_join(zOther,0,0,0,zNewName,&zErr);
      if( zErr ){
        fossil_fatal("%s", zErr);
      }







|
<


|


>







2667
2668
2669
2670
2671
2672
2673
2674

2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
  Stmt q;
  db_find_and_open_repository(0, 0);
  if( g.argc>2 ){
    zCmd = g.argv[2];
    nCmd = (int)strlen(zCmd);
    if( strncmp(zCmd,"join",nCmd)==0 && nCmd>=1 ){
      const char *zNewName = find_option("name",0,1);
      const char *zOther = 0;

      char *zErr = 0;
      verify_all_options();
      if( g.argc!=4 ){
        fossil_fatal("unexpected argument count for \"login-group join\"");
      }
      zOther = g.argv[3];
      login_group_leave(&zErr);
      sqlite3_free(zErr);
      zErr = 0;
      login_group_join(zOther,0,0,0,zNewName,&zErr);
      if( zErr ){
        fossil_fatal("%s", zErr);
      }