Add command and menu option for adding one or more files to the repository

[?]
Dec 29, 2020, 12:53 AM
VWRDBPJZG6LMTUN2BKCBBPY2LZNJDIJMJ4SFYGXYQFW2XDNXNJPAC

Dependencies

  • [2] YDCLFNEJ Add menu command for recording changes to specific files
  • [3] L44OILGK Add reset command to resource state context menu
  • [4] MU6ZNUYZ Integrate recordAll command with input box
  • [5] 3N3RS66T Create pijul output channel and configure activation events
  • [6] H6KYVQ2Q Add a class to represent resources
  • [7] NCBEWRYE Initialize Repository
  • [8] ZI7ORD4P Add iconv dependency
  • [*] B4SKYP3Y Add repository model and add steps to initialize it
  • [*] ILH3GIVT Add command centre and refresh/init commands
  • [*] JYMSJCPQ Add command to add all untracked files and fix repository refreshing

Change contents

  • edit in src/repository.ts at line 166
    [3.1167]
    [3.1167]
    }
    }
    /**
    * Adds one or more currently untracked files to the Pijul repository
    * @param resourceStates The files to add to the repository
    */
    async addFiles (...resourceStates: SourceControlResourceState[]): Promise<void> {
    for await (const untrackedFile of resourceStates) {
    await this.repository.addFile(untrackedFile.resourceUri);
  • edit in src/commands.ts at line 147
    [12.676]
    [12.676]
    * Adds one or more currently untracked files to the Pijul repository
    * @param repository The repository the untracked files will be added to
    * @param resourceStates The files that will be added
    */
    @command('pijul.add', { repository: true })
    async add (repository: Repository, ...resourceStates: SourceControlResourceState[]): Promise<void> {
    await repository.addFiles(...resourceStates);
    await repository.refreshStatus();
    }
    /**
  • replacement in src/commands.ts at line 173
    [3.1141][3.1141:1246]()
    async stage (repository: Repository, ...resourceStates: SourceControlResourceState[]): Promise<void> {
    [3.1141]
    [2.2150]
    async reset (repository: Repository, ...resourceStates: SourceControlResourceState[]): Promise<void> {
  • edit in package.json at line 48
    [12.1025]
    [12.1025]
    "command": "pijul.add",
    "title": "Add to Repository",
    "category": "Pijul"
    },
    {
  • edit in package.json at line 88
    [3.1511]
    [3.1511]
    "scm/title": [
    {
    "command": "pijul.recordAll",
    "when": "scmProvider == pijul"
    },
    {
    "command": "pijul.resetAll",
    "when": "scmProvider == pijul"
    },
    {
    "command": "pijul.addAll",
    "when": "scmProvider == pijul"
    }
    ],
    "scm/resourceGroup/context": [
    {
    "command": "pijul.recordAll",
    "when": "scmProvider == pijul && scmResourceGroup == changed"
    },
    {
    "command": "pijul.resetAll",
    "when": "scmProvider == pijul && scmResourceGroup == changed"
    },
    {
    "command": "pijul.addAll",
    "when": "scmProvider == pijul && scmResourceGroup == untracked"
    }
    ],
  • replacement in package.json at line 119
    [2.2336][2.2336:2435]()
    "when": "scmProvider == pijul && scmResourceGroup == changed",
    "group": "1_modification"
    [2.2336]
    [2.2435]
    "when": "scmProvider == pijul && scmResourceGroup == changed"
  • replacement in package.json at line 123
    [3.1582][3.1582:1681]()
    "when": "scmProvider == pijul && scmResourceGroup == changed",
    "group": "1_modification"
    [3.1582]
    [3.1681]
    "when": "scmProvider == pijul && scmResourceGroup == changed"
    },
    {
    "command": "pijul.add",
    "when": "scmProvider == pijul && scmResourceGroup == untracked"
  • replacement in package.json at line 136
    [3.6372][3.6372:6455]()
    "light": "#587c0c",
    "dark": "#81b88b",
    "highContrast": "#1b5225"
    [3.6372]
    [3.6455]
    "light": "#587c0c",
    "dark": "#81b88b",
    "highContrast": "#1b5225"
  • replacement in package.json at line 140
    [3.6461][3.6461:6476]()
    },
    {
    [3.6461]
    [3.6476]
    },
    {
  • replacement in package.json at line 145
    [3.6596][3.6596:6679]()
    "light": "#895503",
    "dark": "#E2C08D",
    "highContrast": "#E2C08D"
    [3.6596]
    [3.6679]
    "light": "#895503",
    "dark": "#E2C08D",
    "highContrast": "#E2C08D"
  • replacement in package.json at line 149
    [3.6685][3.6685:6700]()
    },
    {
    [3.6685]
    [3.6700]
    },
    {
  • replacement in package.json at line 154
    [3.6821][3.6821:6904]()
    "light": "#ad0707",
    "dark": "#c74e39",
    "highContrast": "#c74e39"
    [3.6821]
    [3.6904]
    "light": "#ad0707",
    "dark": "#c74e39",
    "highContrast": "#c74e39"
  • replacement in package.json at line 158
    [3.6910][3.6910:6925]()
    },
    {
    [3.6910]
    [3.6925]
    },
    {
  • replacement in package.json at line 163
    [3.7052][3.7052:7135]()
    "light": "#007100",
    "dark": "#73C991",
    "highContrast": "#73C991"
    [3.7052]
    [3.7135]
    "light": "#007100",
    "dark": "#73C991",
    "highContrast": "#73C991"
  • replacement in package.json at line 167
    [3.7141][3.7141:7156]()
    },
    {
    [3.7141]
    [3.7156]
    },
    {
  • replacement in package.json at line 172
    [3.7281][3.7281:7364]()
    "light": "#895503",
    "dark": "#E2C08D",
    "highContrast": "#E2C08D"
    [3.7281]
    [3.7364]
    "light": "#895503",
    "dark": "#E2C08D",
    "highContrast": "#E2C08D"
  • replacement in package.json at line 176
    [3.7370][3.7370:7385]()
    },
    {
    [3.7370]
    [3.7385]
    },
    {
  • replacement in package.json at line 181
    [3.7504][3.7504:7587]()
    "light": "#6c6cc4",
    "dark": "#6c6cc4",
    "highContrast": "#6c6cc4"
    [3.7504]
    [3.7587]
    "light": "#6c6cc4",
    "dark": "#6c6cc4",
    "highContrast": "#6c6cc4"
  • replacement in package.json at line 185
    [3.7593][3.7593:7600]()
    }
    [3.7593]
    [3.7600]
    }
  • replacement in package.json at line 224
    [3.109591][3.109591:109593]()
    }
    [3.109591]
    }